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

ARM: dts: am335x-moxa-uc: switch to new cpsw switch drv

The dual_mac mode has been preserved the same way between legacy and new
driver, and one port devices works the same as 1 dual_mac port - it's safe
to switch drivers.

So, switch Moxa am335x-moxa-uc-210x/8100 to use new cpsw switch driver.
Those boards have or 2 Ext. port wired and configured in dual_mac mode by
default, or only 1 Ext. port.

Cc: Johnson Chen <johnsonch.chen@moxa.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

authored by

Grygorii Strashko and committed by
Tony Lindgren
5578b730 843470ac

+15 -20
+6 -6
arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi
··· 122 122 regulator-max-microvolt = <5000000>; 123 123 }; 124 124 125 - &mac { 125 + &mac_sw { 126 126 pinctrl-names = "default"; 127 127 pinctrl-0 = <&cpsw_default>; 128 128 status = "okay"; 129 129 }; 130 130 131 - &davinci_mdio { 131 + &davinci_mdio_sw { 132 132 pinctrl-names = "default"; 133 133 pinctrl-0 = <&davinci_mdio_default>; 134 134 status = "okay"; 135 135 }; 136 136 137 - &cpsw_emac0 { 138 - status = "okay"; 137 + &cpsw_port1 { 138 + ti,dual-emac-pvid = <1>; 139 139 }; 140 140 141 - &cpsw_emac1 { 142 - status = "okay"; 141 + &cpsw_port2 { 142 + ti,dual-emac-pvid = <2>; 143 143 }; 144 144 145 145 &sham {
+3 -4
arch/arm/boot/dts/am335x-moxa-uc-2101.dts
··· 52 52 }; 53 53 }; 54 54 55 - &davinci_mdio { 55 + &davinci_mdio_sw { 56 56 phy0: ethernet-phy@4 { 57 57 reg = <4>; 58 58 }; 59 59 }; 60 60 61 - &cpsw_emac0 { 62 - status = "okay"; 61 + &cpsw_port1 { 63 62 phy-handle = <&phy0>; 64 63 phy-mode = "rmii"; 65 64 }; 66 65 67 - &cpsw_emac1 { 66 + &cpsw_port2 { 68 67 status = "disabled"; 69 68 };
+6 -10
arch/arm/boot/dts/am335x-moxa-uc-8100-common.dtsi
··· 310 310 regulator-max-microvolt = <5000000>; 311 311 }; 312 312 313 - &mac { 313 + &mac_sw { 314 314 pinctrl-names = "default"; 315 315 pinctrl-0 = <&cpsw_default>; 316 - dual_emac = <1>; 317 316 status = "okay"; 318 317 }; 319 318 320 - &davinci_mdio { 319 + &davinci_mdio_sw { 321 320 pinctrl-names = "default"; 322 321 pinctrl-0 = <&davinci_mdio_default>; 323 - status = "okay"; 324 322 325 323 ethphy0: ethernet-phy@4 { 326 324 reg = <4>; ··· 329 331 }; 330 332 }; 331 333 332 - &cpsw_emac0 { 333 - status = "okay"; 334 + &cpsw_port1 { 334 335 phy-handle = <&ethphy0>; 335 336 phy-mode = "rmii"; 336 - dual_emac_res_vlan = <1>; 337 + ti,dual-emac-pvid = <1>; 337 338 }; 338 339 339 - &cpsw_emac1 { 340 - status = "okay"; 340 + &cpsw_port2 { 341 341 phy-handle = <&ethphy1>; 342 342 phy-mode = "rmii"; 343 - dual_emac_res_vlan = <2>; 343 + ti,dual-emac-pvid = <2>; 344 344 }; 345 345 346 346 &sham {