[PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems

From: Icenowy Zheng

Date: Wed Feb 11 2026 - 04:45:54 EST


This patchset tries to add support for Loongson 7A1000 PCH's LPC
interrupt controller to MIPS-based Loongson systems.

LPC, from software's perspective of view, is just ISA, so the interrupts
should be handled as legacy ones occupying the lowest 0-15 IRQ numbers.
Despite the current PCH LPC driver for ACPI-based LoongArch Loongson
machines handled it, the setup is fragile and depends on its specific
setup sequence (allocating the LPC IRQs first, and then allocate the
parent IRQ at PCH PIC). The refactor of extracting parent IRQ allocation
breaks this fragile sequence, so the first commit is created to address
for this issue (by reserving ISA interrupts from the dynamic allocation
space).

Then the remaining commits are just adding OF(DT) based initialization
of PCH LPC interrupt controller, like what happened on PCH PIC.

Tested on a Haier Boyue G51 system with legacy i8042 keyboard/mouse as
integrated ones, and patchset v1 is regression tested by Yao Zi on a
LoongArch laptop with similar legacy i8042 via LPC.

Changes in v2:
- Rebased on top of `irq-drivers-2026-02-09` tag.
- Compatible changed to `loongson,ls7a-lpc` .
- Merged the patch for conditionally build of ACPI code to the patch
introducing OF code.
- Sorted function variable definitions.
- Reworded some commit messages as Thomas Glexiner suggests.
- Added __init to the LPC irqchip OF initialization code to prevent
section mismatch.

Icenowy Zheng (7):
genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default
dt-bindings: interrupt-controller: add LS7A PCH LPC
irqchip/loongson-pch-lpc: extract non-ACPI-related code from ACPI init
irqchip/loongson-pch-lpc: add OF init code
irqchip/loongson-pch-lpc: enable building on MIPS Loongson64
MIPS: Loongson64: dts: sort nodes
MIPS: Loongson64: dts: add node for LS7A PCH LPC

.../loongson,pch-lpc.yaml | 52 +++++++++++
arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 17 +++-
drivers/irqchip/Kconfig | 1 -
drivers/irqchip/irq-loongson-pch-lpc.c | 87 ++++++++++++++-----
kernel/softirq.c | 2 +-
5 files changed, 133 insertions(+), 26 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml

--
2.52.0