kernel-aes67/drivers/usb/dwc3
Thinh Nguyen 6d73572206 usb: dwc3: core: Prevent phy suspend during init
GUSB3PIPECTL.SUSPENDENABLE and GUSB2PHYCFG.SUSPHY should be cleared
during initialization. Suspend during initialization can result in
undefined behavior due to clock synchronization failure, which often
seen as core soft reset timeout.

The programming guide recommended these bits to be cleared during
initialization for DWC_usb3.0 version 1.94 and above (along with
DWC_usb31 and DWC_usb32). The current check in the driver does not
account if it's set by default setting from coreConsultant.

This is especially the case for DRD when switching mode to ensure the
phy clocks are available to change mode. Depending on the
platforms/design, some may be affected more than others. This is noted
in the DWC_usb3x programming guide under the above registers.

Let's just disable them during driver load and mode switching. Restore
them when the controller initialization completes.

Note that some platforms workaround this issue by disabling phy suspend
through "snps,dis_u3_susphy_quirk" and "snps,dis_u2_susphy_quirk" when
they should not need to.

Cc: stable@vger.kernel.org
Fixes: 9ba3aca8fe ("usb: dwc3: Disable phy suspend after power-on reset")
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20da4e5a0c4678c9587d3da23f83bdd6d77353e9.1713394973.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-23 16:25:29 -07:00
..
Kconfig usb: dwc3: qcom: Remove ACPI support from glue driver 2024-03-05 13:06:14 +00:00
Makefile usb: dwc3: add Realtek DHC RTD SoC dwc3 glue layer driver 2023-10-02 14:05:24 +02:00
core.c usb: dwc3: core: Prevent phy suspend during init 2024-04-23 16:25:29 -07:00
core.h usb: dwc3: core: Prevent phy suspend during init 2024-04-23 16:25:29 -07:00
debug.h
debugfs.c
drd.c usb: dwc3: Fix default mode initialization 2023-11-21 15:27:40 +01:00
dwc3-am62.c usb: dwc3-am62: add workaround for Errata i2409 2024-03-05 13:23:17 +00:00
dwc3-exynos.c
dwc3-haps.c
dwc3-imx8mp.c usb: dwc3: imx8mp: Fix smatch warning 2023-12-15 18:27:40 +01:00
dwc3-keystone.c
dwc3-meson-g12a.c
dwc3-octeon.c just cleanups and fixes 2023-09-07 10:35:14 -07:00
dwc3-of-simple.c usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller 2024-03-05 13:23:05 +00:00
dwc3-omap.c
dwc3-pci.c usb: dwc3: pci: Drop duplicate ID 2024-03-26 14:58:24 +01:00
dwc3-qcom.c usb: dwc3: qcom: Remove ACPI support from glue driver 2024-03-05 13:06:14 +00:00
dwc3-rtk.c usb: dwc3: add missing of_node_put and platform_device_put 2023-11-21 15:30:43 +01:00
dwc3-st.c
dwc3-xilinx.c usb: dwc3: xilinx: improve error handling for PM APIs 2023-12-15 13:52:29 +01:00
ep0.c usb: dwc3: ep0: Don't reset resource alloc flag 2024-04-18 16:42:21 +02:00
gadget.c usb: dwc3: core: Prevent phy suspend during init 2024-04-23 16:25:29 -07:00
gadget.h Merge 6.8-rc5 into usb-next 2024-02-19 09:13:29 +01:00
host.c usb: dwc3: core: Prevent phy suspend during init 2024-04-23 16:25:29 -07:00
io.h
trace.c
trace.h
ulpi.c