netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add missing DSA properties for marvell switches
@ 2023-04-07 15:17 Andrew Lunn
  2023-04-07 15:17 ` [PATCH 1/3] ARM: dts: kirkwood: Add missing phy-mode and fixed links Andrew Lunn
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-04-07 15:17 UTC (permalink / raw)
  To: Gregory Clement
  Cc: Russell King, Vladimir Oltean, arm-soc, netdev, Andrew Lunn

The DSA core has become more picky about DT properties. This patchset
add missing properties and removes some unused ones, for Marvell ARM
boards.

Once all the missing properties are added, it should be possible to
simply phylink and the mv88e6xxx driver.

Andrew Lunn (3):
  ARM: dts: kirkwood: Add missing phy-mode and fixed links
  ARM: dts: orion5: Add missing phy-mode and fixed links
  ARM: dts: armada: Add missing phy-mode and fixed links

 arch/arm/boot/dts/armada-370-rd.dts               | 2 +-
 arch/arm/boot/dts/armada-381-netgear-gs110emx.dts | 2 +-
 arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts  | 7 ++++++-
 arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts  | 7 ++++++-
 arch/arm/boot/dts/armada-385-linksys.dtsi         | 2 +-
 arch/arm/boot/dts/armada-385-turris-omnia.dts     | 2 --
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts     | 2 +-
 arch/arm/boot/dts/kirkwood-dir665.dts             | 3 ++-
 arch/arm/boot/dts/kirkwood-l-50.dts               | 2 +-
 arch/arm/boot/dts/kirkwood-linksys-viper.dts      | 3 ++-
 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts    | 3 ++-
 arch/arm/boot/dts/kirkwood-rd88f6281.dtsi         | 2 +-
 arch/arm/boot/dts/orion5x-netgear-wnr854t.dts     | 7 ++++++-
 13 files changed, 30 insertions(+), 14 deletions(-)

-- 
2.40.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ARM: dts: kirkwood: Add missing phy-mode and fixed links
  2023-04-07 15:17 [PATCH 0/3] Add missing DSA properties for marvell switches Andrew Lunn
@ 2023-04-07 15:17 ` Andrew Lunn
  2023-04-07 15:17 ` [PATCH 2/3] ARM: dts: orion5: " Andrew Lunn
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-04-07 15:17 UTC (permalink / raw)
  To: Gregory Clement
  Cc: Russell King, Vladimir Oltean, arm-soc, netdev, Andrew Lunn

The DSA framework has got more picky about always having a phy-mode
for the CPU port. The Kirkwood Ethernet is an RGMII port. Set the
switch to impose the RGMII delays.

Additionally, the cpu label has never actually been used in the
binding, so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-dir665.dts          | 3 ++-
 arch/arm/boot/dts/kirkwood-l-50.dts            | 2 +-
 arch/arm/boot/dts/kirkwood-linksys-viper.dts   | 3 ++-
 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 3 ++-
 arch/arm/boot/dts/kirkwood-rd88f6281.dtsi      | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-dir665.dts b/arch/arm/boot/dts/kirkwood-dir665.dts
index f9f4b0143ba8..0c0851cd9bec 100644
--- a/arch/arm/boot/dts/kirkwood-dir665.dts
+++ b/arch/arm/boot/dts/kirkwood-dir665.dts
@@ -232,7 +232,7 @@ port@4 {
 
 			port@6 {
 				reg = <6>;
-				label = "cpu";
+				phy-mode = "rgmii-id";
 				ethernet = <&eth0port>;
 				fixed-link {
 					speed = <1000>;
@@ -251,6 +251,7 @@ &eth0 {
 	ethernet0-port@0 {
 		speed = <1000>;
 		duplex = <1>;
+		phy-mode = "rgmii";
 	};
 };
 
diff --git a/arch/arm/boot/dts/kirkwood-l-50.dts b/arch/arm/boot/dts/kirkwood-l-50.dts
index 60c1e94f5dd3..9fd3581bb24b 100644
--- a/arch/arm/boot/dts/kirkwood-l-50.dts
+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
@@ -254,7 +254,6 @@ fixed-link {
 
 			port@6 {
 				reg = <6>;
-				label = "cpu";
 				phy-mode = "rgmii-id";
 				ethernet = <&eth1port>;
 				fixed-link {
@@ -330,6 +329,7 @@ &eth1 {
 	ethernet1-port@0 {
 		speed = <1000>;
 		duplex = <1>;
+		phy-mode = "rgmii";
 	};
 };
 
diff --git a/arch/arm/boot/dts/kirkwood-linksys-viper.dts b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
index 2f9660f3b457..27fd6e2337d5 100644
--- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
+++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
@@ -198,7 +198,7 @@ port@4 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "rgmii-id";
 				ethernet = <&eth0port>;
 				fixed-link {
 					speed = <1000>;
@@ -221,6 +221,7 @@ &eth0 {
 	ethernet0-port@0 {
 		speed = <1000>;
 		duplex = <1>;
+		phy-mode = "rgmii";
 	};
 };
 
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
index ced576acfb95..5a77286136c7 100644
--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -149,7 +149,7 @@ port@4 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "rgmii-id";
 				ethernet = <&eth0port>;
 				fixed-link {
 					speed = <1000>;
@@ -166,6 +166,7 @@ &eth0 {
 	ethernet0-port@0 {
 		speed = <1000>;
 		duplex = <1>;
+		phy-mode = "rgmii";
 	};
 };
 
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
index e21aa674945d..9d62f910cddf 100644
--- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
+++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
@@ -105,7 +105,7 @@ port@3 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "rgmii-id";
 				ethernet = <&eth0port>;
 				fixed-link {
 					speed = <1000>;
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM: dts: orion5: Add missing phy-mode and fixed links
  2023-04-07 15:17 [PATCH 0/3] Add missing DSA properties for marvell switches Andrew Lunn
  2023-04-07 15:17 ` [PATCH 1/3] ARM: dts: kirkwood: Add missing phy-mode and fixed links Andrew Lunn
