ARM: imx7d: remove Atheros AR8031 PHY fixup
authorOleksij Rempel <o.rempel@pengutronix.de>
Tue, 11 May 2021 04:37:35 +0000 (06:37 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sun, 23 May 2021 03:32:46 +0000 (11:32 +0800)
This fixup configures the IO voltage and disables the SmartEEE
functionality.

If this patch breaks your system, enable AT803X_PHY driver and configure
the PHY by the device tree:

phy-connection-type = "rgmii-id";
ethernet-phy@X {
reg = <0xX>;

qca,smarteee-tw-us-1g = <24>;

vddio-supply = <&vddh>;

vddio: vddio-regulator {
regulator-name = "VDDIO";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

vddh: vddh-regulator {
regulator-name = "VDDH";
};
};

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mach-imx7d.c

index 879c359..ccf64dd 100644 (file)
 
 #include "common.h"
 
-static int ar8031_phy_fixup(struct phy_device *dev)
-{
-       u16 val;
-
-       /* Set RGMII IO voltage to 1.8V */
-       phy_write(dev, 0x1d, 0x1f);
-       phy_write(dev, 0x1e, 0x8);
-
-       /* disable phy AR8031 SmartEEE function. */
-       phy_write(dev, 0xd, 0x3);
-       phy_write(dev, 0xe, 0x805d);
-       phy_write(dev, 0xd, 0x4003);
-       val = phy_read(dev, 0xe);
-       val &= ~(0x1 << 8);
-       phy_write(dev, 0xe, val);
-
-       return 0;
-}
-
 static int bcm54220_phy_fixup(struct phy_device *dev)
 {
        /* enable RXC skew select RGMII copper mode */
@@ -44,14 +25,11 @@ static int bcm54220_phy_fixup(struct phy_device *dev)
        return 0;
 }
 
-#define PHY_ID_AR8031  0x004dd074
 #define PHY_ID_BCM54220        0x600d8589
 
 static void __init imx7d_enet_phy_init(void)
 {
        if (IS_BUILTIN(CONFIG_PHYLIB)) {
-               phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffff,
-                                          ar8031_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_BCM54220, 0xffffffff,
                                           bcm54220_phy_fixup);
        }