public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] x1e80100: Enable PDC wake GPIOs and deepest idle state
@ 2026-03-12 15:56 Maulik Shah
  2026-03-12 15:56 ` [PATCH 1/5] arm64: dts: qcom: x1e80100: Remove interconnect from SCM device Maulik Shah
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Maulik Shah @ 2026-03-12 15:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Gleixner, Linus Walleij
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, Sneh Mankad,
	Maulik Shah

There are two modes PDC irqchip can work in
        - pass through mode
        - secondary controller mode

All PDC irqchip supports pass through mode in which both Direct SPIs and
GPIO IRQs (as SPIs) are sent to GIC without latching at PDC, PDC only does
inversion when needed for falling edge to rising edge or level low to level
high, as the GIC do not support falling edge/level low interrupts.

Newer PDCs (v3.0 onwards) also support additional secondary controller mode
where PDC latches GPIO IRQs and sends to GIC as level type IRQ. Direct SPIs
still works same as pass through mode without latching at PDC even in
secondary controller mode.

All the SoCs defaulted to pass through mode with the exception of some x1e.

x1e PDC may be set to secondary controller mode for builds on CRD boards
whereas it may be set to pass through mode for IoT-EVK boards.

There is no way to read which current mode it is set to and make PDC work
in respective mode as the read access is not opened up for non secure
world. There is though write access opened up via SCM write API to set the
mode.

As the linux only ever makes use of pass through mode, set the IRQ mask
meant specifically for secondary controller mode to mask all the IRQs to be
forwarded to GIC irrespective of the mode PDC is set to. Writing the mask
is do not care when the PDC works in pass through mode, which is always
the case except for some of x1e platforms.

Configure PDC mode to pass through mode for all x1e based boards via SCM
write.

For successful write:
        - Nothing more to be done
For unsuccessful write:
        - Inform TLMM to monitor GPIO IRQs (same as MPM)
        - Prevent SoC low power mode (CxPC) as PDC is not monitoring GPIO
          IRQs which may be needed to wake the SoC from low power mode.

As the deepest idle state as the PDC can now wake up SoC from GPIOs and
revert 602cb14e310a ("pinctrl: qcom: x1e80100: Bypass PDC wakeup parent
for now").

Note:
For testing this series on x1e80100 CRD, interconnect nodes from SCM
device are removed as PDC requires SCM APIs early in the boot up and
interconnect nodes delays the probe of SCM device which results in early
boot NULL pointer derefernce. Looking at documentation interconnect are
added to get additional performance boost and are optional to add. Removing
them for now allows this series to go through until proper fix from SCM
device is found.

The series has been tested on x1e80100 CRD with both old and new firmware
and also on kaanapali.

Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
---
Maulik Shah (5):
      arm64: dts: qcom: x1e80100: Remove interconnect from SCM device
      dt-bindings: interrupt-controller: qcom,pdc: Document reg and QMP
      irqchip/qcom-pdc: Configure PDC to pass through mode
      arm64: dts: qcom: x1e80100: Add deepest idle state
      Revert "pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now"

 .../bindings/interrupt-controller/qcom,pdc.yaml    |   5 +
 arch/arm64/boot/dts/qcom/hamoa.dtsi                |  19 +++-
 drivers/irqchip/Kconfig                            |   1 +
 drivers/irqchip/qcom-pdc.c                         | 119 +++++++++++++++++++--
 drivers/pinctrl/qcom/pinctrl-x1e80100.c            |   4 +-
 5 files changed, 131 insertions(+), 17 deletions(-)
---
base-commit: f90aadf1c67c8b4969d1e5e6d4fd7227adb6e4d7
change-id: 20260312-hamoa_pdc-8c44e70b1517

Best regards,
-- 
Maulik Shah <maulik.shah@oss.qualcomm.com>


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

end of thread, other threads:[~2026-03-24  2:52 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 15:56 [PATCH 0/5] x1e80100: Enable PDC wake GPIOs and deepest idle state Maulik Shah
2026-03-12 15:56 ` [PATCH 1/5] arm64: dts: qcom: x1e80100: Remove interconnect from SCM device Maulik Shah
2026-03-13  2:11   ` Dmitry Baryshkov
2026-03-13 10:12     ` Maulik Shah (mkshah)
2026-03-13 11:59       ` Konrad Dybcio
2026-03-13 14:48         ` Dmitry Baryshkov
2026-03-16  9:39           ` Konrad Dybcio
2026-03-16 14:25             ` Dmitry Baryshkov
2026-03-18  9:33               ` Konrad Dybcio
2026-03-18 10:38                 ` Dmitry Baryshkov
2026-03-18 10:39                   ` Konrad Dybcio
2026-03-18 14:23                     ` Dmitry Baryshkov
2026-03-13 15:17         ` Maulik Shah (mkshah)
2026-03-13 14:47       ` Dmitry Baryshkov
2026-03-13 13:56   ` Krzysztof Kozlowski
2026-03-16  4:32     ` Maulik Shah (mkshah)
2026-03-12 15:56 ` [PATCH 2/5] dt-bindings: interrupt-controller: qcom,pdc: Document reg and QMP Maulik Shah
2026-03-13 13:55   ` Krzysztof Kozlowski
2026-03-12 15:56 ` [PATCH 3/5] irqchip/qcom-pdc: Configure PDC to pass through mode Maulik Shah
2026-03-13  2:22   ` Dmitry Baryshkov
2026-03-13  6:40     ` Maulik Shah (mkshah)
2026-03-13 11:49       ` Konrad Dybcio
2026-03-24  2:52   ` Bjorn Andersson
2026-03-12 15:56 ` [PATCH 4/5] arm64: dts: qcom: x1e80100: Add deepest idle state Maulik Shah
2026-03-13  2:30   ` Dmitry Baryshkov
2026-03-13  6:41     ` Maulik Shah (mkshah)
2026-03-13 13:57   ` Krzysztof Kozlowski
2026-03-16  4:36     ` Maulik Shah (mkshah)
2026-03-12 15:56 ` [PATCH 5/5] Revert "pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now" Maulik Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox