Message ID | c4688de8e3289ad82c2cd85f0893eac660ac8890.1737649969.git.geert+renesas@glider.be (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | arm64: dts: renesas: r8a779f0: Disable rswitch ports by default | expand |
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@glider.be> > --- > 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@ragnatech.se> > > [1] https://lore.kernel.org/all/20250118111344.361617-3-marek.vasut+renesas@mailbox.org > --- > 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 = <ð_serdes 0>; > + status = "okay"; > > mdio { > #address-cells = <1>; > @@ -75,6 +76,7 @@ &rswitch_port1 { > phy-handle = <&u201>; > phy-mode = "sgmii"; > phys = <ð_serdes 1>; > + status = "okay"; > > mdio { > #address-cells = <1>; > @@ -93,6 +95,7 @@ &rswitch_port2 { > phy-handle = <&u301>; > phy-mode = "sgmii"; > phys = <ð_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 = <ð_serdes 0>; > + status = "disabled"; > }; > rswitch_port1: port@1 { > reg = <1>; > phys = <ð_serdes 1>; > + status = "disabled"; > }; > rswitch_port2: port@2 { > reg = <2>; > phys = <ð_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 = <ð_serdes 0>; > + status = "okay"; > > mdio { > #address-cells = <1>; > @@ -205,6 +206,7 @@ &rswitch_port1 { > phy-handle = <&ic102>; > phy-mode = "sgmii"; > phys = <ð_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 >
On 1/23/25 5:37 PM, 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@glider.be> > --- > 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. > > [1] https://lore.kernel.org/all/20250118111344.361617-3-marek.vasut+renesas@mailbox.org Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> I don't mind either ordering, but please keep in mind that 5/5 in [1] has Fixes: tag and it is already overloading that tag by pulling in most of the series as dependencies .
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 = <ð_serdes 0>; + status = "okay"; mdio { #address-cells = <1>; @@ -75,6 +76,7 @@ &rswitch_port1 { phy-handle = <&u201>; phy-mode = "sgmii"; phys = <ð_serdes 1>; + status = "okay"; mdio { #address-cells = <1>; @@ -93,6 +95,7 @@ &rswitch_port2 { phy-handle = <&u301>; phy-mode = "sgmii"; phys = <ð_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 = <ð_serdes 0>; + status = "disabled"; }; rswitch_port1: port@1 { reg = <1>; phys = <ð_serdes 1>; + status = "disabled"; }; rswitch_port2: port@2 { reg = <2>; phys = <ð_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 = <ð_serdes 0>; + status = "okay"; mdio { #address-cells = <1>; @@ -205,6 +206,7 @@ &rswitch_port1 { phy-handle = <&ic102>; phy-mode = "sgmii"; phys = <ð_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";
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@glider.be> --- 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. [1] https://lore.kernel.org/all/20250118111344.361617-3-marek.vasut+renesas@mailbox.org --- 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(-)