diff options
author | ps <ps@FreeBSD.org> | 2004-09-24 22:24:33 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2004-09-24 22:24:33 +0000 |
commit | fd095ca48d37e5ab204d6aa1e65c767330c028ec (patch) | |
tree | aba0582966874b7ecb2affde842d823ac5087130 /sys/dev/mii | |
parent | 632ac71095e33f5c33298c92cc233b05687316a1 (diff) | |
download | FreeBSD-src-fd095ca48d37e5ab204d6aa1e65c767330c028ec.zip FreeBSD-src-fd095ca48d37e5ab204d6aa1e65c767330c028ec.tar.gz |
Add support for the BCM5750/5751. Unfortunately the documentation
I have from Broadcom does not give much information on these devices,
so the Broadcom Linux driver was used for clues to what these chips
support. It turns out they are similar to the 5705 with the 5751
being the PCI-Express version and needing special work-arounds and
settings.
Diffstat (limited to 'sys/dev/mii')
-rw-r--r-- | sys/dev/mii/brgphy.c | 33 | ||||
-rw-r--r-- | sys/dev/mii/miidevs | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 6680b53..85cf768 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -94,6 +94,7 @@ static void brgphy_loop(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); static void bcm5411_load_dspcode(struct mii_softc *); static void bcm5703_load_dspcode(struct mii_softc *); +static void bcm5750_load_dspcode(struct mii_softc *); static int brgphy_mii_model; static int @@ -146,6 +147,12 @@ brgphy_probe(dev) return(0); } + if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxBROADCOM && + MII_MODEL(ma->mii_id2) == MII_MODEL_xxBROADCOM_BCM5750) { + device_set_desc(dev, MII_STR_xxBROADCOM_BCM5750); + return(0); + } + return(ENXIO); } @@ -579,6 +586,29 @@ bcm5704_load_dspcode(struct mii_softc *sc) } static void +bcm5750_load_dspcode(struct mii_softc *sc) +{ + static const struct { + int reg; + u_int16_t val; + } dspcode[] = { + { 0x18, 0x0c00 }, + { 0x17, 0x000a }, + { 0x15, 0x310b }, + { 0x17, 0x201f }, + { 0x15, 0x9506 }, + { 0x17, 0x401f }, + { 0x15, 0x14e2 }, + { 0x18, 0x0400 }, + { 0, 0 }, + }; + int i; + + for (i = 0; dspcode[i].reg != 0; i++) + PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); +} + +static void brgphy_reset(struct mii_softc *sc) { u_int32_t val; @@ -600,6 +630,9 @@ brgphy_reset(struct mii_softc *sc) case MII_MODEL_xxBROADCOM_BCM5704: bcm5704_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM5750: + bcm5750_load_dspcode(sc); + break; } ifp = sc->mii_pdata->mii_ifp; diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 6415c92..993f261 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -121,6 +121,7 @@ model xxBROADCOM BCM5701 0x0011 BCM5701 10/100/1000baseTX PHY model xxBROADCOM BCM5703 0x0016 BCM5703 10/100/1000baseTX PHY model xxBROADCOM BCM5704 0x0019 BCM5704 10/100/1000baseTX PHY model xxBROADCOM BCM5705 0x001a BCM5705 10/100/1000baseTX PHY +model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ model CICADA CS8201 0x0001 Cicada CS8201 10/100/1000TX PHY |