net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 3 Jul 2024 18:14:59 +0000 (20:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jul 2024 03:23:55 +0000 (20:23 -0700)
commit3c466d6537b99f801b3f68af3d8124d4312437a0
treee64ae7ab72682c60e1ae261d5a35dbf854262ad8
parent61e9be0efbe88b5cb6be6a859167a0f3724b6305
net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3

On sa8775p-ride-r3 the RX clocks from the AQR115C PHY are not available at
the time of the DMA reset. We can however extract the RX clock from the
internal SERDES block. Once the link is up, we can revert to the
previous state.

The AQR115C PHY doesn't support in-band signalling so we can count on
getting the link up notification and safely reuse existing callbacks
which are already used by another HW quirk workaround which enables the
functional clock to avoid a DMA reset due to timeout.

Only enable loopback on revision 3 of the board - check the phy_mode to
make sure.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240703181500.28491-3-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c