Skip to content

Commit 0eec552

Browse files
Milos Reljingregkh
Milos Reljin
authored andcommitted
net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset
commit bd1bbab upstream. In application note (AN13663) for TJA1120, on page 30, there's a figure with average PHY startup timing values following software reset. The time it takes for SMI to become operational after software reset ranges roughly from 500 us to 1500 us. This commit adds 2000 us delay after MDIO write which triggers software reset. Without this delay, soft_reset function returns an error and prevents successful PHY init. Cc: [email protected] Fixes: b050f2f ("phy: nxp-c45: add driver for tja1103") Signed-off-by: Milos Reljin <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/AM8P250MB0124D258E5A71041AF2CC322E1E32@AM8P250MB0124.EURP250.PROD.OUTLOOK.COM Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 47523fc commit 0eec552

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/phy/nxp-c45-tja11xx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,8 @@ static int nxp_c45_soft_reset(struct phy_device *phydev)
12971297
if (ret)
12981298
return ret;
12991299

1300+
usleep_range(2000, 2050);
1301+
13001302
return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
13011303
VEND1_DEVICE_CONTROL, ret,
13021304
!(ret & DEVICE_CONTROL_RESET), 20000,

0 commit comments

Comments
 (0)