2023-12-13 17:32:22

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 0/3] ARM: dts: qcom: sdx55: fix USB wakeup interrupts

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 Krishna for providing the PDC interrupt vectors.

Note that these patches have not even been compile tested.

Johan


Johan Hovold (3):
ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'
ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts
ARM: dts: qcom: sdx55: fix USB SS wakeup

arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

--
2.41.0


2023-12-13 17:32:42

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 1/3] ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'

The Qualcomm PDC interrupt controller binding expects two cells in
interrupt specifiers.

Fixes: 9d038b2e62de ("ARM: dts: qcom: Add SDX55 platform and MTP board support")
Cc: [email protected] # 5.12
Cc: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
---
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
index e30dbf12990a..0864c99a3da1 100644
--- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
@@ -612,7 +612,7 @@ pdc: interrupt-controller@b210000 {
compatible = "qcom,sdx55-pdc", "qcom,pdc";
reg = <0x0b210000 0x30000>;
qcom,pdc-ranges = <0 179 52>;
- #interrupt-cells = <3>;
+ #interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupt-controller;
};
--
2.41.0

2023-12-13 17:32:59

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: qcom: sdx55: fix USB SS wakeup

The USB SS PHY interrupt needs to be provided by the PDC interrupt
controller in order to be able to wake the system up from low-power
states.

Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
Cc: [email protected] # 5.12
Cc: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
---
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
index 49910279cb71..5b69219170a8 100644
--- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
@@ -586,7 +586,7 @@ usb: usb@a6f8800 {
assigned-clock-rates = <19200000>, <200000000>;

interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <&intc GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 51 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 11 IRQ_TYPE_EDGE_BOTH>,
<&pdc 10 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
--
2.41.0

2023-12-13 18:47:18

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: sdx55: fix USB SS wakeup



On 12/13/23 18:31, Johan Hovold wrote:
> The USB SS PHY interrupt needs to be provided by the PDC interrupt
> controller in order to be able to wake the system up from low-power
> states.
>
> Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
> Cc: [email protected] # 5.12
> Cc: Manivannan Sadhasivam <[email protected]>
> Signed-off-by: Johan Hovold <[email protected]>
> ---
Matches the downstream kernel too (as it should!)

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2023-12-13 18:47:44

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'



On 12/13/23 18:31, Johan Hovold wrote:
> The Qualcomm PDC interrupt controller binding expects two cells in
> interrupt specifiers.
>
> Fixes: 9d038b2e62de ("ARM: dts: qcom: Add SDX55 platform and MTP board support")
> Cc: [email protected] # 5.12
> Cc: Manivannan Sadhasivam <[email protected]>
> Signed-off-by: Johan Hovold <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2023-12-18 15:45:28

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'

On Wed, Dec 13, 2023 at 06:31:29PM +0100, Johan Hovold wrote:
> The Qualcomm PDC interrupt controller binding expects two cells in
> interrupt specifiers.
>
> Fixes: 9d038b2e62de ("ARM: dts: qcom: Add SDX55 platform and MTP board support")
> Cc: [email protected] # 5.12
> Cc: Manivannan Sadhasivam <[email protected]>
> Signed-off-by: Johan Hovold <[email protected]>

Reviewed-by: Manivannan Sadhasivam <[email protected]>

- Mani

> ---
> arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> index e30dbf12990a..0864c99a3da1 100644
> --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> @@ -612,7 +612,7 @@ pdc: interrupt-controller@b210000 {
> compatible = "qcom,sdx55-pdc", "qcom,pdc";
> reg = <0x0b210000 0x30000>;
> qcom,pdc-ranges = <0 179 52>;
> - #interrupt-cells = <3>;
> + #interrupt-cells = <2>;
> interrupt-parent = <&intc>;
> interrupt-controller;
> };
> --
> 2.41.0
>

--
மணிவண்ணன் சதாசிவம்

2023-12-18 16:23:06

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: sdx55: fix USB SS wakeup

On Wed, Dec 13, 2023 at 06:31:31PM +0100, Johan Hovold wrote:
> The USB SS PHY interrupt needs to be provided by the PDC interrupt
> controller in order to be able to wake the system up from low-power
> states.
>
> Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
> Cc: [email protected] # 5.12
> Cc: Manivannan Sadhasivam <[email protected]>
> Signed-off-by: Johan Hovold <[email protected]>

Reviewed-by: Manivannan Sadhasivam <[email protected]>

- Mani

> ---
> arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> index 49910279cb71..5b69219170a8 100644
> --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi
> @@ -586,7 +586,7 @@ usb: usb@a6f8800 {
> assigned-clock-rates = <19200000>, <200000000>;
>
> interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
> - <&intc GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
> + <&pdc 51 IRQ_TYPE_LEVEL_HIGH>,
> <&pdc 11 IRQ_TYPE_EDGE_BOTH>,
> <&pdc 10 IRQ_TYPE_EDGE_BOTH>;
> interrupt-names = "hs_phy_irq", "ss_phy_irq",
> --
> 2.41.0
>

--
மணிவண்ணன் சதாசிவம்

2023-12-19 19:35:23

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: dts: qcom: sdx55: fix USB wakeup interrupts


On Wed, 13 Dec 2023 18:31:28 +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/3] ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells'
commit: cc25bd06c16aa582596a058d375b2e3133f79b93
[2/3] ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts
commit: de95f139394a5ed82270f005bc441d2e7c1e51b7
[3/3] ARM: dts: qcom: sdx55: fix USB SS wakeup
commit: 710dd03464e4ab5b3d329768388b165d61958577

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