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

Christian Lamparter chunkeey at gmail.com
Wed Jun 7 12:37:12 PDT 2023


On 6/5/23 15:21, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> 
> 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 at milecki.pl>
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 at gmail.com> (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 at 18007000 {
>   
>   		status = "disabled";
>   
> -		/* ports are defined in board DTS */
>   		ports {
>   			#address-cells = <1>;
>   			#size-cells = <0>;
> +
> +			port at 0 {
> +				reg = <0>;
> +			};
> +
> +			port at 1 {
> +				reg = <1>;
> +			};
> +
> +			port at 2 {
> +				reg = <2>;
> +			};
> +
> +			port at 3 {
> +				reg = <3>;
> +			};
> +
> +			port at 4 {
> +				reg = <4>;
> +			};
> +
> +			port at 5 {
> +				reg = <5>;
> +				ethernet = <&gmac0>;
> +			};
> +
> +			port at 7 {
> +				reg = <7>;
> +				ethernet = <&gmac1>;
> +			};
> +
> +			port at 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 at 0 {
> -			reg = <0>;
>   			label = "poe";
>   		};
>   
>   		port at 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 at 0 {
> -			reg = <0>;
>   			label = "poe";
>   		};
>   
>   		port at 5 {
> -			reg = <5>;
>   			label = "cpu";
> -			ethernet = <&gmac0>;
>   
>   			fixed-link {
>   				speed = <1000>;




More information about the linux-arm-kernel mailing list