From patchwork Fri Mar 2 19:41:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivek Unune X-Patchwork-Id: 10255637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2FF9D602B5 for ; Fri, 2 Mar 2018 19:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 205FB2842D for ; Fri, 2 Mar 2018 19:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14C0428434; Fri, 2 Mar 2018 19:43:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4CED72842D for ; Fri, 2 Mar 2018 19:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Mmw52rcMbgVe0wOhHFAhvZ+P2ClsoKS6iaXiHvcSJeQ=; b=fvtULU6KbmWVeL 6j82jDsyPSkW2z/dtaVEFpkXviKH6IJxgMrWANGrnvqkYsseOhza4/3OQy9zx+yx0aWwhCec4jSMT 3OgT5gRgkmglH42u/D/jXwW7r6jyjYHBQlsTyfLu2MOScNcmybL9/Oy/uGgr+Arh+x4AclfhAyRRb xtFJ8HFS4lW7Ur5KE53z8iLKujDpypzmEALL+QEHLAKFTdeRVTjRxcBOOL8En9xTxRks9KbPPP3Ob 1rDg/Nxpm0c4GG0+ocOeE+7D3kDaioeBqL6XyZ2Wmv8unu9KHm7pCtKGVjlP5UrcUPEHaAAjI6c9r dWGRGkzF2W4EQH8BCcvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erqac-0001en-1p; Fri, 02 Mar 2018 19:43:34 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erqaY-0001cs-Gz for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2018 19:43:32 +0000 Received: by mail-qt0-x241.google.com with SMTP id g60so13273280qtd.11 for ; Fri, 02 Mar 2018 11:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jGIOHxWBVapfqMa0Q80/euyKBdrvWija4HJMTpfFVbI=; b=TYwfiSHRN2HkWsz+aGKwMRnmAbYiU+SrSn8BwVg56ercQPYasBKUBDHRZj0rLMt54B 275uYBHSxQqDOx5U005O4bdJeElfG/X7DcaX1Boq0l/hGvg+x8Fnt1V6L92RVzHU/EYK KgP/NgGDV69qOWDFzcRmG2XrwUQJXEbU8DExQrmJQctNKj1AyLhaAiRtx+VO80dl637R TV7qNwJ9c0nuHw8gZJUSqLQGEnfjv2ayOuFhNyhCjHI0nsWBB8X53VH5RKBpWaFywEQ5 ucn8YhqjqBnjjIbb3ers9r0rjxkFOz3gb19FeuhnK3g7vq4WEu+r65AXcP8JNNS55lfc dbgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jGIOHxWBVapfqMa0Q80/euyKBdrvWija4HJMTpfFVbI=; b=o2xG2pPryqDy51nOXSIEq3lhsnYRyZ7GL5bB7xdl1ZCKI3TMl1Vf3QcbAOYxBbdOAs /38skEX6+33ymNhlRN7AqDG5Hv+02peoY8Ey7URS2UYX9tsotOSb+xQas8cAp5QS6D35 cKAOSz5SdH8JV9PX+6Frr2yV7+zHVccFyg3e04sXB+wgnYfSgJ/eUYMaluV2gr+RFerZ GjES+HUjyHo21fhz/ojl6pIAuUi9kvYueyP89lGAFew45qAvI55C94mm6tCr5hahy819 cM7s1Xc4adDZ1DFL+m4vhXRp6+nthxqDTXX24Ip6IZeZPNFPfOSj1XEGepaSBujW4zB/ bjjA== X-Gm-Message-State: AElRT7G6ZrQc2d39kXSThalBe4QZpNCnm8k3zQ2bolU1tU2bA/352CJe IftJPsL4h6H9rkyX3sDSRLnANQ== X-Google-Smtp-Source: AG47ELs9RvW3ULe6bLw4YdC76L/YCA6R1zEkYfwQzIeQSGx5fzqmdjTvXAuhNbB7yBWxAEwMIQy9Rg== X-Received: by 10.200.51.13 with SMTP id t13mr9993314qta.263.1520019797904; Fri, 02 Mar 2018 11:43:17 -0800 (PST) Received: from localhost.localdomain (ool-44c00020.dyn.optonline.net. [68.192.0.32]) by smtp.googlemail.com with ESMTPSA id t28sm4740070qkj.61.2018.03.02.11.43.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 11:43:16 -0800 (PST) From: Vivek Unune To: florian.fainelli@broadcom.com, hauke@hauke-m.de, zajec5@gmail.com, jonmason@broadcom.com, bcm-kernel-feedback-list@broadcom.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk Subject: [PATCH v2] ARM: dts: BCM5301X: Add support for Linksys EA9500 Date: Fri, 2 Mar 2018 14:41:55 -0500 Message-Id: <20180302194155.50808-1-npcomplete13@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <1489590033-4946-1-git-send-email-npcomplete13@gmail.com> References: <1489590033-4946-1-git-send-email-npcomplete13@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180302_114330_602264_0968A91E X-CRM114-Status: GOOD ( 16.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Vivek Unune , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hardware Info ------------- Processor - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz Switch - BCM53012 in BCM4709C0KFEBG & external BCM53125 DDR3 RAM - 256 MB Flash - 128 MB (Toshiba TC58BVG0S3HTA00) 2.4GHz - BCM4366 4×4 2.4/5G single chip 802.11ac SoC Power Amp - Skyworks SE2623L 2.4 GHz power amp (x4) 5GHz x 2 - BCM4366 4×4 2.4/5G single chip 802.11ac SoC Power Amp - PLX Technology PEX8603 3-lane, 3-port PCIe switch Ports - 8 Ports, 1 WAN Ports Antennas - 8 Antennas Serial Port - @J6 [GND,TX,RX] (VCC NC) 115200 8n1 Tested with OpenWrt built with DSA driver and Kernel v4.14 Note: "make sure that port 0 of the internal switch is not accidentally configured back to untagged since that would cause problem when terminating the VLAN tag on the SW side." - Florian Fainelli [1] This can be ensured by running following command in OpenWrt: bridge vlan add vid 1 dev extsw pvid tagged [1] https://www.spinics.net/lists/arm-kernel/msg590992.html Signed-off-by: Vivek Unune --- Changes in v2: - Properly define mdio mux, internal mdio, external mdio, mii bus - Now we define usb3 phy as a mdio node connected to internal mdio, thanks to work done by Rafał Miłecki on the bcm usb3 phy mdio driver - Define external SW as a mdio-mii node connected to external mdio --- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 239 +++++++++++++++++++++++- arch/arm/boot/dts/bcm47094.dtsi | 6 +- arch/arm/boot/dts/bcm5301x.dtsi | 55 +++++- 3 files changed, 288 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts index b6750f7..5f53207 100644 --- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts +++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts @@ -7,7 +7,7 @@ /dts-v1/; #include "bcm47094.dtsi" -#include "bcm5301x-nand-cs0-bch8.dtsi" +#include "bcm5301x-nand-cs0-bch1.dtsi" / { compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708"; @@ -32,5 +32,242 @@ linux,code = ; gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; }; + + rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; + }; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + wps { + label = "bcm53xx:white:wps"; + gpios = <&chipcommon 22 GPIO_ACTIVE_LOW>; + }; + + usb2 { + label = "bcm53xx:green:usb2"; + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + trigger-sources = <&ohci_port2>, <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + + usb3 { + label = "bcm53xx:green:usb3"; + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; + trigger-sources = <&ohci_port1>, <&ehci_port1>, + <&xhci_port1>; + linux,default-trigger = "usbport"; + }; + + power { + label = "bcm53xx:white:power"; + gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>; + }; + + wifi-disabled { + label = "bcm53xx:amber:wifi-disabled"; + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; + }; + + wifi-enabled { + label = "bcm53xx:white:wifi-enabled"; + gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; + }; + + bluebar1 { + label = "bcm53xx:white:bluebar1"; + gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>; + }; + + bluebar2 { + label = "bcm53xx:white:bluebar2"; + gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>; + }; + + bluebar3 { + label = "bcm53xx:white:bluebar3"; + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; + }; + + bluebar4 { + label = "bcm53xx:white:bluebar4"; + gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>; + }; + + bluebar5 { + label = "bcm53xx:white:bluebar5"; + gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>; + }; + + bluebar6 { + label = "bcm53xx:white:bluebar6"; + gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>; + }; + + bluebar7 { + label = "bcm53xx:white:bluebar7"; + gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>; + }; + + bluebar8 { + label = "bcm53xx:white:bluebar8"; + gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&usb2 { + vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>; +}; + +&usb3 { + vcc-gpio = <&chipcommon 14 GPIO_ACTIVE_HIGH>; +}; + +&mdio_mii_mux { + status = "okay"; +}; + +&mdio_ext { + status = "okay"; +}; + +&srab { + compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab"; + status = "okay"; + dsa,member = <0 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan7"; + }; + + port@2 { + reg = <2>; + label = "lan4"; + }; + + port@3 { + reg = <3>; + label = "lan8"; + }; + + port@4 { + reg = <4>; + label = "wan"; + }; + + port@5 { + reg = <5>; + ethernet = <&gmac0>; + label = "cpu"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port@7 { + reg = <7>; + ethernet = <&gmac1>; + label = "cpu"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port@8 { + reg = <8>; + ethernet = <&gmac2>; + label = "cpu"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + sw0_p0: port@0 { + reg = <0>; + label = "extsw"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; }; }; + +&mdio_mii { + status = "okay"; + + switch@0 { + compatible = "brcm,bcm53125"; + #address-cells = <1>; + #size-cells = <0>; + reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; + reset-names = "robo_reset"; + reg = <0>; + dsa,member = <1 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan5"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan6"; + }; + + port@4 { + reg = <4>; + label = "lan3"; + }; + + sw1_p8: port@8 { + reg = <8>; + ethernet = <&sw0_p0>; + label = "cpu"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + diff --git a/arch/arm/boot/dts/bcm47094.dtsi b/arch/arm/boot/dts/bcm47094.dtsi index 4840a78..8f3ec57 100644 --- a/arch/arm/boot/dts/bcm47094.dtsi +++ b/arch/arm/boot/dts/bcm47094.dtsi @@ -6,10 +6,8 @@ #include "bcm4708.dtsi" -/ { - usb3_phy: usb3-phy { - compatible = "brcm,ns-bx-usb3-phy"; - }; +&usb3_phy { + compatible = "brcm,ns-bx-usb3-phy"; }; &uart0 { diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi index 9a076c4..9e4386a 100644 --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi @@ -154,13 +154,6 @@ clock-names = "phy-ref-clk"; }; - usb3_phy: usb3-phy { - compatible = "brcm,ns-ax-usb3-phy"; - reg = <0x18105000 0x1000>, <0x18003000 0x1000>; - reg-names = "dmp", "ccb-mii"; - #phy-cells = <0>; - }; - axi@18000000 { compatible = "brcm,bus-axi"; reg = <0x18000000 0x1000>; @@ -359,7 +352,55 @@ reg = <0x18003000 0x8>; #size-cells = <1>; #address-cells = <0>; + }; + + mdio-bus-mux { + compatible = "mdio-mux-mmioreg"; + mdio-parent-bus = <&mdio>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x18003000 0x4>; + mux-mask = <0x200>; + + mdio_int: mdio@0 { /* BIT(9) = 0 => internal mdio */ + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + usb3_phy: usb3-phy@10 { + compatible = "brcm,ns-ax-usb3-phy"; + reg = <0x10>; + usb3-dmp-syscon = <&usb3_dmp>; + #phy-cells = <0>; + }; + }; + + mdio_ext: mdio@200 { /* BIT(9) = 1 => external mdio */ + reg = <0x200>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + + mdio_mii_mux: mdio-mii-mux { + compatible = "mdio-mux-mmioreg"; + mdio-parent-bus = <&mdio_ext>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1800c1c0 0x4>; + mux-mask = <0xc0>; /* BIT(6) = mdc, BIT(7) = mdio */ status = "disabled"; + + mdio_mii: mdio-mii@0 { + reg = <0x0>; /* Enable mii function */ + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + usb3_dmp: syscon@18105000 { + reg = <0x18105000 0x1000>; }; i2c0: i2c@18009000 {