[U-Boot] [PATCH 6/8] net/phy: enable serdes autonegotiation for vsc8514 phy

Shengzhou Liu Shengzhou.Liu at freescale.com
Mon Oct 27 13:06:21 CET 2014


QSGMII doesn't work without enabling serdes auto-negotiation.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu at freescale.com>
---
 drivers/net/phy/vitesse.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 2b29cd8..5b2e11a 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -50,6 +50,7 @@
 #define MIIM_VSC8574_18G_CMDSTAT	0x8000
 
 /* Vitesse VSC8514 control register */
+#define MIIM_VSC8514_MAC_SERDES_CON     0x10
 #define MIIM_VSC8514_GENERAL18		0x12
 #define MIIM_VSC8514_GENERAL19		0x13
 #define MIIM_VSC8514_GENERAL23		0x17
@@ -246,6 +247,14 @@ static int vsc8514_config(struct phy_device *phydev)
 	val = (val & 0xf8ff);
 	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_VSC8514_GENERAL23, val);
 
+	/* Enable Serdes Auto-negotiation */
+	phy_write(phydev, MDIO_DEVAD_NONE, PHY_EXT_PAGE_ACCESS,
+		  PHY_EXT_PAGE_ACCESS_EXTENDED3);
+	val = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_VSC8514_MAC_SERDES_CON);
+	val = val | MIIM_VSC8574_MAC_SERDES_ANEG;
+	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_VSC8514_MAC_SERDES_CON, val);
+	phy_write(phydev, MDIO_DEVAD_NONE, PHY_EXT_PAGE_ACCESS, 0);
+
 	genphy_config_aneg(phydev);
 
 	return 0;
-- 
2.1.0.27.g96db324



More information about the U-Boot mailing list