Skip to contentSkip to conversation

ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port

PATCH Applied Rafał Miłecki 2 participants 6 messages Jul 23, 2023 – Jul 28, 2023

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

PATCH 1/3 ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port

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

Primary Ethernet interface is connected to the port 8 (not 5).

Fixes 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports")
---
 arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts +2 -2
index dab2e5f63a72..06b1a582809c 100644
@@ -135,8 +135,8 @@ port@4 {
 			label = "lan4";
 		};
 
-		port@5 {
-			reg = <5>;
+		port@8 {
+			reg = <8>;
 			label = "cpu";
 			ethernet = <&gmac0>;
 		};
Signature · 1 line
2.35.3
#1 lore raw

PATCH 2/3 ARM: dts: BCM53573: Describe BCM53125 switch ports in the main DTS

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

BCM53125 always has 5 ports with GPHYs (for LAN/WAN ports) and 2 IMP ports. It seems the best place to describe that in the main .dtsi. Device specific bits can go to device .dts files. This will help avoiding some code duplication.

---
 .../boot/dts/broadcom/bcm47189-tenda-ac9.dts  |  7 -----
 arch/arm/boot/dts/broadcom/bcm53573.dtsi      | 26 ++++++++++++++++++-
 2 files changed, 25 insertions(+), 8 deletions(-)
arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts +0 -7
index 06b1a582809c..3ac6cac541ca 100644
@@ -111,34 +111,27 @@ &switch {
 
 	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@8 {
-			reg = <8>;
 			label = "cpu";
-			ethernet = <&gmac0>;
 		};
 	};
 };
arch/arm/boot/dts/broadcom/bcm53573.dtsi +25 -1
index eed1a6147f0b..083304736fb3 100644
@@ -192,10 +192,34 @@ switch: switch@1e {
 
 					status = "disabled";
 
-					/* ports are defined in board DTS */
 					ports {
 						#address-cells = <1>;
 						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+						};
+
+						port@1 {
+							reg = <1>;
+						};
+
+						port@2 {
+							reg = <2>;
+						};
+
+						port@3 {
+							reg = <3>;
+						};
+
+						port@4 {
+							reg = <4>;
+						};
+
+						port@8 {
+							reg = <8>;
+							ethernet = <&gmac0>;
+						};
 					};
 				};
 			};
Signature · 1 line
2.35.3
maintainer Applied
#2 lore raw

Re: [PATCH 2/3] ARM: dts: BCM53573: Describe BCM53125 switch ports in the main DTS

From: Florian Fainelli <[email protected]>

Quoted 9 lines · Rafał Miłecki

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

BCM53125 always has 5 ports with GPHYs (for LAN/WAN ports) and 2 IMP ports. It seems the best place to describe that in the main .dtsi. Device specific bits can go to device .dts files. This will help avoiding some code duplication.

---

Applied to https://github.com/Broadcom/stblinux/commits/master, thanks! --
Florian

#3 lore raw

PATCH 3/3 ARM: dts: BCM53573: Add BCM53125 switch port 5

In reply to Rafał Miłecki

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

It's connected to the extra Ethernet interface.

---
 arch/arm/boot/dts/broadcom/bcm53573.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/broadcom/bcm53573.dtsi +10 -0
index 083304736fb3..10d0fe76ee3c 100644
@@ -216,6 +216,16 @@ port@4 {
 							reg = <4>;
 						};
 
+						port@5 {
+							reg = <5>;
+							ethernet = <&gmac1>;
+
+							fixed-link {
+								speed = <1000>;
+								full-duplex;
+							};
+						};
+
 						port@8 {
 							reg = <8>;
 							ethernet = <&gmac0>;
Signature · 1 line
2.35.3