arm64: dts: ti: k3-am625-beagleplay: Use the builtin mdio bus
authorSjoerd Simons <sjoerd@collabora.com>
Fri, 12 Jan 2024 12:44:55 +0000 (13:44 +0100)
committerVignesh Raghavendra <vigneshr@ti.com>
Mon, 5 Feb 2024 13:55:56 +0000 (19:25 +0530)
The beagleplay dts was using a bit-bang gpio mdio bus as a work-around
for errata i2329. However since commit d04807b80691 ("net: ethernet: ti:
davinci_mdio: Add workaround for errata i2329") the mdio driver itself
already takes care of this errata for effected silicon, which landed
well before the beagleplay dts. So i suspect the reason for the
workaround in upstream was simply due to copying the vendor dts.

Switch the dts to the ti,cpsw-mdio instead so it described the actual
hardware and is consistent with other AM625 based boards

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20240112124505.2054212-1-sjoerd@collabora.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts

index 1c243ec63dd83abb4aaa22ee023fd8a825dd0671..2a5605a67f39f952ef856c88139993b8dce0b5fa 100644 (file)
@@ -29,7 +29,6 @@
                i2c3 = &main_i2c3;
                i2c4 = &wkup_i2c0;
                i2c5 = &mcu_i2c0;
-               mdio-gpio0 = &mdio0;
                mmc0 = &sdhci0;
                mmc1 = &sdhci1;
                mmc2 = &sdhci2;
                };
        };
 
-       /* Workaround for errata i2329 - just use mdio bitbang */
-       mdio0: mdio {
-               compatible = "virtual,mdio-gpio";
-               pinctrl-names = "default";
-               pinctrl-0 = <&mdio0_pins_default>;
-               gpios = <&main_gpio0 86 GPIO_ACTIVE_HIGH>, /* MDC */
-                       <&main_gpio0 85 GPIO_ACTIVE_HIGH>; /* MDIO */
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               cpsw3g_phy0: ethernet-phy@0 {
-                       reg = <0>;
-               };
-
-               cpsw3g_phy1: ethernet-phy@1 {
-                       reg = <1>;
-                       reset-gpios = <&main_gpio1 5 GPIO_ACTIVE_LOW>;
-                       reset-assert-us = <25>;
-                       reset-deassert-us = <60000>; /* T2 */
-               };
-       };
 };
 
 &main_pmx0 {
 
        mdio0_pins_default: mdio0-default-pins {
                pinctrl-single,pins = <
-                       AM62X_IOPAD(0x0160, PIN_OUTPUT, 7) /* (AD24) MDIO0_MDC.GPIO0_86 */
-                       AM62X_IOPAD(0x015c, PIN_INPUT, 7) /* (AB22) MDIO0_MDIO.GPIO0_85 */
+                       AM62X_IOPAD(0x0160, PIN_OUTPUT, 0) /* (AD24) MDIO0_MDC */
+                       AM62X_IOPAD(0x015c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */
                >;
        };
 
 };
 
 &cpsw3g_mdio {
-       /* Workaround for errata i2329 - Use mdio bitbang */
-       status = "disabled";
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mdio0_pins_default>;
+
+       cpsw3g_phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+
+       cpsw3g_phy1: ethernet-phy@1 {
+               reg = <1>;
+               reset-gpios = <&main_gpio1 5 GPIO_ACTIVE_LOW>;
+               reset-assert-us = <25>;
+               reset-deassert-us = <60000>; /* T2 */
+       };
 };
 
 &main_gpio0 {