@@ -80,7 +80,10 @@ static void setup_sgmii_internal_phy(struct memac_t *p_memac, uint8_t phy_addr)
ENET_SPEED_1000);
/* SGMII mode + AN enable */
- tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+ //tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+ tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII | 0x8;
+ if (p_memac->mac_id != 0)
+ tmp_reg16 &= ~PHY_SGMII_IF_MODE_AN;
memac_mii_write_phy_reg(p_memac, phy_addr, 0x14, tmp_reg16);
/* Device ability according to SGMII specification */
@@ -104,6 +107,8 @@ static void setup_sgmii_internal_phy(struct memac_t *p_memac, uint8_t phy_addr)
/* Restart AN */
tmp_reg16 = PHY_SGMII_CR_DEF_VAL | PHY_SGMII_CR_RESET_AN;
+ if (p_memac->mac_id != 0)
+ tmp_reg16 &= ~0x1000;
memac_mii_write_phy_reg(p_memac, phy_addr, 0x0, tmp_reg16);
/* Restore original enet mode */