[PATCH AUTOSEL 6.7 078/108] ARM: dts: marvell: Fix some common switch mistakes

Sasha Levin sashal at kernel.org
Tue Jan 16 11:39:44 PST 2024


From: Linus Walleij <linus.walleij at linaro.org>

[ Upstream commit 6e75ac5a824e1551764cd4bfce5ede3d5fafc407 ]

Fix some errors in the Marvell MV88E6xxx switch descriptions:
- The top node had no address size or cells.
- switch0 at 0 is not OK, should be ethernet-switch at 0.
- The ports node should be named ethernet-ports
- The ethernet-ports node should have port at 0 etc children, no
  plural "ports" in the children.
- Ports should be named ethernet-port at 0 etc
- PHYs should be named ethernet-phy at 0 etc

This serves as an example of fixes needed for introducing a
schema for the bindings, but the patch can simply be applied.

Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
 arch/arm/boot/dts/marvell/armada-370-rd.dts   | 24 +++++-----
 .../marvell/armada-381-netgear-gs110emx.dts   | 44 +++++++++----------
 .../marvell/armada-385-clearfog-gtr-l8.dts    | 38 ++++++++--------
 .../marvell/armada-385-clearfog-gtr-s4.dts    | 22 +++++-----
 .../boot/dts/marvell/armada-385-linksys.dtsi  | 18 ++++----
 .../dts/marvell/armada-385-turris-omnia.dts   | 20 ++++-----
 .../boot/dts/marvell/armada-388-clearfog.dts  | 20 ++++-----
 .../dts/marvell/armada-xp-linksys-mamba.dts   | 18 ++++----
 8 files changed, 96 insertions(+), 108 deletions(-)

diff --git a/arch/arm/boot/dts/marvell/armada-370-rd.dts b/arch/arm/boot/dts/marvell/armada-370-rd.dts
index b459a670f615..1b241da11e94 100644
--- a/arch/arm/boot/dts/marvell/armada-370-rd.dts
+++ b/arch/arm/boot/dts/marvell/armada-370-rd.dts
@@ -149,39 +149,37 @@ led at 0 {
 		};
 	};
 
