2023-12-13 17:34:55

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again

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.

While at it, fix also the SS PHY interrupt so that it too can be used to
wakeup the system up.

Thanks to Konrad for reporting the probe failure on sc8180x and
providing the corresponding PDC interrupts and to Krishna for providing
the remaining PDC interrupts. The exception is for the second controller
on sm8150 whose PDC vectors I inferred from sdm845.

Note sdm670 and sm6375 need similar fixes and I believe Bjorn is trying
to dig out the corresponding vectors. The SS PHY interrupt on sc8180x
should also be fixed.

Also note that these patches have only been compile tested.

Johan


Johan Hovold (5):
arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts
arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
arm64: dts: qcom: sdm845: fix USB SS wakeup
arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
arm64: dts: qcom: sm8150: fix USB SS wakeup

arch/arm64/boot/dts/qcom/sc8180x.dtsi | 16 ++++++++--------
arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++--------
arch/arm64/boot/dts/qcom/sm8150.dtsi | 16 ++++++++--------
3 files changed, 24 insertions(+), 24 deletions(-)

--
2.41.0


2023-12-13 18:50:04

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again



On 12/13/23 18:33, 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.
>
> While at it, fix also the SS PHY interrupt so that it too can be used to
> wakeup the system up.
>
> Thanks to Konrad for reporting the probe failure on sc8180x and
> providing the corresponding PDC interrupts and to Krishna for providing
> the remaining PDC interrupts. The exception is for the second controller
> on sm8150 whose PDC vectors I inferred from sdm845.
>
> Note sdm670 and sm6375 need similar fixes and I believe Bjorn is trying
> to dig out the corresponding vectors. The SS PHY interrupt on sc8180x
> should also be fixed.
sdm670:

pdc 9 DP
pdc 8 DM
pdc 6 usb3

Konrad

2023-12-14 01:56:34

by Krishna Kurapati

[permalink] [raw]
Subject: Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again



On 12/14/2023 12:19 AM, Konrad Dybcio wrote:
>
>
> On 12/13/23 18:33, 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.
>>
>> While at it, fix also the SS PHY interrupt so that it too can be used to
>> wakeup the system up.
>>
>> Thanks to Konrad for reporting the probe failure on sc8180x and
>> providing the corresponding PDC interrupts and to Krishna for providing
>> the remaining PDC interrupts. The exception is for the second controller
>> on sm8150 whose PDC vectors I inferred from sdm845.
>>
>> Note sdm670 and sm6375 need similar fixes and I believe Bjorn is trying
>> to dig out the corresponding vectors. The SS PHY interrupt on sc8180x
>> should also be fixed.
> sdm670:
>
> pdc 9 DP
> pdc 8 DM
> pdc 6 usb3
>
And for second controller of sdm670/sdm845,

pdc 11 DP
pdc 10 DM
pdc 7 SS

Regards,
Krishna,

2023-12-14 07:47:58

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again

On Thu, Dec 14, 2023 at 07:25:51AM +0530, Krishna Kurapati PSSNV wrote:
> On 12/14/2023 12:19 AM, Konrad Dybcio wrote:
> > On 12/13/23 18:33, Johan Hovold wrote:

> >> Note sdm670 and sm6375 need similar fixes and I believe Bjorn is trying
> >> to dig out the corresponding vectors. The SS PHY interrupt on sc8180x
> >> should also be fixed.
> > sdm670:
> >
> > pdc 9 DP
> > pdc 8 DM
> > pdc 6 usb3
> >
> And for second controller of sdm670/sdm845,
>
> pdc 11 DP
> pdc 10 DM
> pdc 7 SS

Thanks! Looks like we only describe the first controller on sdm670
currently.

I just sent a follow-on series for sdm670 and the sc8180x SS PHY
interrupts here:

https://lore.kernel.org/r/[email protected]

Note that I inferred (guessed) the SS PHY numbers based on
sdm670/sdm845/sm8150 which all appear to use the same configuration.

After that series, only sm6375 remains to be fixed.

Johan

2023-12-17 17:24:44

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again


On Wed, 13 Dec 2023 18:33:58 +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.
>
> [...]

Applied, thanks!

[1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts
commit: 687d402bb350b392fa330e9d9d1b917777ee9ed1
[2/5] arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
commit: 204f9ed4bad6293933179517624143b8f412347c
[3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup
commit: 971f5d8b0618d09db75184ddd8cca0767514db5d
[4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
commit: 134de5e831775e8b178db9b131c1d3769a766982
[5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup
commit: cc4e1da491b84ca05339a19893884cda78f74aef

Best regards,
--
Bjorn Andersson <[email protected]>