@ 2023-04-07 15:17 ` Andrew Lunn
  2023-04-07 15:17 ` [PATCH 3/3] ARM: dts: armada: " Andrew Lunn
  2023-04-07 15:30 ` [PATCH 0/3] Add missing DSA properties for marvell switches Gregory CLEMENT
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-04-07 15:17 UTC (permalink / raw)
  To: Gregory Clement
  Cc: Russell King, Vladimir Oltean, arm-soc, netdev, Andrew Lunn

The DSA framework has got more picky about always having a phy-mode
for the CPU port. The Orion5x Ethernet is an RGMII port. Set the
switch to impose the RGMII delays.

Additionally, the cpu label has never actually been used in the
binding, so remove it.

Lastly, add a fixed-link node indicating the expected speed/duplex of
the link to the SoC.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/orion5x-netgear-wnr854t.dts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/orion5x-netgear-wnr854t.dts b/arch/arm/boot/dts/orion5x-netgear-wnr854t.dts
index 4f4888ec9138..fb203e7d37f5 100644
--- a/arch/arm/boot/dts/orion5x-netgear-wnr854t.dts
+++ b/arch/arm/boot/dts/orion5x-netgear-wnr854t.dts
@@ -137,8 +137,12 @@ port@2 {
 
 			port@3 {
 				reg = <3>;
-				label = "cpu";
 				ethernet = <&ethport>;
+				phy-mode = "rgmii-id";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
 			};
 
 			port@5 {
@@ -208,6 +212,7 @@ ethernet-port@0 {
 		/* Hardwired to DSA switch */
 		speed = <1000>;
 		duplex = <1>;
+		phy-mode = "rgmii";
 	};
 };
 
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: dts: armada: Add missing phy-mode and fixed links
  2023-04-07 15:17 [PATCH 0/3] Add missing DSA properties for marvell switches Andrew Lunn
  2023-04-07 15:17 ` [PATCH 1/3] ARM: dts: kirkwood: Add missing phy-mode and fixed links Andrew Lunn
  2023-04-07 15:17 ` [PATCH 2/3] ARM: dts: orion5: " Andrew Lunn
@ 2023-04-07 15:17 ` Andrew Lunn
  2023-04-07 15:30 ` [PATCH 0/3] Add missing DSA properties for marvell switches Gregory CLEMENT
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-04-07 15:17 UTC (permalink / raw)
  To: Gregory Clement
  Cc: Russell King, Vladimir Oltean, arm-soc, netdev, Andrew Lunn

The DSA framework has got more picky about always having a phy-mode
for the CPU port. The Armada Ethernet supports RGMII, SGMII,
1000base-x and 2500Base-X. Set the switch phy-mode based on how the
SoC Ethernet ports is been configured. For RGMII mode, have the switch
add the delays.

Additionally, the cpu label has never actually been used in the
binding, so remove it.

Lastly, add a fixed-link node indicating the expected speed/duplex of
the link to the SoC.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/armada-370-rd.dts               | 2 +-
 arch/arm/boot/dts/armada-381-netgear-gs110emx.dts | 2 +-
 arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts  | 7 ++++++-
 arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts  | 7 ++++++-
 arch/arm/boot/dts/armada-385-linksys.dtsi         | 2 +-
 arch/arm/boot/dts/armada-385-turris-omnia.dts     | 2 --
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts     | 2 +-
 7 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index be005c9f42ef..2fce8e794265 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -171,8 +171,8 @@ port@3 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
 				ethernet = <&eth1>;
+				phy-mode = "rgmii-id";
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
diff --git a/arch/arm/boot/dts/armada-381-netgear-gs110emx.dts b/arch/arm/boot/dts/armada-381-netgear-gs110emx.dts
index 095df5567c93..f4c4b213ef4e 100644
--- a/arch/arm/boot/dts/armada-381-netgear-gs110emx.dts
+++ b/arch/arm/boot/dts/armada-381-netgear-gs110emx.dts
@@ -148,7 +148,7 @@ ports {
 
 			port@0 {
 				ethernet = <&eth0>;
-				label = "cpu";
+				phy-mode = "rgmii";
 				reg = <0>;
 
 				fixed-link {
diff --git a/arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts b/arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts
index c9ac630e5874..1990f7d0cc79 100644
--- a/arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts
+++ b/arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts
@@ -68,8 +68,13 @@ port@8 {
 
 			port@10 {
 				reg = <10>;
-				label = "cpu";
+				phy-mode = "2500base-x";
+
 				ethernet = <&eth1>;
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+				};
 			};
 
 		};
diff --git a/arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts b/arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts
index fa653b379490..b795ad573891 100644
--- a/arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts
+++ b/arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts
@@ -48,8 +48,13 @@ port@4 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "2500base-x";
 				ethernet = <&eth1>;
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+				};
 			};
 
 		};
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index 85e8d966f6c1..fc8216fd9f60 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -195,7 +195,7 @@ port@4 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "sgmii";
 				ethernet = <&eth2>;
 
 				fixed-link {
diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
index 0c1f238e4c30..2d8d319bec83 100644
--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
@@ -479,7 +479,6 @@ ports@4 {
 
 			ports@5 {
 				reg = <5>;
-				label = "cpu";
 				ethernet = <&eth1>;
 				phy-mode = "rgmii-id";
 
@@ -491,7 +490,6 @@ fixed-link {
 
 			ports@6 {
 				reg = <6>;
-				label = "cpu";
 				ethernet = <&eth0>;
 				phy-mode = "rgmii-id";
 
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index dbe8dfe236fb..7a0614fd0c93 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -302,7 +302,7 @@ port@4 {
 
 			port@5 {
 				reg = <5>;
-				label = "cpu";
+				phy-mode = "rgmii-id";
 				ethernet = <&eth0>;
 				fixed-link {
 					speed = <1000>;
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] Add missing DSA properties for marvell switches
  2023-04-07 15:17 [PATCH 0/3] Add missing DSA properties for marvell switches Andrew Lunn
                   ` (2 preceding siblings ...)
  2023-04-07 15:17 ` [PATCH 3/3] ARM: dts: armada: " Andrew Lunn
@ 2023-04-07 15:30 ` Gregory CLEMENT
  3 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2023-04-07 15:30 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Russell King, Vladimir Oltean, arm-soc, netdev, Andrew Lunn

