All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again
@ 2023-12-13 17:33 Johan Hovold
  2023-12-13 17:33 ` [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts Johan Hovold
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:33 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, 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.

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
@ 2023-12-13 17:33 ` Johan Hovold
  2023-12-14 17:59   ` Konrad Dybcio
  2023-12-13 17:34 ` [PATCH 2/5] arm64: dts: qcom: sdm845: " Johan Hovold
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:33 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, Johan Hovold, stable, Vinod Koul

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: 0dc0f6da3d43 ("arm64: dts: qcom: sc8180x: fix USB wakeup interrupt types")
Fixes: b080f53a8f44 ("arm64: dts: qcom: sc8180x: Add remoteprocs, wifi and usb nodes")
Cc: stable@vger.kernel.org      # 6.5
Cc: Vinod Koul <vkoul@kernel.org>
Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 7a9cb0418ac1..8f95779c75fa 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -2548,10 +2548,10 @@ gem_noc: interconnect@9680000 {
 		usb_prim: usb@a6f8800 {
 			compatible = "qcom,sc8180x-dwc3", "qcom,dwc3";
 			reg = <0 0x0a6f8800 0 0x400>;
-			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 488 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 489 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq",
 					  "ss_phy_irq",
 					  "dm_hs_phy_irq",
@@ -2622,10 +2622,10 @@ usb_sec: usb@a8f8800 {
 				      "xo";
 			resets = <&gcc GCC_USB30_SEC_BCR>;
 			power-domains = <&gcc USB30_SEC_GDSC>;
-			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 490 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 491 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/5] arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
  2023-12-13 17:33 ` [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts Johan Hovold
@ 2023-12-13 17:34 ` Johan Hovold
  2023-12-13 18:58   ` Konrad Dybcio
  2023-12-13 17:34 ` [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup Johan Hovold
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:34 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, Johan Hovold, stable

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: 84ad9ac8d9ca ("arm64: dts: qcom: sdm845: fix USB wakeup interrupt types")
Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Cc: stable@vger.kernel.org      # 4.20
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 0d2be706505a..97ee02469d69 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4053,10 +4053,10 @@ usb_1: usb@a6f8800 {
 					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <150000000>;
 
-			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 488 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 489 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
@@ -4104,10 +4104,10 @@ usb_2: usb@a8f8800 {
 					  <&gcc GCC_USB30_SEC_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <150000000>;
 
-			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 490 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 491 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
  2023-12-13 17:33 ` [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts Johan Hovold
  2023-12-13 17:34 ` [PATCH 2/5] arm64: dts: qcom: sdm845: " Johan Hovold
@ 2023-12-13 17:34 ` Johan Hovold
  2023-12-13 18:58   ` Konrad Dybcio
  2023-12-13 17:34 ` [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts Johan Hovold
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:34 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, Johan Hovold, stable

The USB SS 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.

Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Cc: stable@vger.kernel.org	# 4.20
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 97ee02469d69..97929954cde6 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4054,7 +4054,7 @@ usb_1: usb@a6f8800 {
 			assigned-clock-rates = <19200000>, <150000000>;
 
 			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-					      <&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>,
 					      <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
@@ -4105,7 +4105,7 @@ usb_2: usb@a8f8800 {
 			assigned-clock-rates = <19200000>, <150000000>;
 
 			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-					      <&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>,
 					      <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
                   ` (2 preceding siblings ...)
  2023-12-13 17:34 ` [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup Johan Hovold
@ 2023-12-13 17:34 ` Johan Hovold
  2023-12-13 18:59   ` Konrad Dybcio
  2023-12-13 17:34 ` [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup Johan Hovold
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:34 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, Johan Hovold, stable, Jack Pham, Jonathan Marek

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: 54524b6987d1 ("arm64: dts: qcom: sm8150: fix USB wakeup interrupt types")
Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes")
Cc: stable@vger.kernel.org      # 5.10
Cc: Jack Pham <quic_jackp@quicinc.com>
Cc: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 3e7048d8ac55..5e46b9ef8642 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -3565,10 +3565,10 @@ usb_1: usb@a6f8800 {
 					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <200000000>;
 
-			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 488 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 489 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
@@ -3618,10 +3618,10 @@ usb_2: usb@a8f8800 {
 					  <&gcc GCC_USB30_SEC_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <200000000>;
 
-			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 490 IRQ_TYPE_EDGE_BOTH>,
-				     <GIC_SPI 491 IRQ_TYPE_EDGE_BOTH>;
+			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+					      <&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
 					  "dm_hs_phy_irq", "dp_hs_phy_irq";
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
                   ` (3 preceding siblings ...)
  2023-12-13 17:34 ` [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts Johan Hovold
@ 2023-12-13 17:34 ` Johan Hovold
  2023-12-13 19:00   ` Konrad Dybcio
  2023-12-13 18:49 ` [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Konrad Dybcio
  2023-12-17 17:21 ` Bjorn Andersson
  6 siblings, 1 reply; 15+ messages in thread
From: Johan Hovold @ 2023-12-13 17:34 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel, Johan Hovold, stable, Jack Pham, Jonathan Marek

The USB SS 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.

Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes")
Cc: stable@vger.kernel.org      # 5.10
Cc: Jack Pham <quic_jackp@quicinc.com>
Cc: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 5e46b9ef8642..56c74a841d80 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -3566,7 +3566,7 @@ usb_1: usb@a6f8800 {
 			assigned-clock-rates = <19200000>, <200000000>;
 
 			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
-					      <&intc GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
 					      <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
@@ -3619,7 +3619,7 @@ usb_2: usb@a8f8800 {
 			assigned-clock-rates = <19200000>, <200000000>;
 
 			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-					      <&intc GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 7 IRQ_TYPE_LEVEL_HIGH>,
 					      <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
 					      <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
 			interrupt-names = "hs_phy_irq", "ss_phy_irq",
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
                   ` (4 preceding siblings ...)
  2023-12-13 17:34 ` [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup Johan Hovold
@ 2023-12-13 18:49 ` Konrad Dybcio
  2023-12-14  1:55   ` Krishna Kurapati PSSNV
  2023-12-17 17:21 ` Bjorn Andersson
  6 siblings, 1 reply; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-13 18:49 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel



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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/5] arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:34 ` [PATCH 2/5] arm64: dts: qcom: sdm845: " Johan Hovold
@ 2023-12-13 18:58   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-13 18:58 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel,
	stable



On 12/13/23 18:34, 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: 84ad9ac8d9ca ("arm64: dts: qcom: sdm845: fix USB wakeup interrupt types")
> Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
> Cc: stable@vger.kernel.org      # 4.20
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Matches ds

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup
  2023-12-13 17:34 ` [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup Johan Hovold
@ 2023-12-13 18:58   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-13 18:58 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel,
	stable



On 12/13/23 18:34, Johan Hovold wrote:
> The USB SS 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.
> 
> Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
> Cc: stable@vger.kernel.org	# 4.20
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Matches ds

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:34 ` [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts Johan Hovold
@ 2023-12-13 18:59   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-13 18:59 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel,
	stable, Jack Pham, Jonathan Marek



On 12/13/23 18:34, 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: 54524b6987d1 ("arm64: dts: qcom: sm8150: fix USB wakeup interrupt types")
> Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
> Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes")
> Cc: stable@vger.kernel.org      # 5.10
> Cc: Jack Pham <quic_jackp@quicinc.com>
> Cc: Jonathan Marek <jonathan@marek.ca>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Matches ds

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup
  2023-12-13 17:34 ` [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup Johan Hovold
@ 2023-12-13 19:00   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-13 19:00 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel,
	stable, Jack Pham, Jonathan Marek



On 12/13/23 18:34, Johan Hovold wrote:
> The USB SS 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.
> 
> Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
> Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes")
> Cc: stable@vger.kernel.org      # 5.10
> Cc: Jack Pham <quic_jackp@quicinc.com>
> Cc: Jonathan Marek <jonathan@marek.ca>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Matches ds

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again
  2023-12-13 18:49 ` [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Konrad Dybcio
@ 2023-12-14  1:55   ` Krishna Kurapati PSSNV
  2023-12-14  7:47     ` Johan Hovold
  0 siblings, 1 reply; 15+ messages in thread
From: Krishna Kurapati PSSNV @ 2023-12-14  1:55 UTC (permalink / raw)
  To: Konrad Dybcio, Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel



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,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again
  2023-12-14  1:55   ` Krishna Kurapati PSSNV
@ 2023-12-14  7:47     ` Johan Hovold
  0 siblings, 0 replies; 15+ messages in thread
From: Johan Hovold @ 2023-12-14  7:47 UTC (permalink / raw)
  To: Krishna Kurapati PSSNV, Konrad Dybcio
  Cc: Johan Hovold, Bjorn Andersson, Andy Gross, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

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/20231214074319.11023-1-johan+linaro@kernel.org

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts
  2023-12-13 17:33 ` [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts Johan Hovold
@ 2023-12-14 17:59   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-12-14 17:59 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Krishna Kurapati PSSNV, linux-arm-msm, devicetree, linux-kernel,
	stable, Vinod Koul



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.
> 
> Fixes: 0dc0f6da3d43 ("arm64: dts: qcom: sc8180x: fix USB wakeup interrupt types")
> Fixes: b080f53a8f44 ("arm64: dts: qcom: sc8180x: Add remoteprocs, wifi and usb nodes")
> Cc: stable@vger.kernel.org      # 6.5
> Cc: Vinod Koul <vkoul@kernel.org>
> Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again
  2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
                   ` (5 preceding siblings ...)
  2023-12-13 18:49 ` [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Konrad Dybcio
@ 2023-12-17 17:21 ` Bjorn Andersson
  6 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2023-12-17 17:21 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Krishna Kurapati PSSNV, linux-arm-msm, devicetree,
	linux-kernel


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 <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-17 17:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 17:33 [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Johan Hovold
2023-12-13 17:33 ` [PATCH 1/5] arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts Johan Hovold
2023-12-14 17:59   ` Konrad Dybcio
2023-12-13 17:34 ` [PATCH 2/5] arm64: dts: qcom: sdm845: " Johan Hovold
2023-12-13 18:58   ` Konrad Dybcio
2023-12-13 17:34 ` [PATCH 3/5] arm64: dts: qcom: sdm845: fix USB SS wakeup Johan Hovold
2023-12-13 18:58   ` Konrad Dybcio
2023-12-13 17:34 ` [PATCH 4/5] arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts Johan Hovold
2023-12-13 18:59   ` Konrad Dybcio
2023-12-13 17:34 ` [PATCH 5/5] arm64: dts: qcom: sm8150: fix USB SS wakeup Johan Hovold
2023-12-13 19:00   ` Konrad Dybcio
2023-12-13 18:49 ` [PATCH 0/5] arm64: dts: qcom: fix USB wakeup interrupts again Konrad Dybcio
2023-12-14  1:55   ` Krishna Kurapati PSSNV
2023-12-14  7:47     ` Johan Hovold
2023-12-17 17:21 ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.