ARM: dts: am335x-myirtech: switch to new cpsw switch drv
authorGrygorii Strashko <grygorii.strashko@ti.com>
Sat, 12 Jun 2021 01:14:29 +0000 (04:14 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 6 Aug 2021 06:25:35 +0000 (09:25 +0300)
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>
arch/arm/boot/dts/am335x-myirtech-myc.dtsi
arch/arm/boot/dts/am335x-myirtech-myd.dts

index 270a3d5..245c35f 100644 (file)
        };
 };
 
-&cpsw_emac0 {
+&mac_sw {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&eth_slave1_pins_default>;
+       pinctrl-1 = <&eth_slave1_pins_sleep>;
+       status = "okay";
+};
+
+&cpsw_port1 {
        phy-handle = <&phy0>;
        phy-mode = "rgmii-id";
+       ti,dual-emac-pvid = <1>;
+};
+
+&cpsw_port2 {
+       status = "disabled";
 };
 
-&davinci_mdio {
+&davinci_mdio_sw {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mdio_pins_default>;
        pinctrl-1 = <&mdio_pins_sleep>;
-       status = "okay";
 
        phy0: ethernet-phy@4 {
                reg = <4>;
        };
 };
 
-&mac {
-       pinctrl-names = "default", "sleep";
-       pinctrl-0 = <&eth_slave1_pins_default>;
-       pinctrl-1 = <&eth_slave1_pins_sleep>;
-       slaves = <1>;
-       status = "okay";
-};
-
 &rtc {
        system-power-controller;
 };
index c996639..1479fd9 100644 (file)
        };
 };
 
-&cpsw_emac1 {
+&cpsw_port2 {
+       status = "okay";
        phy-handle = <&phy1>;
        phy-mode = "rgmii-id";
+       ti,dual-emac-pvid = <2>;
 };
 
-&davinci_mdio {
+&davinci_mdio_sw {
        phy1: ethernet-phy@6 {
                reg = <6>;
                eee-broken-1000t;
        };
 };
 
+&mac_sw {
+       pinctrl-0 = <&eth_slave1_pins_default>, <&eth_slave2_pins_default>;
+       pinctrl-1 = <&eth_slave1_pins_sleep>, <&eth_slave2_pins_sleep>;
+       slaves = <2>;
+};
+
 &dcan0 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&dcan0_pins_default>;
        };
 };
 
-&mac {
-       pinctrl-0 = <&eth_slave1_pins_default>, <&eth_slave2_pins_default>;
-       pinctrl-1 = <&eth_slave1_pins_sleep>, <&eth_slave2_pins_sleep>;
-       slaves = <2>;
-};
-
 &mcasp0 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mcasp0_pins_default>;