mbox series

[0/3] ARM: dts: qcom: sdx55: fix USB wakeup interrupts

Message ID 20231213173131.29436-1-johan+linaro@kernel.org
Headers show
Series ARM: dts: qcom: sdx55: fix USB wakeup interrupts | expand

Message

Johan Hovold Dec. 13, 2023, 5:31 p.m. UTC
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(-)

Comments

Manivannan Sadhasivam Dec. 18, 2023, 3:40 p.m. UTC | #1
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: stable@vger.kernel.org      # 5.12
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- 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
>
Manivannan Sadhasivam Dec. 18, 2023, 4:14 p.m. UTC | #2
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: stable@vger.kernel.org	# 5.12
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- 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
>
Bjorn Andersson Dec. 19, 2023, 7:33 p.m. UTC | #3
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,