Skip to contentSkip to conversation

ARM: dts: BCM5301X: Change Ethernet switch management port

PATCH In review Florian Fainelli 3 participants 3 messages Feb 13, 2019 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: BCM5301X: Change Ethernet switch management port

BCM5301X has 3 Ethernet controllers: GMAC0, 1, 2 which map to ports 5, 7 and 8 respectively of the internal switch. Future changes will turn on management mode in the Ethernet switch driver (b53) which will require us to use port 8.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +8 -3
index 3fced3b7f1a8..affa9cc7422d 100644
@@ -150,10 +150,15 @@
 			label = "wan";
 		};
 
-		port@5 {
-			reg = <5>;
+		port@8 {
+			reg = <8>;
 			label = "cpu";
-			ethernet = <&gmac0>;
+			ethernet = <&gmac2>;
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
 		};
 	};
 };
Signature · 1 line
2.19.1
#1 lore raw
Quoted 23 lines · Florian Fainelli

BCM5301X has 3 Ethernet controllers: GMAC0, 1, 2 which map to ports 5, 7 and 8 respectively of the internal switch. Future changes will turn on management mode in the Ethernet switch driver (b53) which will require us to use port 8.

---
  arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +2 -2
index 3fced3b7f1a8..affa9cc7422d 100644
@@ -150,10 +150,15 @@
  			label = "wan";
  		};
 
-		port@5 {
-			reg = <5>;
+		port@8 {
+			reg = <8>;
  			label = "cpu";

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 164

Quoted 10 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +6 -1
-			ethernet = <&gmac0>;
+			ethernet = <&gmac2>;
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
  		};
  	};
  };

I'm not exactly sure how Linux switch driver works, but from DT perspective I think we should rather have *hardware* described instead of a common Linux case.

If I'm right, we should rather have all 3 switch ports described (5, 7,
8) and have Linux just use the one it needs.

#2 lore raw
Quoted 39 lines · Rafał Miłecki
Quoted 23 lines · Florian Fainelli

BCM5301X has 3 Ethernet controllers: GMAC0, 1, 2 which map to ports 5, 7 and 8 respectively of the internal switch. Future changes will turn on management mode in the Ethernet switch driver (b53) which will require us to use port 8.

---
  arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 11 ++++++++---

  1 file changed, 8 insertions(+), 3 deletions(-)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +2 -1
index 3fced3b7f1a8..affa9cc7422d 100644
@@ -150,10 +150,15 @@
               label = "wan";
           };
   -        port@5 {
-            reg = <5>;
+        port@8 {
+            reg = <8>;
               label = "cpu";

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 164

Quoted 10 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +6 -1
-            ethernet = <&gmac0>;
+            ethernet = <&gmac2>;
+
+            fixed-link {
+                speed = <1000>;
+                full-duplex;
+            };
           };
       };
   };

I'm not exactly sure how Linux switch driver works, but from DT perspective I think we should rather have *hardware* described instead of a common Linux case.

Quoted 2 lines

If I'm right, we should rather have all 3 switch ports described (5, 7,
8) and have Linux just use the one it needs.

Yes, let's do that.

Signature · 1 line
Florian