net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset
Subsystems (4)
PATCH v3 1/1 net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset
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.
---
Changes in v3:
- Added Fixes and Cc tags, net tree indicator in Subject.
Changes in v2:
- Updated commit message to clear up where the delay value comes from.
- Delay added with usleep_range instead of changing sleep_before_read parameter of phy_read_mmd_poll_timeout to avoid excessive delay.
--- drivers/net/phy/nxp-c45-tja11xx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/phy/nxp-c45-tja11xx.c +2 -0
@@ -1297,6 +1297,8 @@ static int nxp_c45_soft_reset(struct phy_device *phydev)if (ret)return ret; +usleep_range (2000 ,2050 ); + return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, VEND1_DEVICE_CONTROL, ret, !(ret & DEVICE_CONTROL_RESET), 20000,
Signature · 1 line
2.34.1
Quoted 5 lines · Milos Reljin
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.
Quoted 7 lines
This commit adds 2000 us delay after MDIO write which triggers software reset. Without this delay,
soft_resetfunction returns an error and prevents successful PHY init.Fixes b050f2f15e04 ("phy: nxp-c45: add driver for tja1103")Signed-off-by Milos Reljin <[email protected]>
Andrew
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Fri, 24 Jan 2025 10:41:02 +0000 you wrote:
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_resetfunction returns an error and prevents successful PHY init.[...]
Here is the summary with links:
- [net,v3] net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset
https://git.kernel.org/netdev/net/c/bd1bbab71760
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html