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

ARM: dts: am335x-myirtech: 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 MYIR MYC-AM335X/MYD-AM335X 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: Alexander Shiyan <shc_work@mail.ru>
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
4c0b47f3 5578b730

+26 -21
+16 -13
arch/arm/boot/dts/am335x-myirtech-myc.dtsi
··· 57 57 }; 58 58 }; 59 59 60 - &cpsw_emac0 { 61 - phy-handle = <&phy0>; 62 - phy-mode = "rgmii-id"; 60 + &mac_sw { 61 + pinctrl-names = "default", "sleep"; 62 + pinctrl-0 = <&eth_slave1_pins_default>; 63 + pinctrl-1 = <&eth_slave1_pins_sleep>; 64 + status = "okay"; 63 65 }; 64 66 65 - &davinci_mdio { 67 + &cpsw_port1 { 68 + phy-handle = <&phy0>; 69 + phy-mode = "rgmii-id"; 70 + ti,dual-emac-pvid = <1>; 71 + }; 72 + 73 + &cpsw_port2 { 74 + status = "disabled"; 75 + }; 76 + 77 + &davinci_mdio_sw { 66 78 pinctrl-names = "default", "sleep"; 67 79 pinctrl-0 = <&mdio_pins_default>; 68 80 pinctrl-1 = <&mdio_pins_sleep>; 69 - status = "okay"; 70 81 71 82 phy0: ethernet-phy@4 { 72 83 reg = <4>; ··· 146 135 pagesize = <32>; 147 136 vcc-supply = <&vdd_mod>; 148 137 }; 149 - }; 150 - 151 - &mac { 152 - pinctrl-names = "default", "sleep"; 153 - pinctrl-0 = <&eth_slave1_pins_default>; 154 - pinctrl-1 = <&eth_slave1_pins_sleep>; 155 - slaves = <1>; 156 - status = "okay"; 157 138 }; 158 139 159 140 &rtc {
+10 -8
arch/arm/boot/dts/am335x-myirtech-myd.dts
··· 86 86 }; 87 87 }; 88 88 89 - &cpsw_emac1 { 89 + &cpsw_port2 { 90 + status = "okay"; 90 91 phy-handle = <&phy1>; 91 92 phy-mode = "rgmii-id"; 93 + ti,dual-emac-pvid = <2>; 92 94 }; 93 95 94 - &davinci_mdio { 96 + &davinci_mdio_sw { 95 97 phy1: ethernet-phy@6 { 96 98 reg = <6>; 97 99 eee-broken-1000t; 98 100 }; 101 + }; 102 + 103 + &mac_sw { 104 + pinctrl-0 = <&eth_slave1_pins_default>, <&eth_slave2_pins_default>; 105 + pinctrl-1 = <&eth_slave1_pins_sleep>, <&eth_slave2_pins_sleep>; 106 + slaves = <2>; 99 107 }; 100 108 101 109 &dcan0 { ··· 200 192 color = <LED_COLOR_ID_GREEN>; 201 193 default-state = "off"; 202 194 }; 203 - }; 204 - 205 - &mac { 206 - pinctrl-0 = <&eth_slave1_pins_default>, <&eth_slave2_pins_default>; 207 - pinctrl-1 = <&eth_slave1_pins_sleep>, <&eth_slave2_pins_sleep>; 208 - slaves = <2>; 209 195 }; 210 196 211 197 &mcasp0 {