]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
authorDiogo Silva <diogompaissilva@gmail.com>
Sat, 2 Nov 2024 15:15:05 +0000 (16:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:13:36 +0000 (13:13 +0100)
commit3fc95c9771cc848b6a5eea60d7896cdbbce0d3fc
tree61d13afc3f0172c8ed468f8f54dfc76467f84dc1
parente36482b222e00cc7aeeea772fc0cf2943590bc4d
net: phy: ti: add PHY_RST_AFTER_CLK_EN flag

[ Upstream commit 256748d5480bb3c4b731236c6d6fc86a8e2815d8 ]

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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 34e45ad9378c ("net: phy: dp83848: Add TI DP83848 Ethernet PHY")
Link: https://patch.msgid.link/20241102151504.811306-1-paissilva@ld-100007.ds1.internal
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/dp83848.c