Received: by 10.223.185.111 with SMTP id b44csp665768wrg; Fri, 9 Mar 2018 11:18:46 -0800 (PST) X-Google-Smtp-Source: AG47ELuP3S3NcaVqIdqPIy+Jx/ob/Xd0KV7D5r1fSZraEXdbTpEAgUxzWgfbTOcNfuijsfFVUWfD X-Received: by 2002:a17:902:22f:: with SMTP id 44-v6mr367361plc.377.1520623126177; Fri, 09 Mar 2018 11:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520623126; cv=none; d=google.com; s=arc-20160816; b=DchwmPPy105YU6uRGhkC2pbJRbiLtx3AFY73XHjEHGPKPa5ZPzy3tAKhvSnhnu12hD 8Jtk/yQabo+dWpwEqQxwSnLovQKLd+K54cHxUkbmr+2aGNSQ64fKCJJ/6/bfG7XuQYSW feIFzJvhyb9UxHgp1XhwS7b4NGIVeTCcWBLo4Z3jNA/500veOjncnM7cUR3iFTMkOndv 8OeEH9RXwPcuPt73fP41HH4H0Y29OKYSeFTg7ve8hT+Blsp9iLsDN/QvtROpa64w2pG9 GkH0Y6LAZNhOX1n47D0jRJHs8L+G33bUfJtmtM7/45GRPX8N1x4vsrlNq2MLBDkhZjEE ZrOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=O20UQRpRSBO0GrH3GHxqK53IFAOK3MeT4E8E43M/BQ0=; b=fonLp6BmsgxIm/UBfwQcbCZtq3GJDSogDDmA5VMICsBxahm5buK8mtTltP6o6Tl/iG 3aamoNKcwdqxxyDAxRZVbTdVG46wOrHgyct8KXXuG046AJtDRWgkV00HkBlQ1kKYs5vS jOT1qYV8BkyzZviMqP7yYoO1fbsK8LWzGa/Wiq/Ce4B7o4JMhOFtPqo5a3wI08mHjo8D z4DkUM5/Jz77xw4HU02iISWnwm2qVhRMy7VJn5fYARyDHyPCIyiLUbnMpF+TXfxJofzf 0KDUkAjGr4zS18wMfkoDi6wgk7w31bBdVq2rwBzJJBvolGsi8v/c5/4efS6XSCn0xjsq JPhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pIOSB5Z/; 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=pass (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 c17si1124074pgn.87.2018.03.09.11.18.30; Fri, 09 Mar 2018 11:18:46 -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=pass header.i=@gmail.com header.s=20161025 header.b=pIOSB5Z/; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932385AbeCITRf (ORCPT + 99 others); Fri, 9 Mar 2018 14:17:35 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:38339 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932074AbeCITRd (ORCPT ); Fri, 9 Mar 2018 14:17:33 -0500 Received: by mail-qt0-f193.google.com with SMTP id n12so11965529qtl.5; Fri, 09 Mar 2018 11:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=O20UQRpRSBO0GrH3GHxqK53IFAOK3MeT4E8E43M/BQ0=; b=pIOSB5Z/f+YR6CBl4Hc0SqY6O/mcGGhkrQRfz39qHDN7BGCy8LUJebK7xoMggacLsv xmJuAi3oPOfRnqNVGXepoByzLyrGGazo1j5Ij7CbMXRoL/0fqGY6lro3IxvOB2Fp37no f5oqtUAZpx8jg50n7PPEWISQAxRdH8H+auknkfAPL7UfjpfN4tFrXDDK7rMpwR7JoF6+ eVGoCyOrD1DJQS5WYCRAO5vH9z819oI+tQmZ+dZSYRSmapMS4YEjk3lHAvoBrz7Pj/nl zptEoLqImoH1H1pbSu/x795rwPgrgnXkrmOB5xECqbUzioeqPUqnqfPGZaDe9dCAfSmG REug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O20UQRpRSBO0GrH3GHxqK53IFAOK3MeT4E8E43M/BQ0=; b=V8Evgyp6PmZQkj4eBBcjf7oA/h6a37MSPBrSN1BG5aY13CKEIXae2KqHbxN9Tpllb5 rBygjZIb3Q8c4crVXo+omMg5XU50/A2At83Ol1W1bJJvHgLpPxpWeT85y168etwyLaY0 cZYndwdyi1Qu3+kpywETq1OjwY+s0+vpHs3izLY8nvEsN9ImJeXCPtXXwiLMI+bmFwxw ++oO7jI60w4RmJPQuiF6sYv/lqMEKDacAe7gs2BTdeuOVmKO2OsDGAwEpuyEToU4YXxS wu1yrjHGdcSa7zaKc8hzSQjr4Crh+yjzEgfg7B+lfawe32sb1/SouaHBqeKYFdzuRxCF +gwA== X-Gm-Message-State: AElRT7EHZpI2kQdxz1RJ9Df+XnH4L57UBpyup+CDG3iXMiF7HJVGQU3n s8WjeONXuQXZj9rLYOugLc0= X-Received: by 10.237.45.231 with SMTP id i94mr47620980qtd.29.1520623052056; Fri, 09 Mar 2018 11:17:32 -0800 (PST) Received: from [10.69.41.93] ([192.19.223.250]) by smtp.googlemail.com with ESMTPSA id m18sm308863qtn.79.2018.03.09.11.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 11:17:31 -0800 (PST) Subject: Re: [PATCH v2] ARM: dts: BCM5301X: Add support for Linksys EA9500 To: Vivek Unune , 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 Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jon Mason References: <1489590033-4946-1-git-send-email-npcomplete13@gmail.com> <20180302194155.50808-1-npcomplete13@gmail.com> From: Florian Fainelli Message-ID: <88e9d209-c45e-0e8f-53ce-4705d0b7e3c2@gmail.com> Date: Fri, 9 Mar 2018 11:17:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180302194155.50808-1-npcomplete13@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vivek, On 03/02/2018 11:41 AM, Vivek Unune wrote: > 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 Glad you got it working finally! Out of curiosity, I am assuming you have Broadcom tags enabled on the internal switch and disabled on the external BCM53125 switch, is that correct? Just a few nits below. > > 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" This sounds like an independent bugfix, can you submit that separately? > > / { > 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; > + }; > + }; None of this is wrong, but DSA effectively will take the first port specified with a "cpu" label and declare it as the one and only CPU port it supports. If the architecture on Northstar is similar to what is done on Northstar Plus, port 5 can be either internal or external PHY, port 7 is indeed gmac1, and port 8 is connected to the flow accelerator, which should be in "bypass" mode by default. We can always change that later on if we have to anyway. > + > + sw0_p0: port@0 { switch0port0 would be a nicer label and unit name to use. > + 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 { Similarly, this would be better with switch1port8? > + 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"; > }; I would probably create a separate commit which explains why yuo are relocating the USB 3.0 PHY into the mdiomux node, and then only add support for the EA9500 model. > > &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>; > - }; Same here. -- Florian