linux/drivers/phy
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
..
allwinner Merge branch 'fixes' into next 2020-07-17 13:45:53 +05:30
amlogic USB: changes for v5.8 merge window 2020-05-25 13:28:20 +02:00
broadcom drivers: phy: sr-usb: do not use internal fsm for USB2 phy init 2020-05-18 19:30:56 +05:30
cadence phy: cadence: salvo: fix wrong bit definition 2020-07-13 10:39:44 +05:30
freescale phy: for 5.3 2019-07-01 15:04:59 +02:00
hisilicon phy: hisilicon: Fix Kconfig indentation 2019-12-20 17:00:45 +05:30
intel phy: intel: fix enum type mismatch warning 2020-06-24 17:41:40 +05:30
lantiq phy: lantiq: vrx200-pcie: Remove unneeded semicolon 2020-01-08 12:58:06 +05:30
marvell phy: armada-38x: fix NETA lockup when repeatedly switching speeds 2020-07-21 22:57:46 +05:30
mediatek phy: phy-mtk-tphy: add a new reference clock 2020-03-20 19:34:29 +05:30
motorola phy: mapphone-mdm6600: Add missing description for some structure fields 2020-07-13 12:14:46 +05:30
mscc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qualcomm phy: qualcomm: add qcom ipq806x dwc usb phy driver 2020-07-20 11:54:03 +05:30
ralink treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
renesas phy: renesas: rcar-gen3-usb2: exit if request_irq() failed 2020-07-20 12:03:44 +05:30
rockchip Merge branch 'fixes' into next 2020-07-17 13:45:53 +05:30
samsung phy: samsung-ufs: Fix IS_ERR argument 2020-07-21 16:09:11 +05:30
socionext phy: uniphier-pcie: Add SoC-dependent phy-mode function support 2020-03-20 19:34:29 +05:30
st phy: stm32: use NULL instead of zero 2020-07-13 12:15:46 +05:30
tegra phy: tegra: Select USB_COMMON for usb_get_maximum_speed() 2020-04-24 13:12:14 +05:30
ti Merge branch 'fixes' into next 2020-07-17 13:45:53 +05:30
xilinx phy: zynqmp: Fix unused-function compiler warning 2020-07-01 20:35:29 +05:30
Kconfig phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver 2020-06-29 18:48:00 +05:30
Makefile phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver 2020-06-29 18:48:00 +05:30
phy-core-mipi-dphy.c phy: dphy: Change units of wakeup and init parameters 2019-02-07 11:11:05 +05:30
phy-core.c phy: core: Document function args 2020-07-08 16:40:21 +05:30
phy-lpc18xx-usb-otg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
phy-pistachio-usb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
phy-xgene.c phy: xgene: remove unsigned integer comparison with less than zero 2020-07-13 12:14:51 +05:30