From 432ba4ff3cc4e683f3f68413a16a768983597269 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 15 Mar 2024 10:35:13 -0400 Subject: [PATCH] Fixes for 5.4 Signed-off-by: Sasha Levin --- ...dd-pdc-interrupt-controller-for-sdm8.patch | 43 ++++++++++++ ...dm845-fix-usb-dp-dm-hs-phy-interrupt.patch | 68 +++++++++++++++++++ queue-5.4/series | 2 + 3 files changed, 113 insertions(+) create mode 100644 queue-5.4/arm64-dts-qcom-add-pdc-interrupt-controller-for-sdm8.patch create mode 100644 queue-5.4/arm64-dts-qcom-sdm845-fix-usb-dp-dm-hs-phy-interrupt.patch diff --git a/queue-5.4/arm64-dts-qcom-add-pdc-interrupt-controller-for-sdm8.patch b/queue-5.4/arm64-dts-qcom-add-pdc-interrupt-controller-for-sdm8.patch new file mode 100644 index 00000000000..95f049b6076 --- /dev/null +++ b/queue-5.4/arm64-dts-qcom-add-pdc-interrupt-controller-for-sdm8.patch @@ -0,0 +1,43 @@ +From 76fa4c09fba0ca3c5f802eaab36596953389dbb8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 15 Nov 2019 15:11:53 -0700 +Subject: arm64: dts: qcom: add PDC interrupt controller for SDM845 + +From: Lina Iyer + +[ Upstream commit 72b67ebf9d242d8d18545250f340c736d900f763 ] + +Add PDC interrupt controller device bindings for SDM845. + +Signed-off-by: Lina Iyer +Reviewed-by: Stephen Boyd +Link: https://lore.kernel.org/r/1573855915-9841-11-git-send-email-ilina@codeaurora.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Sasha Levin +--- + arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi +index 845005f1be2de..f5b7150dadfcd 100644 +--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi ++++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi +@@ -2940,6 +2940,15 @@ + #power-domain-cells = <1>; + }; + ++ pdc_intc: interrupt-controller@b220000 { ++ compatible = "qcom,sdm845-pdc", "qcom,pdc"; ++ reg = <0 0x0b220000 0 0x30000>; ++ qcom,pdc-ranges = <0 480 94>, <94 609 15>, <115 630 7>; ++ #interrupt-cells = <2>; ++ interrupt-parent = <&intc>; ++ interrupt-controller; ++ }; ++ + pdc_reset: reset-controller@b2e0000 { + compatible = "qcom,sdm845-pdc-global"; + reg = <0 0x0b2e0000 0 0x20000>; +-- +2.43.0 + diff --git a/queue-5.4/arm64-dts-qcom-sdm845-fix-usb-dp-dm-hs-phy-interrupt.patch b/queue-5.4/arm64-dts-qcom-sdm845-fix-usb-dp-dm-hs-phy-interrupt.patch new file mode 100644 index 00000000000..3ab6e1fe357 --- /dev/null +++ b/queue-5.4/arm64-dts-qcom-sdm845-fix-usb-dp-dm-hs-phy-interrupt.patch @@ -0,0 +1,68 @@ +From f3b25389813be22a28c7cee1d2f27d83878d68f2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 Dec 2023 18:34:00 +0100 +Subject: arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts + +From: Johan Hovold + +[ Upstream commit 204f9ed4bad6293933179517624143b8f412347c ] + +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 +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20231213173403.29544-3-johan+linaro@kernel.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Sasha Levin +--- + 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 f5b7150dadfcd..b4a0234f66d16 100644 +--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi ++++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi +@@ -2501,10 +2501,10 @@ + <&gcc GCC_USB30_PRIM_MASTER_CLK>; + assigned-clock-rates = <19200000>, <150000000>; + +- interrupts = , +- , +- , +- ; ++ 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"; + +@@ -2545,10 +2545,10 @@ + <&gcc GCC_USB30_SEC_MASTER_CLK>; + assigned-clock-rates = <19200000>, <150000000>; + +- interrupts = , +- , +- , +- ; ++ 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.43.0 + diff --git a/queue-5.4/series b/queue-5.4/series index f00d42f5451..2e969d62c30 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -46,3 +46,5 @@ regmap-add-bulk-read-write-callbacks-into-regmap_con.patch serial-max310x-make-accessing-revision-id-interface-.patch serial-max310x-implement-i2c-support.patch serial-max310x-fix-io-data-corruption-in-batched-ope.patch +arm64-dts-qcom-add-pdc-interrupt-controller-for-sdm8.patch +arm64-dts-qcom-sdm845-fix-usb-dp-dm-hs-phy-interrupt.patch -- 2.47.2