linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] sunxi: Support IRQ wakeup from deep sleep
@ 2020-01-13  4:49 Samuel Holland
  2020-01-13  4:49 ` [PATCH 1/9] irqchip/sun6i-r: Switch to a stacked irqchip driver Samuel Holland
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Samuel Holland @ 2020-01-13  4:49 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring,
	Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Russell King,
	Catalin Marinas, Will Deacon
  Cc: devicetree, linux-sunxi, linux-kernel, linux-arm-kernel, Samuel Holland

Allwinner sun8i/sun50i SoCs (A31 and newer) have two interrupt
controllers: GIC and R_INTC. GIC does not support wakeup, and is
inaccessible from the ARISC (power management coprocessor). R_INTC
controls the NMI pin, and provides 16-32 IRQs to the ARISC. The first 16
of these correspond 1:1 to a block of GIC IRQs starting with the NMI.

This series replaces the existing chained irqchip driver used only to
control the NMI, with a stacked irqchip driver that also provides wakeup
capability for those 16 IRQs. The idea is that we preconfigure the
ARISC's IRQ controller, and then it knows to wake up as soon as it
receives an IRQ.

I went back and forth about updating the existing driver versus writing
a new one. The NMI-only control on sun7i (A20) and sun9i (A80) is
missing MASK_REG, so it would need a different irq_chip definition. And
the only benefit it would get is the chained->stacked conversion, since
there's no separate coprocessor to see the IRQs during suspend. So
ultimately I went with a new driver. It may be useful to separately do
the chained->stacked conversion on the sunxi-nmi driver as well.

Patch 1 adds the new driver.
Patch 2 adds wakeup capability.
Remaining patches update the DT+bindings to use R_INTC where beneficial

With appropriate firmware, this series allows waking from RTC and NMI
(power button, plugging in USB, etc.). Wake from Port L GPIO interrupts
(gpio-keys, wifi, etc.) requires some patches to the pinctrl driver.

Samuel Holland (9):
  irqchip/sun6i-r: Switch to a stacked irqchip driver
  irqchip/sun6i-r: Add wakeup support
  dt-bindings: irq: Add a compatible for the H3 R_INTC
  ARM: dts: sunxi: h3/h5: Add r_intc node
  ARM: dts: sunxi: h3/h5: Move wakeup-capable IRQs to r_intc
  ARM: dts: sunxi: a83t: Move wakeup-capable IRQs to r_intc
  arm64: dts: allwinner: a64: Move wakeup-capable IRQs to r_intc
  arm64: dts: allwinner: h6: Fix indentation of IR node
  arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc

 .../allwinner,sun7i-a20-sc-nmi.yaml           |   3 +
 arch/arm/boot/dts/sun8i-a83t.dtsi             |   9 +-
 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |  20 +-
 arch/arm/mach-sunxi/Kconfig                   |   1 +
 arch/arm64/Kconfig.platforms                  |   1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi |  11 +-
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |  33 ++-
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-sun6i-r.c                 | 273 ++++++++++++++++++
 drivers/irqchip/irq-sunxi-nmi.c               |  26 +-
 10 files changed, 329 insertions(+), 49 deletions(-)
 create mode 100644 drivers/irqchip/irq-sun6i-r.c

-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-05-25  4:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13  4:49 [PATCH 0/9] sunxi: Support IRQ wakeup from deep sleep Samuel Holland
2020-01-13  4:49 ` [PATCH 1/9] irqchip/sun6i-r: Switch to a stacked irqchip driver Samuel Holland
2020-01-20 10:52   ` Marc Zyngier
2020-05-25  4:12     ` Samuel Holland
2020-01-13  4:49 ` [PATCH 2/9] irqchip/sun6i-r: Add wakeup support Samuel Holland
2020-01-13  4:49 ` [PATCH 3/9] dt-bindings: irq: Add a compatible for the H3 R_INTC Samuel Holland
2020-01-13  9:43   ` Maxime Ripard
2020-01-13  4:49 ` [PATCH 4/9] ARM: dts: sunxi: h3/h5: Add r_intc node Samuel Holland
2020-01-13  4:49 ` [PATCH 5/9] ARM: dts: sunxi: h3/h5: Move wakeup-capable IRQs to r_intc Samuel Holland
2020-01-13  4:49 ` [PATCH 6/9] ARM: dts: sunxi: a83t: " Samuel Holland
2020-01-13  4:49 ` [PATCH 7/9] arm64: dts: allwinner: a64: " Samuel Holland
2020-01-13  4:49 ` [PATCH 8/9] arm64: dts: allwinner: h6: Fix indentation of IR node Samuel Holland
2020-01-13  4:49 ` [PATCH 9/9] arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc Samuel Holland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).