aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/marvell.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r--drivers/net/phy/marvell.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 3600b8b21bf2..def19d7c53ef 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -433,6 +433,32 @@ static int m88e1118_config_init(struct phy_device *phydev)
433 return 0; 433 return 0;
434} 434}
435 435
436static int m88e1149_config_init(struct phy_device *phydev)
437{
438 int err;
439
440 /* Change address */
441 err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0002);
442 if (err < 0)
443 return err;
444
445 /* Enable 1000 Mbit */
446 err = phy_write(phydev, 0x15, 0x1048);
447 if (err < 0)
448 return err;
449
450 /* Reset address */
451 err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0);
452 if (err < 0)
453 return err;
454
455 err = phy_write(phydev, MII_BMCR, BMCR_RESET);
456 if (err < 0)
457 return err;
458
459 return 0;
460}
461
436static int m88e1145_config_init(struct phy_device *phydev) 462static int m88e1145_config_init(struct phy_device *phydev)
437{ 463{
438 int err; 464 int err;
@@ -686,6 +712,19 @@ static struct phy_driver marvell_drivers[] = {
686 .driver = { .owner = THIS_MODULE }, 712 .driver = { .owner = THIS_MODULE },
687 }, 713 },
688 { 714 {
715 .phy_id = MARVELL_PHY_ID_88E1149R,
716 .phy_id_mask = MARVELL_PHY_ID_MASK,
717 .name = "Marvell 88E1149R",
718 .features = PHY_GBIT_FEATURES,
719 .flags = PHY_HAS_INTERRUPT,
720 .config_init = &m88e1149_config_init,
721 .config_aneg = &m88e1118_config_aneg,
722 .read_status = &genphy_read_status,
723 .ack_interrupt = &marvell_ack_interrupt,
724 .config_intr = &marvell_config_intr,
725 .driver = { .owner = THIS_MODULE },
726 },
727 {
689 .phy_id = MARVELL_PHY_ID_88E1240, 728 .phy_id = MARVELL_PHY_ID_88E1240,
690 .phy_id_mask = MARVELL_PHY_ID_MASK, 729 .phy_id_mask = MARVELL_PHY_ID_MASK,
691 .name = "Marvell 88E1240", 730 .name = "Marvell 88E1240",
@@ -736,6 +775,7 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = {
736 { 0x01410e10, 0xfffffff0 }, 775 { 0x01410e10, 0xfffffff0 },
737 { 0x01410cb0, 0xfffffff0 }, 776 { 0x01410cb0, 0xfffffff0 },
738 { 0x01410cd0, 0xfffffff0 }, 777 { 0x01410cd0, 0xfffffff0 },
778 { 0x01410e50, 0xfffffff0 },
739 { 0x01410e30, 0xfffffff0 }, 779 { 0x01410e30, 0xfffffff0 },
740 { 0x01410e90, 0xfffffff0 }, 780 { 0x01410e90, 0xfffffff0 },
741 { } 781 { }