Received: by 10.223.185.116 with SMTP id b49csp2481727wrg; Thu, 22 Feb 2018 14:43:12 -0800 (PST) X-Google-Smtp-Source: AH8x2259JVm4NywA5pdoT9pBK59v/eN+1aeEplg7ua4bJ4hRjQJHKnNaU8d5kesGaYNSXLb2OzIb X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr8168994pld.365.1519339392809; Thu, 22 Feb 2018 14:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519339392; cv=none; d=google.com; s=arc-20160816; b=V/xz8PlfqUz3NcsR5osL+lz9j/9syxuu4PX4YZYfMXTKDr/wYE05dLVUEWXQjCgaqt IUo8MDeajLmqIfA5WszUZM80OaaSMowwKBjzYlomHZUOGjcgKVXe31v71t2iAMeZrVd/ ksrewHwBvO3QsZIBTZPrU5h8bpEsycQqdxGIpONMBMCFQVPF56i6nZzKAdrkPR3WavRl JvEnL2CDawSd00eOSudHcyhxNeJt9FIvs06PQ/JTeRBs3aSVa46GSDq8fk36ELmEsiH+ nOA2wYurYGlafP2E6KrlD/K2tZL65yhCtXDGl7YEJsJY1HkXMIHtG/lPml7ZESdU8esY lZhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature :arc-authentication-results; bh=G2u8pn09is00xzAavreM8zl3ER9FjBMFqgmmkfKND18=; b=SPNVrYCFYaqxuzgkwXEu26/WAfqMet/NHq3VM/mjrlUkttZvwsyq52nNwNEkwGz+sz FQjjNuJER7wbefmDek8rKU/kCl2ji9xdXimXfxzvoo1OGNHfQHrFY6vvRKM94XLZtlXT LpzIFAfuBwVEogDP7gxSjpPoXY4fzNH/s5VjYl3QuaxYA1phodZsNz0PFivlJIpWObLp XFj0zJT0d9EvSWzdtp0OSH7GW7O+Z9lsblqDPwQCFfEK9X6k9tCFQWF6HKu04rVzB/4J SdTKz5btnK42z5So/VTzNxd+cbuo8k6mKe/UKCwc0aXWvh68IWQPRQtw0lPpGBWZw17v RoAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=KEcyuSDj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj5-v6si681717plb.732.2018.02.22.14.42.45; Thu, 22 Feb 2018 14:43:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=KEcyuSDj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751765AbeBVWlo (ORCPT + 99 others); Thu, 22 Feb 2018 17:41:44 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:35117 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbeBVWll (ORCPT ); Thu, 22 Feb 2018 17:41:41 -0500 Received: by mail-qk0-f195.google.com with SMTP id s188so8593355qkb.2; Thu, 22 Feb 2018 14:41:41 -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:mime-version :content-transfer-encoding; bh=G2u8pn09is00xzAavreM8zl3ER9FjBMFqgmmkfKND18=; b=KEcyuSDjkISiGyw7GumYX7NH9yE5oi5xrteVBbqsKqvMwy2Vix3Ih+TAoREkUZop0g E0EUuLjNSSnlISr6DxUJWPuxRKSIQVviC5EYBi4yM9poTvFl+jVTS3EjPyfQIf6lXFtc uMYYhh1tpu5QC2Yw2ssevwu8DSNq2i4wVI9TrBSFzIjLTCIbGkWzz/bugH5bPqr1bnQN 7FxXvh9AX9hZKoTeqRIBJDIjX41SoQlIa2ZYmIaNg3B6ZGBvQd2/2ktjnx5qwBS3w1HY UXauyxy33r8ZOUjK3ku9AQfRbhJIQVpRaNBLKHJSqKy++8xOrevZbuCjJ/eH3J1Vo4HZ cfJg== 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:mime-version :content-transfer-encoding; bh=G2u8pn09is00xzAavreM8zl3ER9FjBMFqgmmkfKND18=; b=s9KdnaGLHBa0hTbgB9/S1GtGS8fhZFKSy37E4+cLxMxrcXOYUVCAuz2pJgLSySEgeZ uVGGh65ex25iV1nYYAz1Ag0mYNScXZKWhnIzER7yK987AobOJcyMqQKAiSKE7iAAYOz+ KsUVD/ul+WRAtRMXVpmjKuD5Iad8Q166fDGBu3JBY/54mDZx0CjKM9+4h7SReo6khSB0 H728ifsUFP7aTW4WJ4aoo7MMR6Mfi7IgZ4PMLfVHwe5z4twjy2aQZeYnLHdizbyOgQcB am+FPhmjiBgx9cIVYd78JkW9LYWtUWzjcGLnPgPzeycYYiw/Yf+jruMFLwXE0EmXX1/O eQLA== X-Gm-Message-State: APf1xPCBSyBTHlDEUmNPlezepepWFHmvJZO2ha54RlRNW8/WD2VJcrx4 KXesGP0DS6lpLzX5liyr4jE= X-Received: by 10.55.204.71 with SMTP id r68mr13504450qki.356.1519339300823; Thu, 22 Feb 2018 14:41:40 -0800 (PST) Received: from localhost.localdomain (ool-44c001ed.dyn.optonline.net. [68.192.1.237]) by smtp.googlemail.com with ESMTPSA id n19sm790623qtk.56.2018.02.22.14.41.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 14:41:40 -0800 (PST) From: Vivek Unune Cc: Vivek Unune , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Jon Mason , bcm-kernel-feedback-list@broadcom.com, Rob Herring , Mark Rutland , Russell King , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [v2] ARM: dts: BCM5301X: Add support for Linksys EA9500 Date: Thu, 22 Feb 2018 17:38:44 -0500 Message-Id: <20180222223844.98527-1-npcomplete13@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 DSA driver and Kernel 4.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] So, I had to run following bridge command: bridge vlan add vid 1 dev extsw pvid tagged 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 usb3 phy mdio driver - Define external SW as a mdio-mii node connected to external mdio [1] https://www.spinics.net/lists/arm-kernel/msg590992.html Signed-off-by: Vivek Unune --- 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 { -- 2.9.3