Re: [PATCH] usb: dwc3: qcom: Check for L2 only when suspending a host with wakeup
From: Peter Chen
Date: Wed Oct 21 2026 - 23:30:36 EST
On 26-10-21 15:44:52, Konrad Dybcio wrote:
> On 9/28/26 8:16 PM, Fabricio Akio via B4 Relay wrote:
> > From: Fabricio Akio <fabricioakio@xxxxxxxxx>
> >
> > In peripheral mode the core disconnects and powers the PHY off before
> > the glue suspends, so the link never enters L2 and every system
> > suspend logs "HS-PHY not in L2". Check only for a host with wakeup,
> > the one case that parks the PHY in L2.
> >
> > Signed-off-by: Fabricio Akio <fabricioakio@xxxxxxxxx>
> > ---
>
> I think we should be able to retain the link in L2 in device
> mode too upon suspend, but that needs more plumbing on the
> clock/gdsc side? (+Cc)
>
>From what I see, dwc3 core just keeps gadget (device mode) disconnecting
when dwc3 core enters suspend. The reason is probably dwc3 core wakeup signal
(through .dwc3_gadget_wakeup or dwc3_gadget_func_wakeup) is send by software.
When the system has suspended, no software has run, so can't trigger wakeup.
For runtime suspend, current dwc3 core doesn't consider link suspend event
(eg, L2/U3) as low power event, and doesn't put dwc3 core entering runtime
suspend, so the link is always L2 or U3.
Thinh/Wesley, if I understand wrong, please correct me.
--
Thanks,
Peter Chen