Skip to content

Commit 07151bc

Browse files
madalinbucurdavem330
authored andcommitted
net: phy: select copper mode when Marvel 88e1111 in SGMII
For the Marvel 88e1111 PHY only two SGMII modes are available, both allowing only SGMII to copper mode (with or without clock). SGMII to fiber mode is not supported. Make sure the fiber/copper registers selector bits are cleared for selecting copper mode. Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c4bc44c commit 07151bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/phy/marvell.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define MII_M1011_PHY_SCR_MDI_X 0x0020
5353
#define MII_M1011_PHY_SCR_AUTO_CROSS 0x0060
5454

55+
#define MII_M1145_PHY_EXT_ADDR_PAGE 0x16
5556
#define MII_M1145_PHY_EXT_SR 0x1b
5657
#define MII_M1145_PHY_EXT_CR 0x14
5758
#define MII_M1145_RGMII_RX_DELAY 0x0080
@@ -552,6 +553,16 @@ static int m88e1111_config_init(struct phy_device *phydev)
552553
err = phy_write(phydev, MII_M1111_PHY_EXT_SR, temp);
553554
if (err < 0)
554555
return err;
556+
557+
/* make sure copper is selected */
558+
err = phy_read(phydev, MII_M1145_PHY_EXT_ADDR_PAGE);
559+
if (err < 0)
560+
return err;
561+
562+
err = phy_write(phydev, MII_M1145_PHY_EXT_ADDR_PAGE,
563+
err & (~0xff));
564+
if (err < 0)
565+
return err;
555566
}
556567

557568
if (phydev->interface == PHY_INTERFACE_MODE_RTBI) {

0 commit comments

Comments
 (0)