linux/drivers/usb/dwc3
Roger Quadros 705e3ce37b usb: dwc3: core: Fix system suspend on TI AM62 platforms
Since commit 6d73572206 ("usb: dwc3: core: Prevent phy suspend during init"),
system suspend is broken on AM62 TI platforms.

Before that commit, both DWC3_GUSB3PIPECTL_SUSPHY and DWC3_GUSB2PHYCFG_SUSPHY
bits (hence forth called 2 SUSPHY bits) were being set during core
initialization and even during core re-initialization after a system
suspend/resume.

These bits are required to be set for system suspend/resume to work correctly
on AM62 platforms.

Since that commit, the 2 SUSPHY bits are not set for DEVICE/OTG mode if gadget
driver is not loaded and started.
For Host mode, the 2 SUSPHY bits are set before the first system suspend but
get cleared at system resume during core re-init and are never set again.

This patch resovles these two issues by ensuring the 2 SUSPHY bits are set
before system suspend and restored to the original state during system resume.

Cc: stable@vger.kernel.org # v6.9+
Fixes: 6d73572206 ("usb: dwc3: core: Prevent phy suspend during init")
Link: https://lore.kernel.org/all/1519dbe7-73b6-4afc-bfe3-23f4f75d772f@kernel.org/
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Tested-by: Markus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20241011-am62-lpm-usb-v3-1-562d445625b5@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-16 10:25:48 +02:00
..
core.c usb: dwc3: core: Fix system suspend on TI AM62 platforms 2024-10-16 10:25:48 +02:00
core.h usb: dwc3: core: Fix system suspend on TI AM62 platforms 2024-10-16 10:25:48 +02:00
debug.h usb: dwc3: Add function suspend and function wakeup support 2023-03-29 10:27:01 +02:00
debugfs.c usb: dwc3: debugfs: Resume dwc3 before accessing registers 2023-05-13 17:56:22 +09:00
drd.c usb: dwc3: core: Refactor PHY logic to support Multiport Controller 2024-04-23 19:56:09 -07:00
dwc3-am62.c usb: dwc3-am62: add workaround for Errata i2409 2024-03-05 13:23:17 +00:00
dwc3-exynos.c usb: dwc3: exynos: add support for Google Tensor gs101 2024-04-30 19:32:06 +02:00
dwc3-haps.c usb: dwc3: haps: Constify the software node 2021-02-04 15:42:06 +01:00
dwc3-imx8mp.c usb: dwc3: imx8mp: disable SS_CON and U3 wakeup for system sleep 2024-09-11 15:37:52 +02:00
dwc3-keystone.c usb: dwc3: remove unnecessary platform_set_drvdata() 2023-08-22 14:45:19 +02:00
dwc3-meson-g12a.c usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-08-22 14:44:09 +02:00
dwc3-octeon.c usb: dwc3: Use of_property_read_variable_u32_array() to read "power" 2024-08-07 12:51:20 +02: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 usb: dwc3: omap: add missing depopulate in probe error path 2024-08-22 17:29:16 +08:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Panther Lake 2024-07-03 16:06:32 +02:00
dwc3-qcom.c usb: dwc3: qcom: simplify with devm_platform_ioremap_resource 2024-09-03 09:52:46 +02:00
dwc3-rtk.c usb: dwc3: rtk: Clean up error code in __get_dwc3_maximum_speed() 2024-09-13 07:41:12 +02:00
dwc3-st.c usb: dwc3: st: simplify pdev->dev usage 2024-09-03 09:52:45 +02:00
dwc3-xilinx.c usb: dwc3: xilinx: simplify with dev_err_probe 2024-09-03 09:52:46 +02:00
ep0.c usb: dwc3: ep0: Don't reset resource alloc flag (including ep0) 2024-08-22 17:34:10 +08:00
gadget.c usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG 2024-10-16 10:25:28 +02:00
gadget.h Merge 6.8-rc5 into usb-next 2024-02-19 09:13:29 +01:00
host.c usb: dwc3: Support quirk for writing high-low order 2024-06-20 19:30:30 +02:00
io.h usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02: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
trace.c usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ulpi.c usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression 2020-12-28 15:55:44 +01:00