-	switch: switch at 10 {
+	switch: ethernet-switch at 10 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0x10>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 0 {
+			ethernet-port at 0 {
 				reg = <0>;
 				label = "lan0";
 			};
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan1";
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan2";
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan3";
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				ethernet = <&eth1>;
 				phy-mode = "rgmii-id";
@@ -196,25 +194,25 @@ mdio {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switchphy0: switchphy at 0 {
+			switchphy0: ethernet-phy at 0 {
 				reg = <0>;
 				interrupt-parent = <&switch>;
 				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			switchphy1: switchphy at 1 {
+			switchphy1: ethernet-phy at 1 {
 				reg = <1>;
 				interrupt-parent = <&switch>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			switchphy2: switchphy at 2 {
+			switchphy2: ethernet-phy at 2 {
 				reg = <2>;
 				interrupt-parent = <&switch>;
 				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			switchphy3: switchphy at 3 {
+			switchphy3: ethernet-phy at 3 {
 				reg = <3>;
 				interrupt-parent = <&switch>;
 				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts b/arch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts
index f4c4b213ef4e..5baf83e5253d 100644
--- a/arch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts
+++ b/arch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts
@@ -77,51 +77,49 @@ &mdio {
 	pinctrl-0 = <&mdio_pins>;
 	status = "okay";
 
-	switch at 0 {
+	ethernet-switch at 0 {
 		compatible = "marvell,mv88e6190";
-		#address-cells = <1>;
 		#interrupt-cells = <2>;
 		interrupt-controller;
 		interrupt-parent = <&gpio1>;
 		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
 		pinctrl-0 = <&switch_interrupt_pins>;
 		pinctrl-names = "default";
-		#size-cells = <0>;
 		reg = <0>;
 
 		mdio {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switch0phy1: switch0phy1 at 1 {
+			switch0phy1: ethernet-phy at 1 {
 				reg = <0x1>;
 			};
 
-			switch0phy2: switch0phy2 at 2 {
+			switch0phy2: ethernet-phy at 2 {
 				reg = <0x2>;
 			};
 
-			switch0phy3: switch0phy3 at 3 {
+			switch0phy3: ethernet-phy at 3 {
 				reg = <0x3>;
 			};
 
-			switch0phy4: switch0phy4 at 4 {
+			switch0phy4: ethernet-phy at 4 {
 				reg = <0x4>;
 			};
 
-			switch0phy5: switch0phy5 at 5 {
+			switch0phy5: ethernet-phy at 5 {
 				reg = <0x5>;
 			};
 
-			switch0phy6: switch0phy6 at 6 {
+			switch0phy6: ethernet-phy at 6 {
 				reg = <0x6>;
 			};
 
-			switch0phy7: switch0phy7 at 7 {
+			switch0phy7: ethernet-phy at 7 {
 				reg = <0x7>;
 			};
 
-			switch0phy8: switch0phy8 at 8 {
+			switch0phy8: ethernet-phy at 8 {
 				reg = <0x8>;
 			};
 		};
@@ -142,11 +140,11 @@ phy2: ethernet-phy at c {
 			};
 		};
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 0 {
+			ethernet-port at 0 {
 				ethernet = <&eth0>;
 				phy-mode = "rgmii";
 				reg = <0>;
@@ -158,55 +156,55 @@ fixed-link {
 				};
 			};
 
-			port at 1 {
+			ethernet-port at 1 {
 				label = "lan1";
 				phy-handle = <&switch0phy1>;
 				reg = <1>;
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				label = "lan2";
 				phy-handle = <&switch0phy2>;
 				reg = <2>;
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				label = "lan3";
 				phy-handle = <&switch0phy3>;
 				reg = <3>;
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				label = "lan4";
 				phy-handle = <&switch0phy4>;
 				reg = <4>;
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				label = "lan5";
 				phy-handle = <&switch0phy5>;
 				reg = <5>;
 			};
 
-			port at 6 {
+			ethernet-port at 6 {
 				label = "lan6";
 				phy-handle = <&switch0phy6>;
 				reg = <6>;
 			};
 
-			port at 7 {
+			ethernet-port at 7 {
 				label = "lan7";
 				phy-handle = <&switch0phy7>;
 				reg = <7>;
 			};
 
-			port at 8 {
+			ethernet-port at 8 {
 				label = "lan8";
 				phy-handle = <&switch0phy8>;
 				reg = <8>;
 			};
 
-			port at 9 {
+			ethernet-port at 9 {
 				/* 88X3310P external phy */
 				label = "lan9";
 				phy-handle = <&phy1>;
@@ -214,7 +212,7 @@ port at 9 {
 				reg = <9>;
 			};
 
-			port at a {
+			ethernet-port at a {
 				/* 88X3310P external phy */
 				label = "lan10";
 				phy-handle = <&phy2>;
diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
index 1990f7d0cc79..1707d1b01545 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
@@ -7,66 +7,66 @@ / {
 };
 
 &mdio {
-	switch0: switch0 at 4 {
+	switch0: ethernet-switch at 4 {
 		compatible = "marvell,mv88e6190";
 		reg = <4>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&cf_gtr_switch_reset_pins>;
 		reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan8";
 				phy-handle = <&switch0phy0>;
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan7";
 				phy-handle = <&switch0phy1>;
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan6";
 				phy-handle = <&switch0phy2>;
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "lan5";
 				phy-handle = <&switch0phy3>;
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				label = "lan4";
 				phy-handle = <&switch0phy4>;
 			};
 
-			port at 6 {
+			ethernet-port at 6 {
 				reg = <6>;
 				label = "lan3";
 				phy-handle = <&switch0phy5>;
 			};
 
-			port at 7 {
+			ethernet-port at 7 {
 				reg = <7>;
 				label = "lan2";
 				phy-handle = <&switch0phy6>;
 			};
 
-			port at 8 {
+			ethernet-port at 8 {
 				reg = <8>;
 				label = "lan1";
 				phy-handle = <&switch0phy7>;
 			};
 
-			port at 10 {
+			ethernet-port at 10 {
 				reg = <10>;
 				phy-mode = "2500base-x";
 
@@ -83,35 +83,35 @@ mdio {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switch0phy0: switch0phy0 at 1 {
+			switch0phy0: ethernet-phy at 1 {
 				reg = <0x1>;
 			};
 
-			switch0phy1: switch0phy1 at 2 {
+			switch0phy1: ethernet-phy at 2 {
 				reg = <0x2>;
 			};
 
-			switch0phy2: switch0phy2 at 3 {
+			switch0phy2: ethernet-phy at 3 {
 				reg = <0x3>;
 			};
 
-			switch0phy3: switch0phy3 at 4 {
+			switch0phy3: ethernet-phy at 4 {
 				reg = <0x4>;
 			};
 
-			switch0phy4: switch0phy4 at 5 {
+			switch0phy4: ethernet-phy at 5 {
 				reg = <0x5>;
 			};
 
-			switch0phy5: switch0phy5 at 6 {
+			switch0phy5: ethernet-phy at 6 {
 				reg = <0x6>;
 			};
 
-			switch0phy6: switch0phy6 at 7 {
+			switch0phy6: ethernet-phy at 7 {
 				reg = <0x7>;
 			};
 
-			switch0phy7: switch0phy7 at 8 {
+			switch0phy7: ethernet-phy at 8 {
 				reg = <0x8>;
 			};
 		};
diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
index b795ad573891..a7678a784c18 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
@@ -11,42 +11,42 @@ &sfp0 {
 };
 
 &mdio {
-	switch0: switch0 at 4 {
+	switch0: ethernet-switch at 4 {
 		compatible = "marvell,mv88e6085";
 		reg = <4>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&cf_gtr_switch_reset_pins>;
 		reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan2";
 				phy-handle = <&switch0phy0>;
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan1";
 				phy-handle = <&switch0phy1>;
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan4";
 				phy-handle = <&switch0phy2>;
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "lan3";
 				phy-handle = <&switch0phy3>;
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				phy-mode = "2500base-x";
 				ethernet = <&eth1>;
@@ -63,19 +63,19 @@ mdio {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switch0phy0: switch0phy0 at 11 {
+			switch0phy0: ethernet-phy at 11 {
 				reg = <0x11>;
 			};
 
-			switch0phy1: switch0phy1 at 12 {
+			switch0phy1: ethernet-phy at 12 {
 				reg = <0x12>;
 			};
 
-			switch0phy2: switch0phy2 at 13 {
+			switch0phy2: ethernet-phy at 13 {
 				reg = <0x13>;
 			};
 
-			switch0phy3: switch0phy3 at 14 {
+			switch0phy3: ethernet-phy at 14 {
 				reg = <0x14>;
 			};
 		};
diff --git a/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi b/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
index fc8216fd9f60..4116ed60f709 100644
--- a/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
@@ -158,42 +158,40 @@ nand: nand at 0 {
 &mdio {
 	status = "okay";
 
-	switch at 0 {
+	ethernet-switch at 0 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 0 {
+			ethernet-port at 0 {
 				reg = <0>;
 				label = "lan4";
 			};
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan3";
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan2";
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan1";
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "wan";
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				phy-mode = "sgmii";
 				ethernet = <&eth2>;
diff --git a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
index 2d8d319bec83..7b755bb4e4e7 100644
--- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
@@ -435,12 +435,10 @@ phy1: ethernet-phy at 1 {
 	};
 
 	/* Switch MV88E6176 at address 0x10 */
-	switch at 10 {
+	ethernet-switch at 10 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&swint_pins>;
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 
 		dsa,member = <0 0>;
 		reg = <0x10>;
@@ -448,36 +446,36 @@ switch at 10 {
 		interrupt-parent = <&gpio1>;
 		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			ports at 0 {
+			ethernet-port at 0 {
 				reg = <0>;
 				label = "lan0";
 			};
 
-			ports at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan1";
 			};
 
-			ports at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan2";
 			};
 
-			ports at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan3";
 			};
 
-			ports at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "lan4";
 			};
 
-			ports at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				ethernet = <&eth1>;
 				phy-mode = "rgmii-id";
@@ -488,7 +486,7 @@ fixed-link {
 				};
 			};
 
-			ports at 6 {
+			ethernet-port at 6 {
 				reg = <6>;
 				ethernet = <&eth0>;
 				phy-mode = "rgmii-id";
diff --git a/arch/arm/boot/dts/marvell/armada-388-clearfog.dts b/arch/arm/boot/dts/marvell/armada-388-clearfog.dts
index 32c569df142f..3290ccad2374 100644
--- a/arch/arm/boot/dts/marvell/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-clearfog.dts
@@ -92,44 +92,42 @@ pcie2-0-w-disable-hog {
 &mdio {
 	status = "okay";
 
-	switch at 4 {
+	ethernet-switch at 4 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <4>;
 		pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
 		pinctrl-names = "default";
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 0 {
+			ethernet-port at 0 {
 				reg = <0>;
 				label = "lan5";
 			};
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan4";
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan3";
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan2";
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "lan1";
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				ethernet = <&eth1>;
 				phy-mode = "1000base-x";
@@ -140,7 +138,7 @@ fixed-link {
 				};
 			};
 
-			port at 6 {
+			ethernet-port at 6 {
 				/* 88E1512 external phy */
 				reg = <6>;
 				label = "lan6";
diff --git a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
index 7a0614fd0c93..ea859f7ea042 100644
--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
@@ -265,42 +265,40 @@ flash at 0 {
 &mdio {
 	status = "okay";
 
-	switch at 0 {
+	ethernet-switch at 0 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 
-		ports {
+		ethernet-ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			port at 0 {
+			ethernet-port at 0 {
 				reg = <0>;
 				label = "lan4";
 			};
 
-			port at 1 {
+			ethernet-port at 1 {
 				reg = <1>;
 				label = "lan3";
 			};
 
-			port at 2 {
+			ethernet-port at 2 {
 				reg = <2>;
 				label = "lan2";
 			};
 
-			port at 3 {
+			ethernet-port at 3 {
 				reg = <3>;
 				label = "lan1";
 			};
 
-			port at 4 {
+			ethernet-port at 4 {
 				reg = <4>;
 				label = "internet";
 			};
 
-			port at 5 {
+			ethernet-port at 5 {
 				reg = <5>;
 				phy-mode = "rgmii-id";
 				ethernet = <&eth0>;
-- 
2.43.0




More information about the linux-arm-kernel mailing list