Add 88E1116/88E1116R PHY support code that takes the PHY out of

power-down mode.

PR:	kern/114086
MFC after:	3 days
This commit is contained in:
Pyun YongHyeon 2007-10-29 05:50:22 +00:00
parent 0bc6ff67a0
commit 6fd47025e1
2 changed files with 15 additions and 0 deletions

View File

@ -235,6 +235,8 @@ e1000phy_reset(struct mii_softc *sc)
/* Disable energy detect mode. */
reg &= ~E1000_SCR_EN_DETECT_MASK;
reg |= E1000_SCR_AUTO_X_MODE;
if (esc->mii_model == MII_MODEL_MARVELL_E1116)
reg &= ~E1000_SCR_POWER_DOWN;
break;
case MII_MODEL_MARVELL_E3082:
reg |= (E1000_SCR_AUTO_X_MODE >> 1);
@ -248,6 +250,14 @@ e1000phy_reset(struct mii_softc *sc)
/* Auto correction for reversed cable polarity. */
reg &= ~E1000_SCR_POLARITY_REVERSAL;
PHY_WRITE(sc, E1000_SCR, reg);
if (esc->mii_model == MII_MODEL_MARVELL_E1116) {
PHY_WRITE(sc, E1000_EADR, 2);
reg = PHY_READ(sc, E1000_SCR);
reg |= E1000_SCR_RGMII_POWER_UP;
PHY_WRITE(sc, E1000_SCR, reg);
PHY_WRITE(sc, E1000_EADR, 0);
}
}
switch (MII_MODEL(esc->mii_model)) {

View File

@ -244,6 +244,11 @@
#define E1000_SCR_MODE_COPPER 0x0280
#define E1000_SCR_MODE_1000BX 0x0380
/* 88E1116 page 0 */
#define E1000_SCR_POWER_DOWN 0x0004
/* 88E1116 page 2 */
#define E1000_SCR_RGMII_POWER_UP 0x0008
#define E1000_SSR 0x11 /* special status register */
#define E1000_SSR_JABBER 0x0001
#define E1000_SSR_REV_POLARITY 0x0002