[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<AM8P250MB012472082CA9B9C0C1A5F199E1E62@AM8P250MB0124.EURP250.PROD.OUTLOOK.COM>
Date: Tue, 21 Jan 2025 15:27:37 +0000
From: Milos Reljin <milos_reljin@...look.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jakub Kicinski <kuba@...nel.org>, andrei.botila@....nxp.com,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, milos.reljin@...rk.com
Subject: Re: [PATCH] net: phy: c45-tjaxx: add delay between MDIO write and
read in soft_reset
On Tue, Jan 21, 2025 at 03:02:17PM +0100, Andrew Lunn wrote:
> > If you have access to TJA1120's application note (AN13663), page 30
> > contains info on startup timing.
>
> You could summarise what the datasheet says in the commit message. It
> then becomes clear where you got the values from, making a good
> justification.
>
> Andrew
Good suggestion, thanks. I'll add this in the next version of patch.
In datasheet there's a figure with average PHY startup timing values
with measurement uncertainty following software reset.
The time it takes for SMI to become operational after software reset
ranges roughly from 500 us to 1500 us.
In the next version of this patch, instead of setting the last parameter
of phy_read_mmd_poll_timeout (sleep_before_read) to true (which adds a
20000 us sleep and by datasheet is excessive), I can add:
usleep_range(2000, 2050);
before the line with phy_read_mmd_poll_timeout. I tested with 1000 us
and it was working, but to be sure, 2000 us should cover the worst case.
Powered by blists - more mailing lists