From: Oleksij Rempel <o.rempel@pengutronix.de> To: Andrew Lunn <andrew@lunn.ch>, Chris Snook <chris.snook@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, James Hogan <jhogan@kernel.org>, Jay Cliburn <jcliburn@gmail.com>, Mark Rutland <mark.rutland@arm.com>, Paul Burton <paul.burton@mips.com>, Ralf Baechle <ralf@linux-mips.org>, Rob Herring <robh+dt@kernel.org>, Vivien Didelot <vivien.didelot@gmail.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, Russell King <linux@armlinux.org.uk> Subject: [PATCH v5 2/5] dt-bindings: net: dsa: qca,ar9331 switch documentation Date: Mon, 16 Dec 2019 08:44:00 +0100 [thread overview] Message-ID: <20191216074403.313-3-o.rempel@pengutronix.de> (raw) In-Reply-To: <20191216074403.313-1-o.rempel@pengutronix.de> Atheros AR9331 has built-in 5 port switch. The switch can be configured to use all 5 or 4 ports. One of built-in PHYs can be used by first built-in ethernet controller or to be used directly by the switch over second ethernet controller. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- .../devicetree/bindings/net/dsa/ar9331.txt | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/ar9331.txt diff --git a/Documentation/devicetree/bindings/net/dsa/ar9331.txt b/Documentation/devicetree/bindings/net/dsa/ar9331.txt new file mode 100644 index 000000000000..3d7b346c029a --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/ar9331.txt @@ -0,0 +1,148 @@ +Atheros AR9331 built-in switch +============================= + +It is a switch built-in to Atheros AR9331 WiSoC and addressable over internal +MDIO bus. All PHYs are built-in as well. + +Required properties: + + - compatible: should be: "qca,ar9331-switch" + - reg: Address on the MII bus for the switch. + - resets : Must contain an entry for each entry in reset-names. + - reset-names : Must include the following entries: "switch" + - interrupt-parent: Phandle to the parent interrupt controller + - interrupts: IRQ line for the switch + - interrupt-controller: Indicates the switch is itself an interrupt + controller. This is used for the PHY interrupts. + - #interrupt-cells: must be 1 + - mdio: Container of PHY and devices on the switches MDIO bus. + +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional +required and optional properties. +Examples: + +eth0: ethernet@19000000 { + compatible = "qca,ar9330-eth"; + reg = <0x19000000 0x200>; + interrupts = <4>; + + resets = <&rst 9>, <&rst 22>; + reset-names = "mac", "mdio"; + clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; + clock-names = "eth", "mdio"; + + phy-mode = "mii"; + phy-handle = <&phy_port4>; +}; + +eth1: ethernet@1a000000 { + compatible = "qca,ar9330-eth"; + reg = <0x1a000000 0x200>; + interrupts = <5>; + resets = <&rst 13>, <&rst 23>; + reset-names = "mac", "mdio"; + clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; + clock-names = "eth", "mdio"; + + phy-mode = "gmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch10: switch@10 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "qca,ar9331-switch"; + reg = <0x10>; + resets = <&rst 8>; + reset-names = "switch"; + + interrupt-parent = <&miscintc>; + interrupts = <12>; + + interrupt-controller; + #interrupt-cells = <1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + switch_port0: port@0 { + reg = <0x0>; + label = "cpu"; + ethernet = <ð1>; + + phy-mode = "gmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + switch_port1: port@1 { + reg = <0x1>; + phy-handle = <&phy_port0>; + phy-mode = "internal"; + }; + + switch_port2: port@2 { + reg = <0x2>; + phy-handle = <&phy_port1>; + phy-mode = "internal"; + }; + + switch_port3: port@3 { + reg = <0x3>; + phy-handle = <&phy_port2>; + phy-mode = "internal"; + }; + + switch_port4: port@4 { + reg = <0x4>; + phy-handle = <&phy_port3>; + phy-mode = "internal"; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + interrupt-parent = <&switch10>; + + phy_port0: phy@0 { + reg = <0x0>; + interrupts = <0>; + }; + + phy_port1: phy@1 { + reg = <0x1>; + interrupts = <0>; + }; + + phy_port2: phy@2 { + reg = <0x2>; + interrupts = <0>; + }; + + phy_port3: phy@3 { + reg = <0x3>; + interrupts = <0>; + }; + + phy_port4: phy@4 { + reg = <0x4>; + interrupts = <0>; + }; + }; + }; + }; +}; -- 2.24.0
next prev parent reply other threads:[~2019-12-16 7:44 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-16 7:43 [PATCH v5 0/5] add dsa switch support for ar9331 Oleksij Rempel 2019-12-16 7:43 ` [PATCH v5 1/5] net: ag71xx: port to phylink Oleksij Rempel 2019-12-16 7:44 ` Oleksij Rempel [this message] 2019-12-17 8:48 ` [PATCH v5 2/5] dt-bindings: net: dsa: qca,ar9331 switch documentation Andrew Lunn 2019-12-16 7:44 ` [PATCH v5 3/5] MIPS: ath79: ar9331: add ar9331-switch node Oleksij Rempel 2019-12-17 8:49 ` Andrew Lunn 2019-12-16 7:44 ` [PATCH v5 4/5] net: dsa: add support for Atheros AR9331 TAG format Oleksij Rempel 2019-12-16 16:51 ` Vivien Didelot 2019-12-16 7:44 ` [PATCH v5 5/5] net: dsa: add support for Atheros AR9331 built-in switch Oleksij Rempel 2019-12-16 17:09 ` Vivien Didelot 2019-12-17 8:55 ` Andrew Lunn 2019-12-17 3:20 ` [PATCH v5 0/5] add dsa switch support for ar9331 David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191216074403.313-3-o.rempel@pengutronix.de \ --to=o.rempel@pengutronix.de \ --cc=andrew@lunn.ch \ --cc=chris.snook@gmail.com \ --cc=davem@davemloft.net \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=jcliburn@gmail.com \ --cc=jhogan@kernel.org \ --cc=kernel@pengutronix.de \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mips@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=mark.rutland@arm.com \ --cc=netdev@vger.kernel.org \ --cc=paul.burton@mips.com \ --cc=ralf@linux-mips.org \ --cc=robh+dt@kernel.org \ --cc=vivien.didelot@gmail.com \ --subject='Re: [PATCH v5 2/5] dt-bindings: net: dsa: qca,ar9331 switch documentation' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).