Re: [PATCH] ARM: dts: BCM5301X: Describe switch ports in the main DTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/5/23 15:21, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>

All Northstar SoCs have BCM5301x switches (BCM53011, BCM53012) with 8
ports (0-8 without 6). By design 3 switch ports (5, 7 and 8) are
hardwired to 3 on-SoC Ethernet interfaces. Switch port 8 requires
forcing link state.

It seems that global Northstar .dtsi file is the best place to describe
those hw details. Only device specific bits (like labels) should go to
device .dts files.

This seems to fit well with a tiny exception of Asus RT-AC88U which
somehow was designed to have switch 5 connected to an extra switch. This
case was simply handled with a /delete-property/.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
No, I was wrong. Both the MR26 and MR32 use the Gbit PHY integrated into
the SoCs. There is no extra PHY chip to be found anywhere on the PCBs.
phytool does confirm this.

# mr26 + mr32 outputs are indentical.
| $ phytool poe/0
| ieee-phy: id:0x600d8760
| ieee-phy: reg:BMCR(0x00) val:0x1140
|  flags:          -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
|  speed:          1000-full
|
| ieee-phy: reg:BMSR(0x01) val:0x79ed
|  capabilities:   -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
|  flags:          +ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber +ext-register

Reviewed-by: Christian Lamparter <chunkeey@xxxxxxxxx> (MR32+MR26)

Thank you!
---

  arch/arm/boot/dts/bcm53015-meraki-mr26.dts    |  3 --
  arch/arm/boot/dts/bcm53016-meraki-mr32.dts    |  3 --
  22 files changed, 51 insertions(+), 163 deletions(-)

diff --git a/arch/arm/boot/dts/bcm-ns.dtsi b/arch/arm/boot/dts/bcm-ns.dtsi
index 43d670746f05..dae9c47ace76 100644
--- a/arch/arm/boot/dts/bcm-ns.dtsi
+++ b/arch/arm/boot/dts/bcm-ns.dtsi
@@ -313,10 +313,49 @@ srab: ethernet-switch@18007000 {
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@5 {
+				reg = <5>;
+				ethernet = <&gmac0>;
+			};
+
+			port@7 {
+				reg = <7>;
+				ethernet = <&gmac1>;
+			};
+
+			port@8 {
+				reg = <8>;
+				ethernet = <&gmac2>;
+
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
  		};
  	};
diff --git a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
index 071f2cb97251..24ba467c67b9 100644
--- a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
+++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
@@ -115,14 +115,11 @@ &srab {
ports {
  		port@0 {
-			reg = <0>;
  			label = "poe";
  		};
port@5 {
-			reg = <5>;
  			label = "cpu";
-			ethernet = <&gmac0>;
fixed-link {
  				speed = <1000>;
diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
index 46c2c93b01d8..559d6c371d67 100644
--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
@@ -176,14 +176,11 @@ &srab {
ports {
  		port@0 {
-			reg = <0>;
  			label = "poe";
  		};
port@5 {
-			reg = <5>;
  			label = "cpu";
-			ethernet = <&gmac0>;
fixed-link {
  				speed = <1000>;




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux