linux_dsm_epyc7002/drivers/phy/marvell
Russell King 1dea06cd64 phy: armada-38x: fix NETA lockup when repeatedly switching speeds
The mvneta hardware appears to lock up in various random ways when
repeatedly switching speeds between 1G and 2.5G, which involves
reprogramming the COMPHY.  It is not entirely clear why this happens,
but best guess is that reprogramming the COMPHY glitches mvneta clocks
causing the hardware to fail.  It seems that rebooting resolves the
failure, but not down/up cycling the interface alone.

Various other approaches have been tried, such as trying to cleanly
power down the COMPHY and then take it back through the power up
initialisation, but this does not seem to help.

It was finally noticed that u-boot's last step when configuring a
COMPHY for "SGMII" mode was to poke at a register described as
"GBE_CONFIGURATION_REG", which is undocumented in any external
documentation.  All that we have is the fact that u-boot sets a bit
corresponding to the "SGMII" lane at the end of COMPHY initialisation.

Experimentation shows that if we clear this bit prior to changing the
speed, and then set it afterwards, mvneta does not suffer this problem
on the SolidRun Clearfog when switching speeds between 1G and 2.5G.

This problem was found while script-testing phylink.

This fix also requires the corresponding change to DT to be effective.
See "ARM: dts: armada-38x: fix NETA lockup when repeatedly switching
speeds".

Fixes: 14dc100b44 ("phy: armada38x: add common phy support")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/E1jxtRj-0003Tz-CG@rmk-PC.armlinux.org.uk
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-07-21 22:57:46 +05:30
..
Kconfig phy: Enable compile testing for some of drivers 2020-01-06 10:35:00 +01:00
Makefile phy: Add USB2 PHY driver for Marvell MMP3 SoC 2019-10-17 16:43:04 +02:00
phy-armada38x-comphy.c phy: armada-38x: fix NETA lockup when repeatedly switching speeds 2020-07-21 22:57:46 +05:30
phy-armada375-usb2.c phy: armada375-usb2: switch to SPDX license identifier 2019-02-07 11:10:45 +05:30
phy-berlin-sata.c phy: fix build breakage: add PHY_MODE_SATA 2019-01-16 18:00:54 +05:30
phy-berlin-usb.c phy: berlin: switch to SPDX license identifier 2018-07-10 13:45:12 +05:30
phy-mmp3-usb.c phy: Add USB2 PHY driver for Marvell MMP3 SoC 2019-10-17 16:43:04 +02:00
phy-mvebu-a3700-comphy.c phy: mvebu-a3700-comphy: Inform users if their firmware is too old 2019-08-23 09:41:00 +05:30
phy-mvebu-a3700-utmi.c phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments 2020-07-13 12:14:37 +05:30
phy-mvebu-cp110-comphy.c net: switch to using PHY_INTERFACE_MODE_10GBASER rather than 10GKR 2020-01-05 15:05:35 -08:00
phy-mvebu-sata.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
phy-pxa-28nm-hsic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
phy-pxa-28nm-usb2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
phy-pxa-usb.c phy: phy-pxa-usb: add a new driver 2018-10-18 19:44:39 +02:00