Re: [PATCH] arm64: dts: renesas: r8a779f0: Disable rswitch ports by default

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

 



Hello Geert,

Thanks for your work.

On 2025-01-23 17:37:10 +0100, Geert Uytterhoeven wrote:
> The Renesas Ethernet Switch has three independent ports.  Each port can
> act as a separate interface, and can be enabled or disabled
> independently.  Currently all ports are enabled by default, hence board
> DTS files that enable the switch must disable all unused ports
> explicitly.
> 
> Disable all ports by default, and explicitly enable ports that are used,
> next to their configuration.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> This is similar to how Ethernet switch ports are handled on RZ/N1D, and
> CAN-FD channels on R-Car Gen3/4.
> 
> If accepted, I'm wondering if I should move it forward, before "[PATCH
> 3/5] arm64: dts: renesas: s4sk: Access rswitch ports via phandles"[1],
> which would become slightly simpler.

I let you and Marek figure that out, for the content of this patch.

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>

> 
> [1] https://lore.kernel.org/all/20250118111344.361617-3-marek.vasut+renesas@xxxxxxxxxxx
> ---
>  arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi | 3 +++
>  arch/arm64/boot/dts/renesas/r8a779f0.dtsi                 | 3 +++
>  arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts             | 6 ++----
>  3 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi
> index 892729786d00b36e..ad2b0398d35431a1 100644
> --- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-ethernet.dtsi
> @@ -57,6 +57,7 @@ &rswitch_port0 {
>  	phy-handle = <&u101>;
>  	phy-mode = "sgmii";
>  	phys = <&eth_serdes 0>;
> +	status = "okay";
>  
>  	mdio {
>  		#address-cells = <1>;
> @@ -75,6 +76,7 @@ &rswitch_port1 {
>  	phy-handle = <&u201>;
>  	phy-mode = "sgmii";
>  	phys = <&eth_serdes 1>;
> +	status = "okay";
>  
>  	mdio {
>  		#address-cells = <1>;
> @@ -93,6 +95,7 @@ &rswitch_port2 {
>  	phy-handle = <&u301>;
>  	phy-mode = "sgmii";
>  	phys = <&eth_serdes 2>;
> +	status = "okay";
>  
>  	mdio {
>  		#address-cells = <1>;
> diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
> index 840ba73c03f1b6f4..06be9f7720d64179 100644
> --- a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
> @@ -989,14 +989,17 @@ ethernet-ports {
>  				rswitch_port0: port@0 {
>  					reg = <0>;
>  					phys = <&eth_serdes 0>;
> +					status = "disabled";
>  				};
>  				rswitch_port1: port@1 {
>  					reg = <1>;
>  					phys = <&eth_serdes 1>;
> +					status = "disabled";
>  				};
>  				rswitch_port2: port@2 {
>  					reg = <2>;
>  					phys = <&eth_serdes 2>;
> +					status = "disabled";
>  				};
>  			};
>  		};
> diff --git a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
> index 24ecdf6e8476a945..df652e7b85c95ebe 100644
> --- a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
> @@ -187,6 +187,7 @@ &rswitch_port0 {
>  	phy-handle = <&ic99>;
>  	phy-mode = "sgmii";
>  	phys = <&eth_serdes 0>;
> +	status = "okay";
>  
>  	mdio {
>  		#address-cells = <1>;
> @@ -205,6 +206,7 @@ &rswitch_port1 {
>  	phy-handle = <&ic102>;
>  	phy-mode = "sgmii";
>  	phys = <&eth_serdes 1>;
> +	status = "okay";
>  
>  	mdio {
>  		#address-cells = <1>;
> @@ -218,10 +220,6 @@ ic102: ethernet-phy@2 {
>  	};
>  };
>  
> -&rswitch_port2 {
> -	status = "disabled";
> -};
> -
>  &rwdt {
>  	timeout-sec = <60>;
>  	status = "okay";
> -- 
> 2.43.0
> 

-- 
Kind Regards,
Niklas Söderlund




[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