Skip to contentSkip to conversation

ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch

PATCH Applied Rafał Miłecki 2 participants 4 messages Sep 20, 2021 – Sep 21, 2021 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch

From: Rafał Miłecki <[email protected]>

BCM53573 family SoC have Ethernet switch connected to the first Ethernet controller (accessible over MDIO).

---
 arch/arm/boot/dts/bcm53573.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/bcm53573.dtsi +18 -0
index 51546fccc616..3f03a381db0f 100644
@@ -180,6 +180,24 @@ ohci_port2: port@2 {
 
 		gmac0: ethernet@5000 {
 			reg = <0x5000 0x1000>;
+
+			mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				switch: switch@1e {
+					compatible = "brcm,bcm53125";
+					reg = <0x1e>;
+
+					status = "disabled";
+
+					/* ports are defined in board DTS */
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+					};
+				};
+			};
 		};
 
 		gmac1: ethernet@b000 {
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 ARM: dts: BCM53573: Add Tenda AC9 switch ports

From: Rafał Miłecki <[email protected]>

This router has 1 WAN and 4 LAN ports.

---
 arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 37 ++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm/boot/dts/bcm47189-tenda-ac9.dts +37 -0
index 049cdfd92706..07eb3a8287d6 100644
@@ -105,3 +105,40 @@ pcie0_chipcommon: chipcommon@0 {
 		};
 	};
 };
+
+&switch {
+	status = "okay";
+
+	ports {
+		port@0 {
+			reg = <0>;
+			label = "wan";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan1";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan2";
+		};
+
+		port@3 {
+			reg = <3>;
+			label = "lan3";
+		};
+
+		port@4 {
+			reg = <4>;
+			label = "lan4";
+		};
+
+		port@5 {
+			reg = <5>;
+			label = "cpu";
+			ethernet = <&gmac0>;
+		};
+	};
+};
Signature · 1 line
2.26.2