diff options
author | Hoan Hoang <hnhoan@i-syst.com> | 2010-05-11 02:42:38 -0400 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2010-07-12 00:14:29 -0700 |
commit | 256670680b058105bb948c9f55e11db7ed949fa9 (patch) | |
tree | aec168eacbb0b933de2c7f017a340c61d23b374f /drivers/net/ax88180.c | |
parent | 6bb46790178d111161a487cbd847dd2dba37ca24 (diff) | |
download | u-boot-imx-256670680b058105bb948c9f55e11db7ed949fa9.zip u-boot-imx-256670680b058105bb948c9f55e11db7ed949fa9.tar.gz u-boot-imx-256670680b058105bb948c9f55e11db7ed949fa9.tar.bz2 |
AX88180: add support for the Marvell 88E1118 phy
Some places in the current code equate the Marvell 88E1111 PHY as the family
when in reality it's a subpart of the Alaska family. So once we generalize
that, add support for the 88E1118 PHY.
Signed-off-by: Hoan Hoang <hnhoan@i-syst.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers/net/ax88180.c')
-rw-r--r-- | drivers/net/ax88180.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c index fa2e212..bc3e6ad 100644 --- a/drivers/net/ax88180.c +++ b/drivers/net/ax88180.c @@ -267,20 +267,35 @@ static int ax88180_phy_initial (struct eth_device *dev) { priv->PhyAddr = phyaddr; priv->PhyID0 = ax88180_mdio_read(dev, MII_PHYSID1); + priv->PhyID1 = ax88180_mdio_read(dev, MII_PHYSID2); switch (priv->PhyID0) { - case MARVELL_88E1111_PHYSID0: - debug("ax88180: Found Marvell 88E1111 PHY." + case MARVELL_ALASKA_PHYSID0: + debug("ax88180: Found Marvell Alaska PHY family." " (PHY Addr=0x%x)\n", priv->PhyAddr); - tmp_regval = ax88180_mdio_read(dev, M88_EXT_SSR); - if ((tmp_regval & HWCFG_MODE_MASK) != RGMII_COPPER_MODE) { - ax88180_mdio_write(dev, M88_EXT_SCR, DEFAULT_EXT_SCR); - if (ax88180_phy_reset(dev) < 0) - return 0; - ax88180_mdio_write(dev, M88_IER, LINK_CHANGE_INT); + switch (priv->PhyID1) { + case MARVELL_88E1118_PHYSID1: + ax88180_mdio_write(dev, M88E1118_PAGE_SEL, 2); + ax88180_mdio_write(dev, M88E1118_CR, + M88E1118_CR_DEFAULT); + ax88180_mdio_write(dev, M88E1118_PAGE_SEL, 3); + ax88180_mdio_write(dev, M88E1118_LEDCTL, + M88E1118_LEDCTL_DEFAULT); + ax88180_mdio_write(dev, M88E1118_LEDMIX, + M88E1118_LEDMIX_LED050 | M88E1118_LEDMIX_LED150 | 0x15); + ax88180_mdio_write(dev, M88E1118_PAGE_SEL, 0); + default: /* Default to 88E1111 Phy */ + tmp_regval = ax88180_mdio_read(dev, M88E1111_EXT_SSR); + if ((tmp_regval & HWCFG_MODE_MASK) != RGMII_COPPER_MODE) + ax88180_mdio_write(dev, M88E1111_EXT_SCR, + DEFAULT_EXT_SCR); } + if (ax88180_phy_reset(dev) < 0) + return 0; + ax88180_mdio_write(dev, M88_IER, LINK_CHANGE_INT); + return 1; case CICADA_CIS8201_PHYSID0: @@ -358,7 +373,7 @@ static void ax88180_media_config (struct eth_device *dev) /* Get real media mode here */ switch (priv->PhyID0) { - case MARVELL_88E1111_PHYSID0: + case MARVELL_ALASKA_PHYSID0: RealMediaMode = get_MarvellPHY_media_mode(dev); break; case CICADA_CIS8201_PHYSID0: |