Skip to contentSkip to conversation

arm64: dts: qcom: sdm845: Route the SPMI interrupt through the PDC

PATCH Applied yoxcu 4 participants 4 messages Oct 13 – Nov 8

Subsystems (3)
lore
Share & tools
lore

yoxcu

author
#0 lore raw

PATCH 1/1 arm64: dts: qcom: sdm845: Route the SPMI interrupt through the PDC

From: Michael Auer <[email protected]>

The SPMI arbiter interrupt (PMIC RTC alarm, power key, charger) goes directly to GIC SPI 481. In CX collapse the GIC does not detect interrupts, so only interrupts routed through the PDC can wake the SoC.

SPI 481 is PDC pin 1. Route the interrupt through the PDC, as sc7180, sm8250 and sc8280xp already do.

On a OnePlus 6 in CX collapse, a 60 s RTC alarm did not end s2idle. The phone slept for 456 s, until the modem woke it. With this change the alarm wakes it on time (after 62 s), and the power key wakes it too.

Assisted-by LLM

---
Tested on a OnePlus 6 with an sdm845-mainline 7.1-rc1 based kernel. On qcom/for-next only the DTB build and dtbs_check (W=1) were run, for all sdm845 and sdm850 boards.
On this phone CX collapse also needs the sdm845 ALC interconnect RFC, sent separately.

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -1
index 844b840bc546..52059ba75893 100644
@@ -5176,7 +5176,7 @@ spmi_bus: spmi@c440000 {
 			      <0 0x0c40a000 0 0x26000>;
 			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
 			interrupt-names = "periph_irq";
-			interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&pdc_intc 1 IRQ_TYPE_LEVEL_HIGH>;
 			qcom,ee = <0>;
 			qcom,channel = <0>;
 			#address-cells = <2>;

base-commit: d628f8fa591e8e78995afd179e6ee021135cba6c

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · yoxcu

From: Michael Auer <[email protected]>

The SPMI arbiter interrupt (PMIC RTC alarm, power key, charger) goes directly to GIC SPI 481. In CX collapse the GIC does not detect interrupts, so only interrupts routed through the PDC can wake the SoC.

SPI 481 is PDC pin 1. Route the interrupt through the PDC, as sc7180, sm8250 and sc8280xp already do.

Quoted 6 lines

On a OnePlus 6 in CX collapse, a 60 s RTC alarm did not end s2idle. The phone slept for 456 s, until the modem woke it. With this change the alarm wakes it on time (after 62 s), and the power key wakes it too.

Assisted-by LLM
Reviewed-by on v1 1/1
#2 lore raw
In reply to yoxcu
Quoted 9 lines · yoxcu

From: Michael Auer <[email protected]>

The SPMI arbiter interrupt (PMIC RTC alarm, power key, charger) goes directly to GIC SPI 481. In CX collapse the GIC does not detect interrupts, so only interrupts routed through the PDC can wake the SoC.

SPI 481 is PDC pin 1. Route the interrupt through the PDC, as sc7180, sm8250 and sc8280xp already do.

Quoted 7 lines

On a OnePlus 6 in CX collapse, a 60 s RTC alarm did not end s2idle. The phone slept for 456 s, until the modem woke it. With this change the alarm wakes it on time (after 62 s), and the power key wakes it too.

Assisted-by LLM

---

Konrad

maintainer Applied
#3 lore raw
In reply to yoxcu
Quoted 8 lines · yoxcu

The SPMI arbiter interrupt (PMIC RTC alarm, power key, charger) goes directly to GIC SPI 481. In CX collapse the GIC does not detect interrupts, so only interrupts routed through the PDC can wake the SoC.

SPI 481 is PDC pin 1. Route the interrupt through the PDC, as sc7180, sm8250 and sc8280xp already do.

[...]

Applied, thanks!

[1/1] arm64: dts: qcom: sdm845: Route the SPMI interrupt through the PDC

      commit: a1a11f5f5e9b9dbc7048810b837d7d1fecebad34

Best regards,

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