From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755364AbbE2CEO (ORCPT ); Thu, 28 May 2015 22:04:14 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:33619 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbbE2CEI (ORCPT ); Thu, 28 May 2015 22:04:08 -0400 Message-ID: <5567C915.5090808@gmail.com> Date: Thu, 28 May 2015 19:04:05 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mathieu Olivari , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, davem@davemloft.net, andrew@lunn.ch, linux@roeck-us.net, gang.chen.5i5j@gmail.com, jiri@resnulli.us, leitec@staticky.com, fabf@skynet.be, alexander.h.duyck@intel.com, pavel.nakonechny@skitlab.ru, joe@perches.com, sfeldma@gmail.com, nbd@openwrt.org, juhosg@openwrt.org CC: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 7/7] Documentation: devicetree: add ar8xxx binding References: <1432863742-18427-1-git-send-email-mathieu@codeaurora.org> <1432863742-18427-8-git-send-email-mathieu@codeaurora.org> In-Reply-To: <1432863742-18427-8-git-send-email-mathieu@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/28/15 18:42, Mathieu Olivari a écrit : > Add device-tree binding for ar8xxx switch families. > > Signed-off-by: Mathieu Olivari > --- > .../devicetree/bindings/net/dsa/qca-ar8xxx.txt | 70 ++++++++++++++++++++++ > 1 file changed, 70 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt > > diff --git a/Documentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt b/Documentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt > new file mode 100644 > index 0000000..f4fd3f1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt > @@ -0,0 +1,70 @@ > +* Qualcomm Atheros AR8xxx switch family > + > +Required properties: > + > +- compatible: should be "qca,ar8xxx" > +- dsa,mii-bus: phandle to the MDIO bus controller, see dsa/dsa.txt > +- dsa,ethernet: phandle to the CPU network interface controller, see dsa/dsa.txt > +- #size-cells: must be 0 > +- #address-cells: must be 2, see dsa/dsa.txt > + > +Subnodes: > + > +The integrated switch subnode should be specified according to the binding > +described in dsa/dsa.txt. > + > +Optional properties: > + > +- qca,port6-phy-mode: if specified, the driver will configure Port 6 in the > + given phy-mode. See Documentation/devicetree/bindings/net/ethernet.txt for > + the list of valid phy-mode. Is there a reason why this is a custom property and not a standard "phy-mode" property here such that you could utilize of_get_phy_mode() with this directly? > + > +- qca,port6-phy-id: if specified, the driver will connect Port 6 to the PHY > + given as a parameter. In this case, Port6 and the corresponding PHY will be > + isolated from the rest of the switch. From a system perspective, they will > + act as a regular PHY. Same here, is there a reason why this is not a "phy-handle" property to a PHY node that sits on a (potentially different) MDIO bus? > + > +Example: > + > + dsa@0 { > + compatible = "qca,ar8xxx"; > + #address-cells = <2>; > + #size-cells = <0>; > + > + dsa,ethernet = <ðernet0>; > + dsa,mii-bus = <&mii_bus0>; > + > + switch@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0 0>; /* MDIO address 0, switch 0 in tree */ > + > + qca,port6-phy-mode = "sgmii"; > + qca,port6-phy-id = <4>; > + > + port@0 { > + reg = <11>; > + label = "cpu"; > + }; > + > + port@1 { > + reg = <0>; > + label = "lan1"; > + }; > + > + port@2 { > + reg = <1>; > + label = "lan2"; > + }; > + > + port@3 { > + reg = <2>; > + label = "lan3"; > + }; > + > + port@4 { > + reg = <3>; > + label = "lan4"; > + }; > + }; > + }; > -- Florian