[U-Boot] [PATCH 3/3] drivers: net: pfe_eth: Disable autonegotiation for 2.5G SGMII

Bhaskar Upadhaya Bhaskar.Upadhaya at nxp.com
Thu Nov 30 00:23:23 UTC 2017


PCS initialization sequence for 2.5G SGMII interface governs
auto negotiation to be in disabled mode

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
---
Depends on https://patchwork.ozlabs.org/cover/823205

 drivers/net/pfe_eth/pfe_eth.c   | 3 +++
 include/pfe_eth/pfe/cbus/emac.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index 4db823f..01b745b 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -426,6 +426,9 @@ static void ls1012a_configure_serdes(struct ls1012a_eth_dev *priv)
 	value = PHY_SGMII_CR_DEF_VAL;
 	if (!sgmii_2500)
 		value |= PHY_SGMII_CR_RESET_AN;
+	/* Disable Auto neg for 2.5G SGMII as it doesn't support auto neg*/
+	if (sgmii_2500)
+		value &= ~PHY_SGMII_ENABLE_AN;
 	ls1012a_phy_write(&bus, 0, MDIO_DEVAD_NONE, 0, value);
 }
 
diff --git a/include/pfe_eth/pfe/cbus/emac.h b/include/pfe_eth/pfe/cbus/emac.h
index 3cfcd99..b61f3ad 100644
--- a/include/pfe_eth/pfe/cbus/emac.h
+++ b/include/pfe_eth/pfe/cbus/emac.h
@@ -146,5 +146,6 @@ enum mac_speed {SPEED_10M, SPEED_100M, SPEED_1000M, SPEED_1000M_PCS};
 #define PHY_SGMII_IF_MODE_AN        0x0002
 #define PHY_SGMII_IF_MODE_SGMII     0x0001
 #define PHY_SGMII_IF_MODE_SGMII_GBT 0x0008
+#define PHY_SGMII_ENABLE_AN         0x1000
 
 #endif /* _EMAC_H_ */
-- 
1.9.1



More information about the U-Boot mailing list