LF-3469: net: phy: at803x: Disable PHY hibernation during init
authorShenwei Wang <shenwei.wang@nxp.com>
Tue, 27 Apr 2021 16:27:28 +0000 (11:27 -0500)
committerShenwei Wang <shenwei.wang@nxp.com>
Tue, 27 Apr 2021 16:27:28 +0000 (11:27 -0500)
The Atheros 803x PHY will go to hibernate mode after
10 seconds if no activity on the link.
When in hibernation, it will not provide any clock to the MAC.

This caused issue when trying to bring up the interface when
no cable was connected: MAC driver would timeout, and the PHY
power domain would stay on. It is also possible that this caused
issues with EEE capable remote PHY.

Disabling this feature during initialization to avoid potential
side effects.

Signed-off-by: Seb Haezebrouck <sebastien.haezebrouck@nxp.com>
Reviewed-by: Shenwei Wang <shenwei.wang@nxp.com>
drivers/net/phy/at803x.c

index 652a5d0..b2e54bf 100644 (file)
@@ -681,6 +681,8 @@ static int at803x_config_init(struct phy_device *phydev)
                        return ret;
        }
 
+       at803x_debug_reg_mask(phydev, 0xB, BIT(15), 0);
+
        return 0;
 }