Skip to contentSkip to conversation

ARM: dts: qcom: sdx55: fix USB wakeup interrupts

PATCH Applied Johan Hovold 4 participants 11 messages Dec 13, 2023 – Dec 19, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.41.0
#1 lore raw

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 Manivannan Sadhasivam <[email protected]>
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +1 -1
index e30dbf12990a..0864c99a3da1 100644
@@ -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;
 		};
Signature · 1 line
2.41.0
Reviewed-by on v1 1/3
#2 lore raw

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

Quoted 8 lines · Johan Hovold

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 Manivannan Sadhasivam <[email protected]>

---

Konrad

Reviewed-by on v1 1/3
#3 lore raw

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

In reply to Johan Hovold
Quoted 7 lines · Johan Hovold

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 Manivannan Sadhasivam <[email protected]>

- Mani

Quoted 20 lines
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +1 -1
index e30dbf12990a..0864c99a3da1 100644
@@ -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;
 		};
Signature · 1 line
2.41.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#4 lore raw

PATCH 2/3 ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts

In reply to Johan Hovold

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 d0ec3c4c11c3 ("ARM: dts: qcom: sdx55: fix USB wakeup interrupt types")
Fixes fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
Cc Manivannan Sadhasivam <[email protected]>
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +4 -4
index 0864c99a3da1..49910279cb71 100644
@@ -585,10 +585,10 @@ usb: usb@a6f8800 {
 					  <&gcc GCC_USB30_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <200000000>;
 
-			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 158 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 157 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 11 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 10 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
Signature · 1 line
2.41.0
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts

Quoted 10 lines · Johan Hovold

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.

Quoted 6 lines
Fixes d0ec3c4c11c3 ("ARM: dts: qcom: sdx55: fix USB wakeup interrupt types")
Fixes fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
Cc Manivannan Sadhasivam <[email protected]>

---

Matches the downstream kernel too (as it should!)

Konrad

Reviewed-by on v1 2/3
#6 lore raw

Re: [PATCH 2/3] ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts

In reply to Johan Hovold
Quoted 10 lines · Johan Hovold

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.

Quoted 5 lines
Fixes d0ec3c4c11c3 ("ARM: dts: qcom: sdx55: fix USB wakeup interrupt types")
Fixes fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support")
Cc Manivannan Sadhasivam <[email protected]>

- Mani

Quoted 26 lines
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +4 -4
index 0864c99a3da1..49910279cb71 100644
@@ -585,10 +585,10 @@ usb: usb@a6f8800 {
 					  <&gcc GCC_USB30_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <200000000>;
 
-			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 158 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 157 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 11 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 10 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
Signature · 1 line
2.41.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#7 lore raw

PATCH 3/3 ARM: dts: qcom: sdx55: fix USB SS wakeup

In reply to Johan Hovold

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 Manivannan Sadhasivam <[email protected]>
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +1 -1
index 49910279cb71..5b69219170a8 100644
@@ -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",
Signature · 1 line
2.41.0
Reviewed-by on v1 3/3
#8 lore raw

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

Quoted 9 lines · Johan Hovold

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 Manivannan Sadhasivam <[email protected]>

---

Matches the downstream kernel too (as it should!)

Konrad

Reviewed-by on v1 3/3
#9 lore raw

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

In reply to Johan Hovold
Quoted 8 lines · Johan Hovold

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 Manivannan Sadhasivam <[email protected]>

- Mani

Quoted 20 lines
---
 arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +1 -1
index 49910279cb71..5b69219170a8 100644
@@ -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",
Signature · 1 line
2.41.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்
maintainer Applied
#10 lore raw
In reply to Johan Hovold
Quoted 11 lines · Johan Hovold

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,

Signature · 1 line
Bjorn Andersson <[email protected]>