Re: [PATCH v3] usb: dwc3: core: Fix system suspend on TI AM62 platforms

From: Dhruva Gole
Date: Mon Oct 14 2024 - 12:34:19 EST


On Oct 11, 2024 at 13:53:24 +0300, Roger Quadros wrote:
> 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.

Thanks for the fix Roger,
Reviewed-by: Dhruva Gole <d-gole@xxxxxx>

>
> Cc: stable@xxxxxxxxxxxxxxx # v6.9+
> Fixes: 6d735722063a ("usb: dwc3: core: Prevent phy suspend during init")
> Link: https://lore.kernel.org/all/1519dbe7-73b6-4afc-bfe3-23f4f75d772f@xxxxxxxxxx/
> Signed-off-by: Roger Quadros <rogerq@xxxxxxxxxx>
> Acked-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
> ---
> Changes in v3:
[...]

--
Best regards,
Dhruva Gole
Texas Instruments Incorporated