diff mbox series

[v4,04/12] phy: atheros: Explicitly disable RGMII delays

Message ID 20200506221159.1298-5-michael@walle.cc
State Accepted
Commit 13114f38e2ccea9386726d8b9831dfc310589548
Delegated to: Tom Rini
Headers show
Series phy: atheros: dt bindings and cleanup | expand

Commit Message

Michael Walle May 6, 2020, 10:11 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

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 | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Tom Rini May 7, 2020, 6:52 p.m. UTC | #1
On Thu, May 07, 2020 at 12:11:51AM +0200, Michael Walle wrote:

> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 1da18eb5d4..3e59c3f391 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -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;