Merge branch 'fix-missing-phy-to-mac-rx-clock'
authorJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 02:21:37 +0000 (19:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 02:21:37 +0000 (19:21 -0700)
commit7f9d82a06a5f90f9e75f22c0ad76be9421510e82
treed414f840c1c4f919b1ff1ebd91bc6dcd98325a93
parentaf352c3b666e2ab74be5db9f168960d8ad48b538
parent0f671b3b6edf85cfe6fc80ad42963973bee1838c
Merge branch 'fix-missing-phy-to-mac-rx-clock'

Romain Gantois says:

====================
Fix missing PHY-to-MAC RX clock

There is an issue with some stmmac/PHY combinations that has been reported
some time ago in a couple of different series:

Clark Wang's report:
https://lore.kernel.org/all/20230202081559.3553637-1-xiaoning.wang@nxp.com/
Clément Léger's report:
https://lore.kernel.org/linux-arm-kernel/20230116103926.276869-4-clement.leger@bootlin.com/

Stmmac controllers require an RX clock signal from the MII bus to perform
their hardware initialization successfully. This causes issues with some
PHY/PCS devices. If these devices do not bring the clock signal up before
the MAC driver initializes its hardware, then said initialization will
fail. This can happen at probe time or when the system wakes up from a
suspended state.

This series introduces new flags for phy_device and phylink_pcs. These
flags allow MAC drivers to signal to PHY/PCS drivers that the RX clock
signal should be enabled as soon as possible, and that it should always
stay enabled.

I have included specific uses of these flags that fix the RZN1 GMAC1 stmmac
driver that I am currently working on and that is not yet upstream. I have
also included changes to the at803x PHY driver that should fix the issue
that Clark Wang was having.
====================

Link: https://lore.kernel.org/r/20240326-rxc_bugfix-v6-0-24a74e5c761f@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>