diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2016-05-03 08:08:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-04 13:57:14 -0400 |
commit | ecc9120e054b08024b096d8a3a96f81df5fc906c (patch) | |
tree | cb2280052189233abb827aab96ec1299c2828eb3 /drivers/net/ethernet/ibm | |
parent | 53da5b47cb6eeaa9aa80772219eadb4cce1abcb6 (diff) |
drivers: net: emac: add Atheros AR8035 phy initialization code
This patch adds the phy initialization code for Qualcomm
Atheros AR8035 phy. This configuration is found in the
Cisco Meraki MR24.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/emac/phy.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/emac/phy.c b/drivers/net/ethernet/ibm/emac/phy.c index d3b9d103353e..5b88cc690c22 100644 --- a/drivers/net/ethernet/ibm/emac/phy.c +++ b/drivers/net/ethernet/ibm/emac/phy.c | |||
@@ -470,12 +470,38 @@ static struct mii_phy_def m88e1112_phy_def = { | |||
470 | .ops = &m88e1112_phy_ops, | 470 | .ops = &m88e1112_phy_ops, |
471 | }; | 471 | }; |
472 | 472 | ||
473 | static int ar8035_init(struct mii_phy *phy) | ||
474 | { | ||
475 | phy_write(phy, 0x1d, 0x5); /* Address debug register 5 */ | ||
476 | phy_write(phy, 0x1e, 0x2d47); /* Value copied from u-boot */ | ||
477 | phy_write(phy, 0x1d, 0xb); /* Address hib ctrl */ | ||
478 | phy_write(phy, 0x1e, 0xbc20); /* Value copied from u-boot */ | ||
479 | |||
480 | return 0; | ||
481 | } | ||
482 | |||
483 | static struct mii_phy_ops ar8035_phy_ops = { | ||
484 | .init = ar8035_init, | ||
485 | .setup_aneg = genmii_setup_aneg, | ||
486 | .setup_forced = genmii_setup_forced, | ||
487 | .poll_link = genmii_poll_link, | ||
488 | .read_link = genmii_read_link, | ||
489 | }; | ||
490 | |||
491 | static struct mii_phy_def ar8035_phy_def = { | ||
492 | .phy_id = 0x004dd070, | ||
493 | .phy_id_mask = 0xfffffff0, | ||
494 | .name = "Atheros 8035 Gigabit Ethernet", | ||
495 | .ops = &ar8035_phy_ops, | ||
496 | }; | ||
497 | |||
473 | static struct mii_phy_def *mii_phy_table[] = { | 498 | static struct mii_phy_def *mii_phy_table[] = { |
474 | &et1011c_phy_def, | 499 | &et1011c_phy_def, |
475 | &cis8201_phy_def, | 500 | &cis8201_phy_def, |
476 | &bcm5248_phy_def, | 501 | &bcm5248_phy_def, |
477 | &m88e1111_phy_def, | 502 | &m88e1111_phy_def, |
478 | &m88e1112_phy_def, | 503 | &m88e1112_phy_def, |
504 | &ar8035_phy_def, | ||
479 | &genmii_phy_def, | 505 | &genmii_phy_def, |
480 | NULL | 506 | NULL |
481 | }; | 507 | }; |