Skip to contentSkip to conversation

ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board

PATCH Applied Florian Fainelli 3 participants 3 messages Jun 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board

Now that we have a proper binding for Ethernet switches hanging off different buses, and a driver for the BCM53125 switch, add its Device Tree as a child MDIO node, at MDIO address 30 (Broadcom pseudo-PHY address) and describe the ports layout of the Lamobo R1 board.

---
 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 60 +++++++++++++++++++++++++++++--
 1 file changed, 57 insertions(+), 3 deletions(-)
arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts +57 -3
index 5ee43d8bf174..fbca93406e1b 100644
@@ -110,13 +110,67 @@
 &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_pins_rgmii_a>;
-	phy = <&phy1>;
 	phy-mode = "rgmii";
 	phy-supply = <&reg_gmac_3v3>;
 	status = "okay";
 
-	phy1: ethernet-phy at 1 {
-		reg = <1>;
+	fixed-link {
+		speed = <1000>;
+		full-duplex;
+	};
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		switch: ethernet-switch at 1e {
+			compatible = "brcm,bcm53125";
+			reg = <30>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port0: port at 0 {
+					reg = <0>;
+					label = "lan2";
+				};
+
+				port1: port at 1 {
+					reg = <1>;
+					label = "lan3";
+				};
+
+				port2: port at 2 {
+					reg = <2>;
+					label = "lan4";
+				};
+
+				port3: port at 3 {
+					reg = <3>;
+					label = "wan";
+				};
+
+				port4: port at 4 {
+					reg = <4>;
+					label = "lan1";
+				};
+
+				port8: port at 8 {
+					reg = <8>;
+					label = "cpu";
+					ethernet = <&gmac>;
+					phy-mode = "rgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};
+			};
+		};
 	};
 };
 
Signature · 1 line
2.7.4
Acked-by on v3 1/1
#1 lore raw
Quoted 6 lines · Florian Fainelli

Now that we have a proper binding for Ethernet switches hanging off different buses, and a driver for the BCM53125 switch, add its Device Tree as a child MDIO node, at MDIO address 30 (Broadcom pseudo-PHY address) and describe the ports layout of the Lamobo R1 board.

#2 lore raw
In reply to Florian Fainelli
Quoted 6 lines · Florian Fainelli

Now that we have a proper binding for Ethernet switches hanging off different buses, and a driver for the BCM53125 switch, add its Device Tree as a child MDIO node, at MDIO address 30 (Broadcom pseudo-PHY address) and describe the ports layout of the Lamobo R1 board.

Applied, thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160628/a2b51528/attachment.sig>