[U-Boot] [PATCH] net:phy:aquantia Set only autoneg on in register 4.c441

Valentin-catalin Neacsu valentin-catalin.neacsu at nxp.com
Wed Feb 13 09:14:53 UTC 2019


For AQR405 in register 4.c441 bit 15 was override with 0. This caused the
phy to not negotiate at 2.5GB rate with mac. To avoid
this override it needed first to know the previous value of reg 4.c441
and set only bit 3.
Signed-off-by: Valentin Catalin Neacsu <valentin-catalin.neacsu at nxp.com>
---
 drivers/net/phy/aquantia.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 84f7f0ef1e..c5bd0cecae 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -58,9 +58,14 @@ int aquantia_config(struct phy_device *phydev)
 			       AQUANTIA_SYSTEM_INTERFACE_SR);
 		/* If SI is USXGMII then start USXGMII autoneg*/
 		if ((val & AQUANTIA_SI_IN_USE_MASK) == AQUANTIA_SI_USXGMII) {
+			reg_val1 =  phy_read(phydev, MDIO_MMD_PHYXS,
+					     AQUANTIA_VENDOR_PROVISIONING_REG);
+
+			reg_val1 |= AQUANTIA_USX_AUTONEG_CONTROL_ENA;
+
 			phy_write(phydev, MDIO_MMD_PHYXS,
 				  AQUANTIA_VENDOR_PROVISIONING_REG,
-				  AQUANTIA_USX_AUTONEG_CONTROL_ENA);
+				  reg_val1);
 			printf("%s: system interface USXGMII\n",
 			       phydev->dev->name);
 		} else {
-- 
2.17.1



More information about the U-Boot mailing list