fec: Add LAN8700 phy support
authorAmit Kucheria <amit.kucheria@canonical.com>
Fri, 5 Feb 2010 08:56:21 +0000 (08:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Feb 2010 21:05:42 +0000 (13:05 -0800)
The i.MX51 babbage board has a FEC ethernet controller with this phy.

In the long term we should resurrect the phylib patches for fec.

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fec.c

index 9a8743daa3e5e48f968cb97407d6ca663e4e2c2f..5d0d3326815597d88a974ad48aac39bf5431e1dd 100644 (file)
@@ -1128,6 +1128,26 @@ static phy_info_t phy_info_dp83848= {
        },
 };
 
+static phy_info_t phy_info_lan8700 = {
+       0x0007C0C,
+       "LAN8700",
+       (const phy_cmd_t []) { /* config */
+               { mk_mii_read(MII_REG_CR), mii_parse_cr },
+               { mk_mii_read(MII_REG_ANAR), mii_parse_anar },
+               { mk_mii_end, }
+       },
+       (const phy_cmd_t []) { /* startup */
+               { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */
+               { mk_mii_read(MII_REG_SR), mii_parse_sr },
+               { mk_mii_end, }
+       },
+       (const phy_cmd_t []) { /* act_int */
+               { mk_mii_end, }
+       },
+       (const phy_cmd_t []) { /* shutdown */
+               { mk_mii_end, }
+       },
+};
 /* ------------------------------------------------------------------------- */
 
 static phy_info_t const * const phy_info[] = {
@@ -1137,6 +1157,7 @@ static phy_info_t const * const phy_info[] = {
        &phy_info_am79c874,
        &phy_info_ks8721bl,
        &phy_info_dp83848,
+       &phy_info_lan8700,
        NULL
 };