Skip to content

Commit 86ffe92

Browse files
mgrzeschikdavem330
authored andcommitted
net: phy: dp83867: Set FORCE_LINK_GOOD to default after reset
According to the Datasheet this bit should be 0 (Normal operation) in default. With the FORCE_LINK_GOOD bit set, it is not possible to get a link. This patch sets FORCE_LINK_GOOD to the default value after resetting the phy. Signed-off-by: Michael Grzeschik <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 49edd6a commit 86ffe92

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/net/phy/dp83867.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
#define DP83867_PHYCR_FIFO_DEPTH_MAX 0x03
9898
#define DP83867_PHYCR_FIFO_DEPTH_MASK GENMASK(15, 14)
9999
#define DP83867_PHYCR_RESERVED_MASK BIT(11)
100+
#define DP83867_PHYCR_FORCE_LINK_GOOD BIT(10)
100101

101102
/* RGMIIDCTL bits */
102103
#define DP83867_RGMII_TX_CLK_DELAY_MAX 0xf
@@ -599,7 +600,12 @@ static int dp83867_phy_reset(struct phy_device *phydev)
599600

600601
usleep_range(10, 20);
601602

602-
return 0;
603+
/* After reset FORCE_LINK_GOOD bit is set. Although the
604+
* default value should be unset. Disable FORCE_LINK_GOOD
605+
* for the phy to work properly.
606+
*/
607+
return phy_modify(phydev, MII_DP83867_PHYCTRL,
608+
DP83867_PHYCR_FORCE_LINK_GOOD, 0);
603609
}
604610

605611
static struct phy_driver dp83867_driver[] = {

0 commit comments

Comments
 (0)