Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: marvell: Fix some common switch mistakes

Fix some errors in the Marvell MV88E6xxx switch descriptions:
- The top node had no address size or cells.
- switch0@0 is not OK, should be ethernet-switch@0.
- The ports node should be named ethernet-ports
- The ethernet-ports node should have port@0 etc children, no
plural "ports" in the children.
- Ports should be named ethernet-port@0 etc
- PHYs should be named ethernet-phy@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@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>

authored by

Linus Walleij and committed by
Gregory CLEMENT
6e75ac5a b85ea95d

+96 -108
+11 -13
arch/arm/boot/dts/marvell/armada-370-rd.dts
··· 149 149 }; 150 150 }; 151 151 152 - switch: switch@10 { 152 + switch: ethernet-switch@10 { 153 153 compatible = "marvell,mv88e6085"; 154 - #address-cells = <1>; 155 - #size-cells = <0>; 156 154 reg = <0x10>; 157 155 interrupt-controller; 158 156 #interrupt-cells = <2>; 159 157 160 - ports { 158 + ethernet-ports { 161 159 #address-cells = <1>; 162 160 #size-cells = <0>; 163 161 164 - port@0 { 162 + ethernet-port@0 { 165 163 reg = <0>; 166 164 label = "lan0"; 167 165 }; 168 166 169 - port@1 { 167 + ethernet-port@1 { 170 168 reg = <1>; 171 169 label = "lan1"; 172 170 }; 173 171 174 - port@2 { 172 + ethernet-port@2 { 175 173 reg = <2>; 176 174 label = "lan2"; 177 175 }; 178 176 179 - port@3 { 177 + ethernet-port@3 { 180 178 reg = <3>; 181 179 label = "lan3"; 182 180 }; 183 181 184 - port@5 { 182 + ethernet-port@5 { 185 183 reg = <5>; 186 184 ethernet = <&eth1>; 187 185 phy-mode = "rgmii-id"; ··· 194 196 #address-cells = <1>; 195 197 #size-cells = <0>; 196 198 197 - switchphy0: switchphy@0 { 199 + switchphy0: ethernet-phy@0 { 198 200 reg = <0>; 199 201 interrupt-parent = <&switch>; 200 202 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 201 203 }; 202 204 203 - switchphy1: switchphy@1 { 205 + switchphy1: ethernet-phy@1 { 204 206 reg = <1>; 205 207 interrupt-parent = <&switch>; 206 208 interrupts = <1 IRQ_TYPE_LEVEL_HIGH>; 207 209 }; 208 210 209 - switchphy2: switchphy@2 { 211 + switchphy2: ethernet-phy@2 { 210 212 reg = <2>; 211 213 interrupt-parent = <&switch>; 212 214 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; 213 215 }; 214 216 215 - switchphy3: switchphy@3 { 217 + switchphy3: ethernet-phy@3 { 216 218 reg = <3>; 217 219 interrupt-parent = <&switch>; 218 220 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+21 -23
arch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts
··· 77 77 pinctrl-0 = <&mdio_pins>; 78 78 status = "okay"; 79 79 80 - switch@0 { 80 + ethernet-switch@0 { 81 81 compatible = "marvell,mv88e6190"; 82 - #address-cells = <1>; 83 82 #interrupt-cells = <2>; 84 83 interrupt-controller; 85 84 interrupt-parent = <&gpio1>; 86 85 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 87 86 pinctrl-0 = <&switch_interrupt_pins>; 88 87 pinctrl-names = "default"; 89 - #size-cells = <0>; 90 88 reg = <0>; 91 89 92 90 mdio { 93 91 #address-cells = <1>; 94 92 #size-cells = <0>; 95 93 96 - switch0phy1: switch0phy1@1 { 94 + switch0phy1: ethernet-phy@1 { 97 95 reg = <0x1>; 98 96 }; 99 97 100 - switch0phy2: switch0phy2@2 { 98 + switch0phy2: ethernet-phy@2 { 101 99 reg = <0x2>; 102 100 }; 103 101 104 - switch0phy3: switch0phy3@3 { 102 + switch0phy3: ethernet-phy@3 { 105 103 reg = <0x3>; 106 104 }; 107 105 108 - switch0phy4: switch0phy4@4 { 106 + switch0phy4: ethernet-phy@4 { 109 107 reg = <0x4>; 110 108 }; 111 109 112 - switch0phy5: switch0phy5@5 { 110 + switch0phy5: ethernet-phy@5 { 113 111 reg = <0x5>; 114 112 }; 115 113 116 - switch0phy6: switch0phy6@6 { 114 + switch0phy6: ethernet-phy@6 { 117 115 reg = <0x6>; 118 116 }; 119 117 120 - switch0phy7: switch0phy7@7 { 118 + switch0phy7: ethernet-phy@7 { 121 119 reg = <0x7>; 122 120 }; 123 121 124 - switch0phy8: switch0phy8@8 { 122 + switch0phy8: ethernet-phy@8 { 125 123 reg = <0x8>; 126 124 }; 127 125 }; ··· 140 142 }; 141 143 }; 142 144 143 - ports { 145 + ethernet-ports { 144 146 #address-cells = <1>; 145 147 #size-cells = <0>; 146 148 147 - port@0 { 149 + ethernet-port@0 { 148 150 ethernet = <&eth0>; 149 151 phy-mode = "rgmii"; 150 152 reg = <0>; ··· 156 158 }; 157 159 }; 158 160 159 - port@1 { 161 + ethernet-port@1 { 160 162 label = "lan1"; 161 163 phy-handle = <&switch0phy1>; 162 164 reg = <1>; 163 165 }; 164 166 165 - port@2 { 167 + ethernet-port@2 { 166 168 label = "lan2"; 167 169 phy-handle = <&switch0phy2>; 168 170 reg = <2>; 169 171 }; 170 172 171 - port@3 { 173 + ethernet-port@3 { 172 174 label = "lan3"; 173 175 phy-handle = <&switch0phy3>; 174 176 reg = <3>; 175 177 }; 176 178 177 - port@4 { 179 + ethernet-port@4 { 178 180 label = "lan4"; 179 181 phy-handle = <&switch0phy4>; 180 182 reg = <4>; 181 183 }; 182 184 183 - port@5 { 185 + ethernet-port@5 { 184 186 label = "lan5"; 185 187 phy-handle = <&switch0phy5>; 186 188 reg = <5>; 187 189 }; 188 190 189 - port@6 { 191 + ethernet-port@6 { 190 192 label = "lan6"; 191 193 phy-handle = <&switch0phy6>; 192 194 reg = <6>; 193 195 }; 194 196 195 - port@7 { 197 + ethernet-port@7 { 196 198 label = "lan7"; 197 199 phy-handle = <&switch0phy7>; 198 200 reg = <7>; 199 201 }; 200 202 201 - port@8 { 203 + ethernet-port@8 { 202 204 label = "lan8"; 203 205 phy-handle = <&switch0phy8>; 204 206 reg = <8>; 205 207 }; 206 208 207 - port@9 { 209 + ethernet-port@9 { 208 210 /* 88X3310P external phy */ 209 211 label = "lan9"; 210 212 phy-handle = <&phy1>; ··· 212 214 reg = <9>; 213 215 }; 214 216 215 - port@a { 217 + ethernet-port@a { 216 218 /* 88X3310P external phy */ 217 219 label = "lan10"; 218 220 phy-handle = <&phy2>;
+19 -19
arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-l8.dts
··· 7 7 }; 8 8 9 9 &mdio { 10 - switch0: switch0@4 { 10 + switch0: ethernet-switch@4 { 11 11 compatible = "marvell,mv88e6190"; 12 12 reg = <4>; 13 13 pinctrl-names = "default"; 14 14 pinctrl-0 = <&cf_gtr_switch_reset_pins>; 15 15 reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 16 16 17 - ports { 17 + ethernet-ports { 18 18 #address-cells = <1>; 19 19 #size-cells = <0>; 20 20 21 - port@1 { 21 + ethernet-port@1 { 22 22 reg = <1>; 23 23 label = "lan8"; 24 24 phy-handle = <&switch0phy0>; 25 25 }; 26 26 27 - port@2 { 27 + ethernet-port@2 { 28 28 reg = <2>; 29 29 label = "lan7"; 30 30 phy-handle = <&switch0phy1>; 31 31 }; 32 32 33 - port@3 { 33 + ethernet-port@3 { 34 34 reg = <3>; 35 35 label = "lan6"; 36 36 phy-handle = <&switch0phy2>; 37 37 }; 38 38 39 - port@4 { 39 + ethernet-port@4 { 40 40 reg = <4>; 41 41 label = "lan5"; 42 42 phy-handle = <&switch0phy3>; 43 43 }; 44 44 45 - port@5 { 45 + ethernet-port@5 { 46 46 reg = <5>; 47 47 label = "lan4"; 48 48 phy-handle = <&switch0phy4>; 49 49 }; 50 50 51 - port@6 { 51 + ethernet-port@6 { 52 52 reg = <6>; 53 53 label = "lan3"; 54 54 phy-handle = <&switch0phy5>; 55 55 }; 56 56 57 - port@7 { 57 + ethernet-port@7 { 58 58 reg = <7>; 59 59 label = "lan2"; 60 60 phy-handle = <&switch0phy6>; 61 61 }; 62 62 63 - port@8 { 63 + ethernet-port@8 { 64 64 reg = <8>; 65 65 label = "lan1"; 66 66 phy-handle = <&switch0phy7>; 67 67 }; 68 68 69 - port@10 { 69 + ethernet-port@10 { 70 70 reg = <10>; 71 71 phy-mode = "2500base-x"; 72 72 ··· 83 83 #address-cells = <1>; 84 84 #size-cells = <0>; 85 85 86 - switch0phy0: switch0phy0@1 { 86 + switch0phy0: ethernet-phy@1 { 87 87 reg = <0x1>; 88 88 }; 89 89 90 - switch0phy1: switch0phy1@2 { 90 + switch0phy1: ethernet-phy@2 { 91 91 reg = <0x2>; 92 92 }; 93 93 94 - switch0phy2: switch0phy2@3 { 94 + switch0phy2: ethernet-phy@3 { 95 95 reg = <0x3>; 96 96 }; 97 97 98 - switch0phy3: switch0phy3@4 { 98 + switch0phy3: ethernet-phy@4 { 99 99 reg = <0x4>; 100 100 }; 101 101 102 - switch0phy4: switch0phy4@5 { 102 + switch0phy4: ethernet-phy@5 { 103 103 reg = <0x5>; 104 104 }; 105 105 106 - switch0phy5: switch0phy5@6 { 106 + switch0phy5: ethernet-phy@6 { 107 107 reg = <0x6>; 108 108 }; 109 109 110 - switch0phy6: switch0phy6@7 { 110 + switch0phy6: ethernet-phy@7 { 111 111 reg = <0x7>; 112 112 }; 113 113 114 - switch0phy7: switch0phy7@8 { 114 + switch0phy7: ethernet-phy@8 { 115 115 reg = <0x8>; 116 116 }; 117 117 };
+11 -11
arch/arm/boot/dts/marvell/armada-385-clearfog-gtr-s4.dts
··· 11 11 }; 12 12 13 13 &mdio { 14 - switch0: switch0@4 { 14 + switch0: ethernet-switch@4 { 15 15 compatible = "marvell,mv88e6085"; 16 16 reg = <4>; 17 17 pinctrl-names = "default"; 18 18 pinctrl-0 = <&cf_gtr_switch_reset_pins>; 19 19 reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 20 20 21 - ports { 21 + ethernet-ports { 22 22 #address-cells = <1>; 23 23 #size-cells = <0>; 24 24 25 - port@1 { 25 + ethernet-port@1 { 26 26 reg = <1>; 27 27 label = "lan2"; 28 28 phy-handle = <&switch0phy0>; 29 29 }; 30 30 31 - port@2 { 31 + ethernet-port@2 { 32 32 reg = <2>; 33 33 label = "lan1"; 34 34 phy-handle = <&switch0phy1>; 35 35 }; 36 36 37 - port@3 { 37 + ethernet-port@3 { 38 38 reg = <3>; 39 39 label = "lan4"; 40 40 phy-handle = <&switch0phy2>; 41 41 }; 42 42 43 - port@4 { 43 + ethernet-port@4 { 44 44 reg = <4>; 45 45 label = "lan3"; 46 46 phy-handle = <&switch0phy3>; 47 47 }; 48 48 49 - port@5 { 49 + ethernet-port@5 { 50 50 reg = <5>; 51 51 phy-mode = "2500base-x"; 52 52 ethernet = <&eth1>; ··· 63 63 #address-cells = <1>; 64 64 #size-cells = <0>; 65 65 66 - switch0phy0: switch0phy0@11 { 66 + switch0phy0: ethernet-phy@11 { 67 67 reg = <0x11>; 68 68 }; 69 69 70 - switch0phy1: switch0phy1@12 { 70 + switch0phy1: ethernet-phy@12 { 71 71 reg = <0x12>; 72 72 }; 73 73 74 - switch0phy2: switch0phy2@13 { 74 + switch0phy2: ethernet-phy@13 { 75 75 reg = <0x13>; 76 76 }; 77 77 78 - switch0phy3: switch0phy3@14 { 78 + switch0phy3: ethernet-phy@14 { 79 79 reg = <0x14>; 80 80 }; 81 81 };
+8 -10
arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
··· 158 158 &mdio { 159 159 status = "okay"; 160 160 161 - switch@0 { 161 + ethernet-switch@0 { 162 162 compatible = "marvell,mv88e6085"; 163 - #address-cells = <1>; 164 - #size-cells = <0>; 165 163 reg = <0>; 166 164 167 - ports { 165 + ethernet-ports { 168 166 #address-cells = <1>; 169 167 #size-cells = <0>; 170 168 171 - port@0 { 169 + ethernet-port@0 { 172 170 reg = <0>; 173 171 label = "lan4"; 174 172 }; 175 173 176 - port@1 { 174 + ethernet-port@1 { 177 175 reg = <1>; 178 176 label = "lan3"; 179 177 }; 180 178 181 - port@2 { 179 + ethernet-port@2 { 182 180 reg = <2>; 183 181 label = "lan2"; 184 182 }; 185 183 186 - port@3 { 184 + ethernet-port@3 { 187 185 reg = <3>; 188 186 label = "lan1"; 189 187 }; 190 188 191 - port@4 { 189 + ethernet-port@4 { 192 190 reg = <4>; 193 191 label = "wan"; 194 192 }; 195 193 196 - port@5 { 194 + ethernet-port@5 { 197 195 reg = <5>; 198 196 phy-mode = "sgmii"; 199 197 ethernet = <&eth2>;
+9 -11
arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
··· 435 435 }; 436 436 437 437 /* Switch MV88E6176 at address 0x10 */ 438 - switch@10 { 438 + ethernet-switch@10 { 439 439 pinctrl-names = "default"; 440 440 pinctrl-0 = <&swint_pins>; 441 441 compatible = "marvell,mv88e6085"; 442 - #address-cells = <1>; 443 - #size-cells = <0>; 444 442 445 443 dsa,member = <0 0>; 446 444 reg = <0x10>; ··· 446 448 interrupt-parent = <&gpio1>; 447 449 interrupts = <13 IRQ_TYPE_LEVEL_LOW>; 448 450 449 - ports { 451 + ethernet-ports { 450 452 #address-cells = <1>; 451 453 #size-cells = <0>; 452 454 453 - ports@0 { 455 + ethernet-port@0 { 454 456 reg = <0>; 455 457 label = "lan0"; 456 458 }; 457 459 458 - ports@1 { 460 + ethernet-port@1 { 459 461 reg = <1>; 460 462 label = "lan1"; 461 463 }; 462 464 463 - ports@2 { 465 + ethernet-port@2 { 464 466 reg = <2>; 465 467 label = "lan2"; 466 468 }; 467 469 468 - ports@3 { 470 + ethernet-port@3 { 469 471 reg = <3>; 470 472 label = "lan3"; 471 473 }; 472 474 473 - ports@4 { 475 + ethernet-port@4 { 474 476 reg = <4>; 475 477 label = "lan4"; 476 478 }; 477 479 478 - ports@5 { 480 + ethernet-port@5 { 479 481 reg = <5>; 480 482 ethernet = <&eth1>; 481 483 phy-mode = "rgmii-id"; ··· 486 488 }; 487 489 }; 488 490 489 - ports@6 { 491 + ethernet-port@6 { 490 492 reg = <6>; 491 493 ethernet = <&eth0>; 492 494 phy-mode = "rgmii-id";
+9 -11
arch/arm/boot/dts/marvell/armada-388-clearfog.dts
··· 92 92 &mdio { 93 93 status = "okay"; 94 94 95 - switch@4 { 95 + ethernet-switch@4 { 96 96 compatible = "marvell,mv88e6085"; 97 - #address-cells = <1>; 98 - #size-cells = <0>; 99 97 reg = <4>; 100 98 pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; 101 99 pinctrl-names = "default"; 102 100 103 - ports { 101 + ethernet-ports { 104 102 #address-cells = <1>; 105 103 #size-cells = <0>; 106 104 107 - port@0 { 105 + ethernet-port@0 { 108 106 reg = <0>; 109 107 label = "lan5"; 110 108 }; 111 109 112 - port@1 { 110 + ethernet-port@1 { 113 111 reg = <1>; 114 112 label = "lan4"; 115 113 }; 116 114 117 - port@2 { 115 + ethernet-port@2 { 118 116 reg = <2>; 119 117 label = "lan3"; 120 118 }; 121 119 122 - port@3 { 120 + ethernet-port@3 { 123 121 reg = <3>; 124 122 label = "lan2"; 125 123 }; 126 124 127 - port@4 { 125 + ethernet-port@4 { 128 126 reg = <4>; 129 127 label = "lan1"; 130 128 }; 131 129 132 - port@5 { 130 + ethernet-port@5 { 133 131 reg = <5>; 134 132 ethernet = <&eth1>; 135 133 phy-mode = "1000base-x"; ··· 138 140 }; 139 141 }; 140 142 141 - port@6 { 143 + ethernet-port@6 { 142 144 /* 88E1512 external phy */ 143 145 reg = <6>; 144 146 label = "lan6";
+8 -10
arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
··· 265 265 &mdio { 266 266 status = "okay"; 267 267 268 - switch@0 { 268 + ethernet-switch@0 { 269 269 compatible = "marvell,mv88e6085"; 270 - #address-cells = <1>; 271 - #size-cells = <0>; 272 270 reg = <0>; 273 271 274 - ports { 272 + ethernet-ports { 275 273 #address-cells = <1>; 276 274 #size-cells = <0>; 277 275 278 - port@0 { 276 + ethernet-port@0 { 279 277 reg = <0>; 280 278 label = "lan4"; 281 279 }; 282 280 283 - port@1 { 281 + ethernet-port@1 { 284 282 reg = <1>; 285 283 label = "lan3"; 286 284 }; 287 285 288 - port@2 { 286 + ethernet-port@2 { 289 287 reg = <2>; 290 288 label = "lan2"; 291 289 }; 292 290 293 - port@3 { 291 + ethernet-port@3 { 294 292 reg = <3>; 295 293 label = "lan1"; 296 294 }; 297 295 298 - port@4 { 296 + ethernet-port@4 { 299 297 reg = <4>; 300 298 label = "internet"; 301 299 }; 302 300 303 - port@5 { 301 + ethernet-port@5 { 304 302 reg = <5>; 305 303 phy-mode = "rgmii-id"; 306 304 ethernet = <&eth0>;