]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: atheros: Explicitly disable RGMII delays
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 6 May 2020 22:11:51 +0000 (00:11 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 7 May 2020 15:05:00 +0000 (11:05 -0400)
To eliminate any doubts about the out-of-reset value of the PHY, that
the driver previously relied on.

If bisecting shows that this commit breaks your board you probably have
a wrong PHY interface mode. You probably want the
PHY_INTERFACE_MODE_RGMII_RXID or PHY_INTERFACE_MODE_RGMII_ID mode.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/atheros.c

index 1da18eb5d45e57c40cf330082981199f3925e7f5..3e59c3f39150f912bda27f848298308d32ec0df3 100644 (file)
@@ -70,10 +70,14 @@ static int ar8031_config(struct phy_device *phydev)
        if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
            phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
                ar803x_enable_tx_delay(phydev, true);
+       else
+               ar803x_enable_tx_delay(phydev, false);
 
        if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
            phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
                ar803x_enable_rx_delay(phydev, true);
+       else
+               ar803x_enable_rx_delay(phydev, false);
 
        phydev->supported = phydev->drv->features;
 
@@ -96,10 +100,14 @@ static int ar8035_config(struct phy_device *phydev)
        if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
            (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID))
                ar803x_enable_tx_delay(phydev, true);
+       else
+               ar803x_enable_tx_delay(phydev, false);
 
        if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
            (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID))
                ar803x_enable_rx_delay(phydev, true);
+       else
+               ar803x_enable_rx_delay(phydev, false);
 
        phydev->supported = phydev->drv->features;