[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZXzph8s_WF09VdtZ@radian>
Date: Fri, 15 Dec 2023 19:04:23 -0500
From: Richard Acayan <mailingradian@...il.com>
To: Johan Hovold <johan@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>, Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 1/3] arm64: dts: qcom: sdm670: fix USB DP/DM HS PHY
interrupts
On Fri, Dec 15, 2023 at 08:34:39AM +0100, Johan Hovold wrote:
> On Thu, Dec 14, 2023 at 08:46:27PM -0500, Richard Acayan wrote:
> > On Thu, Dec 14, 2023 at 08:43:17AM +0100, Johan Hovold wrote:
> > > The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt
> > > controller in order to be able to wake the system up from low-power
> > > states and to be able to detect disconnect events, which requires
> > > triggering on falling edges.
> > >
> > > A recent commit updated the trigger type but failed to change the
> > > interrupt provider as required. This leads to the current Linux driver
> > > failing to probe instead of printing an error during suspend and USB
> > > wakeup not working as intended.
> > >
> > > Fixes: de3b3de30999 ("arm64: dts: qcom: sdm670: fix USB wakeup interrupt types")
> > > Fixes: 07c8ded6e373 ("arm64: dts: qcom: add sdm670 and pixel 3a device trees")
> > > Cc: stable@...r.kernel.org # 6.2
> > > Cc: Richard Acayan <mailingradian@...il.com>
> > > Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> > > ---
> >
> > Tested-by: Richard Acayan <mailingradian@...il.com>
> >
> > On a Pixel 3a, plugging in a USB cable doesn't wake up the device
> > (presumably because there is no wakeup-source property) but this gets
> > USB working again on linux-next.
>
> Thanks for testing. And yes, the wakeup interrupts will indeed not be
> enabled at system suspend unless the wakeup-source property is there.
> Did you try adding it?
Just tested today. Adding it does not cause the system to wake up when
plugging in a laptop on the Pixel 3a, but that might just be because
USB wakeups are disabled when the adapter is configured for peripheral
mode.
drivers/usb/dwc3/dwc3-qcom.c (dwc3_qcom_suspend):
/*
* The role is stable during suspend as role switching is done from a
* freezable workqueue.
*/
if (dwc3_qcom_is_host(qcom) && wakeup) {
qcom->usb2_speed = dwc3_qcom_read_usb2_speed(qcom);
dwc3_qcom_enable_interrupts(qcom);
}
Powered by blists - more mailing lists