* [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
@ 2024-11-02 15:15 Diogo Silva
2024-11-02 17:03 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Diogo Silva @ 2024-11-02 15:15 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, marex, tolvupostur, Diogo Silva
From: Diogo Silva <diogompaissilva@gmail.com>
DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
make sure that this indication is respected.
In my experience not having this flag enabled would lead to, on some
boots, the wrong MII mode being selected if the PHY was initialized on
the bootloader and was receiving data during Linux boot.
Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>
---
drivers/net/phy/dp83848.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 937061acfc61..351411f0aa6f 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -147,6 +147,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
/* IRQ related */ \
.config_intr = dp83848_config_intr, \
.handle_interrupt = dp83848_handle_interrupt, \
+ \
+ .flags = PHY_RST_AFTER_CLK_EN, \
}
static struct phy_driver dp83848_driver[] = {
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
2024-11-02 15:15 [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Diogo Silva
@ 2024-11-02 17:03 ` Andrew Lunn
2024-11-03 10:24 ` Diogo Silva
2024-11-03 15:20 ` Andrew Lunn
2024-11-06 1:50 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2024-11-02 17:03 UTC (permalink / raw)
To: Diogo Silva
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, marex, tolvupostur
On Sat, Nov 02, 2024 at 04:15:05PM +0100, Diogo Silva wrote:
> From: Diogo Silva <diogompaissilva@gmail.com>
>
> DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
> toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
> make sure that this indication is respected.
Do you have the datasheets for the other three devices this driver
supports? Do they all require this flag?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
2024-11-02 17:03 ` Andrew Lunn
@ 2024-11-03 10:24 ` Diogo Silva
0 siblings, 0 replies; 5+ messages in thread
From: Diogo Silva @ 2024-11-03 10:24 UTC (permalink / raw)
To: Andrew Lunn
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, marex, tolvupostur
Hi Andrew,
I assume "TI DP83848C" and "NS DP83848C" are the same device, just
rebranded after Texas Instruments acquired National Semiconductors.
For both TLK10X and DP83620, both their datasheets have the same power
up timing sequence as the DP83848C (as far as clock and reset goes)
[1][2].
Best regards,
Diogo Silva
[1] https://www.ti.com/lit/ds/symlink/tlk105.pdf (section 9.10.1 -
Power Up Timing)
[2] https://www.ti.com/lit/ds/symlink/dp83620.pdf (section 4.5 - Power
Up Timing)
On Sat, 2 Nov 2024 at 18:03, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sat, Nov 02, 2024 at 04:15:05PM +0100, Diogo Silva wrote:
> > From: Diogo Silva <diogompaissilva@gmail.com>
> >
> > DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
> > toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
> > make sure that this indication is respected.
>
> Do you have the datasheets for the other three devices this driver
> supports? Do they all require this flag?
>
> Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
2024-11-02 15:15 [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Diogo Silva
2024-11-02 17:03 ` Andrew Lunn
@ 2024-11-03 15:20 ` Andrew Lunn
2024-11-06 1:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2024-11-03 15:20 UTC (permalink / raw)
To: Diogo Silva
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, marex, tolvupostur
On Sat, Nov 02, 2024 at 04:15:05PM +0100, Diogo Silva wrote:
> From: Diogo Silva <diogompaissilva@gmail.com>
>
> DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
> toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
> make sure that this indication is respected.
>
> In my experience not having this flag enabled would lead to, on some
> boots, the wrong MII mode being selected if the PHY was initialized on
> the bootloader and was receiving data during Linux boot.
>
> Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>
This should be merged to net.
Fixes: 34e45ad9378c ("net: phy: dp83848: Add TI DP83848 Ethernet PHY")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
2024-11-02 15:15 [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Diogo Silva
2024-11-02 17:03 ` Andrew Lunn
2024-11-03 15:20 ` Andrew Lunn
@ 2024-11-06 1:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-06 1:50 UTC (permalink / raw)
To: Diogo Silva
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, marex, tolvupostur
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 2 Nov 2024 16:15:05 +0100 you wrote:
> From: Diogo Silva <diogompaissilva@gmail.com>
>
> DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
> toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
> make sure that this indication is respected.
>
> In my experience not having this flag enabled would lead to, on some
> boots, the wrong MII mode being selected if the PHY was initialized on
> the bootloader and was receiving data during Linux boot.
>
> [...]
Here is the summary with links:
- net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
https://git.kernel.org/netdev/net/c/256748d5480b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-06 1:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-02 15:15 [PATCH] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Diogo Silva
2024-11-02 17:03 ` Andrew Lunn
2024-11-03 10:24 ` Diogo Silva
2024-11-03 15:20 ` Andrew Lunn
2024-11-06 1:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox