sst-linux/drivers/usb
Roger Quadros 85ca88f931 usb: dwc3: core: Fix system suspend on TI AM62 platforms
[ Upstream commit 705e3ce37bccdf2ed6f848356ff355f480d51a91 ]

Since commit 6d735722063a ("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: 6d735722063a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-01 01:56:02 +01:00
..
atm
c67x00
cdns3 usb: xhci: fix loss of data on Cadence xHC 2024-10-17 15:21:25 +02:00
chipidea usb: chipidea: udc: enable suspend interrupt after usb reset 2024-10-17 15:22:16 +02:00
class USB: class: CDC-ACM: fix race between get_serial and set_serial 2024-10-17 15:21:19 +02:00
common
core usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() 2024-09-04 13:25:04 +02:00
dwc2 usb: dwc2: Adjust the timing of USB Driver Interrupt Registration in the Crashkernel Scenario 2024-10-17 15:22:16 +02:00
dwc3 usb: dwc3: core: Fix system suspend on TI AM62 platforms 2024-11-01 01:56:02 +01:00
early
gadget usb: gadget: Add function wakeup support 2024-11-01 01:56:02 +01:00
host XHCI: Separate PORT and CAPs macros into dedicated file 2024-11-01 01:56:02 +01:00
image
isp1760
misc Revert "usb: yurex: Replace snprintf() with the safer scnprintf() variant" 2024-10-17 15:22:25 +02:00
mon
mtu3
musb
phy
renesas_usbhs
roles
serial USB: serial: option: add Telit FN920C04 MBIM compositions 2024-10-22 15:56:49 +02:00
storage usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip 2024-10-17 15:22:25 +02:00
typec usb: typec: altmode should keep reference to parent 2024-11-01 01:56:00 +01:00
usbip usbip: Don't submit special requests twice 2024-09-08 07:53:10 +02:00
Kconfig
Makefile
usb-skeleton.c