Andrew Lunn <andrew@lunn.ch> writes:

> The DSA core has become more picky about DT properties. This patchset
> add missing properties and removes some unused ones, for Marvell ARM
> boards.
>
> Once all the missing properties are added, it should be possible to
> simply phylink and the mv88e6xxx driver.
>
> Andrew Lunn (3):
>   ARM: dts: kirkwood: Add missing phy-mode and fixed links
>   ARM: dts: orion5: Add missing phy-mode and fixed links
>   ARM: dts: armada: Add missing phy-mode and fixed links

Applied on mvebu/dt

(if there are comments I am still abel to fix the commit in mvebu/dt.=

Thanks,

Gregory


>
>  arch/arm/boot/dts/armada-370-rd.dts               | 2 +-
>  arch/arm/boot/dts/armada-381-netgear-gs110emx.dts | 2 +-
>  arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts  | 7 ++++++-
>  arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts  | 7 ++++++-
>  arch/arm/boot/dts/armada-385-linksys.dtsi         | 2 +-
>  arch/arm/boot/dts/armada-385-turris-omnia.dts     | 2 --
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts     | 2 +-
>  arch/arm/boot/dts/kirkwood-dir665.dts             | 3 ++-
>  arch/arm/boot/dts/kirkwood-l-50.dts               | 2 +-
>  arch/arm/boot/dts/kirkwood-linksys-viper.dts      | 3 ++-
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts    | 3 ++-
>  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi         | 2 +-
>  arch/arm/boot/dts/orion5x-netgear-wnr854t.dts     | 7 ++++++-
>  13 files changed, 30 insertions(+), 14 deletions(-)
>
> -- 
> 2.40.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-07 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 15:17 [PATCH 0/3] Add missing DSA properties for marvell switches Andrew Lunn
2023-04-07 15:17 ` [PATCH 1/3] ARM: dts: kirkwood: Add missing phy-mode and fixed links Andrew Lunn
2023-04-07 15:17 ` [PATCH 2/3] ARM: dts: orion5: " Andrew Lunn
2023-04-07 15:17 ` [PATCH 3/3] ARM: dts: armada: " Andrew Lunn
2023-04-07 15:30 ` [PATCH 0/3] Add missing DSA properties for marvell switches Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).