* [PATCH v2 1/7] genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 11:51 ` Thomas Gleixner
2026-02-11 9:44 ` [PATCH v2 2/7] dt-bindings: interrupt-controller: add LS7A PCH LPC Icenowy Zheng
` (5 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng,
linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev
Several architectures define NR_IRQS_LEGACY to reserve a low range of IRQ
numbers for fixed legacy allocations (e.g. ISA interrupts) which should
not be handed out by the dynamic IRQ allocator.
arch_dynirq_lower_bound() exists to enforce this, but today only x86 wires
it up. In the current boot order this typically works because legacy IRQ
domains register early and claim the low IRQ numbers first; however, that
assumption breaks if the legacy controller is probed later.
Make the default arch_dynirq_lower_bound() implementation honour
NR_IRQS_LEGACY by clamping the allocation start to at least that value.
Architectures that do not define NR_IRQS_LEGACY keep the current behaviour
(effectively 0). Arm/PowerPC/MIPS/LoongArch use legacy IRQ domains for ISA
interrupts and benefit from this change. x86 and s390 already provide their
own implementations.
Cc: linux-s390@vger.kernel.org
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Yao Zi <me@ziyao.cc>
---
kernel/softirq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 77198911b8dd4..cdc77d52c36b2 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -1184,5 +1184,5 @@ int __init __weak arch_early_irq_init(void)
unsigned int __weak arch_dynirq_lower_bound(unsigned int from)
{
- return from;
+ return MAX(from, NR_IRQS_LEGACY);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 1/7] genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default
2026-02-11 9:44 ` [PATCH v2 1/7] genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default Icenowy Zheng
@ 2026-02-11 11:51 ` Thomas Gleixner
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Gleixner @ 2026-02-11 11:51 UTC (permalink / raw)
To: Icenowy Zheng, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng,
linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev
On Wed, Feb 11 2026 at 17:44, Icenowy Zheng wrote:
> Several architectures define NR_IRQS_LEGACY to reserve a low range of IRQ
> numbers for fixed legacy allocations (e.g. ISA interrupts) which should
> not be handed out by the dynamic IRQ allocator.
>
> arch_dynirq_lower_bound() exists to enforce this, but today only x86 wires
> it up. In the current boot order this typically works because legacy IRQ
> domains register early and claim the low IRQ numbers first; however, that
> assumption breaks if the legacy controller is probed later.
>
> Make the default arch_dynirq_lower_bound() implementation honour
> NR_IRQS_LEGACY by clamping the allocation start to at least that value.
>
> Architectures that do not define NR_IRQS_LEGACY keep the current behaviour
> (effectively 0). Arm/PowerPC/MIPS/LoongArch use legacy IRQ domains for ISA
> interrupts and benefit from this change. x86 and s390 already provide their
> own implementations.
Q: How do all those architectures which do not require the reservation
of the legacy interrupts benefit from that?
A: Not at all
- PowerPC has its own way to deal with that depending on the platform
the kernel runs on as not all platforms require it despite it being
defined.
- ARM only uses it when SPARSE_IRQ=n and does not need it
otherwise. So again this changes behaviour.
- MIPS is only using it for mips/longsoon64 and the rest of MIPS does not
care at all.
So if you need that on loonson, implement arch_dynirq_lower_bound()
instead of making uniformed claims.
Thanks,
tglx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/7] dt-bindings: interrupt-controller: add LS7A PCH LPC
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 1/7] genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 22:08 ` Rob Herring (Arm)
2026-02-11 9:44 ` [PATCH v2 3/7] irqchip/loongson-pch-lpc: extract non-ACPI-related code from ACPI init Icenowy Zheng
` (4 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
Loongson 7A series PCH contains an LPC controller with an interrupt
controller.
Add the device tree binding for the interrupt controller.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
.../loongson,pch-lpc.yaml | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml
diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml
new file mode 100644
index 0000000000000..ff2a425b6f0b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/loongson,pch-lpc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson PCH LPC Controller
+
+maintainers:
+ - Jiaxun Yang <jiaxun.yang@flygoat.com>
+
+description:
+ This interrupt controller is found in the Loongson LS7A family of PCH for
+ accepting interrupts sent by LPC-connected peripherals and signalling PIC
+ via a single interrupt line when interrupts are available.
+
+properties:
+ compatible:
+ const: loongson,ls7a-lpc
+
+ reg:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ interrupts:
+ maxItems: 1
+
+ '#interrupt-cells':
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - interrupts
+ - '#interrupt-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ lpc: interrupt-controller@10002000 {
+ compatible = "loongson,ls7a-lpc";
+ reg = <0x10002000 0x400>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&pic>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ };
+...
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 2/7] dt-bindings: interrupt-controller: add LS7A PCH LPC
2026-02-11 9:44 ` [PATCH v2 2/7] dt-bindings: interrupt-controller: add LS7A PCH LPC Icenowy Zheng
@ 2026-02-11 22:08 ` Rob Herring (Arm)
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2026-02-11 22:08 UTC (permalink / raw)
To: Icenowy Zheng
Cc: linux-mips, Jiaxun Yang, devicetree, Conor Dooley,
Thomas Bogendoerfer, Yao Zi, Thomas Gleixner, Huacai Chen,
Krzysztof Kozlowski, linux-kernel
On Wed, 11 Feb 2026 17:44:03 +0800, Icenowy Zheng wrote:
> Loongson 7A series PCH contains an LPC controller with an interrupt
> controller.
>
> Add the device tree binding for the interrupt controller.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> .../loongson,pch-lpc.yaml | 52 +++++++++++++++++++
> 1 file changed, 52 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,pch-lpc.yaml
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 3/7] irqchip/loongson-pch-lpc: extract non-ACPI-related code from ACPI init
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 1/7] genirq: reserve NR_IRQS_LEGACY IRQs in dynirq by default Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 2/7] dt-bindings: interrupt-controller: add LS7A PCH LPC Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 4/7] irqchip/loongson-pch-lpc: add OF init code Icenowy Zheng
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
A lot of code could be shared between the current ACPI init flow with
the possible OF init flow.
Extract it to a dedicated function.
The re-ordering of parent interrupt acquisition requires the
architecture code to reserve legacy interrupts from the dynamic
allocation by overriding arch_dynirq_lower_bound(), otherwise the parent
of LPC irqchip will be allocated to the intended static range of LPC
interrupts, which leads to allocation failure of LPC interrupts.
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Yao Zi <me@ziyao.cc>
---
drivers/irqchip/irq-loongson-pch-lpc.c | 52 ++++++++++++++++----------
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/drivers/irqchip/irq-loongson-pch-lpc.c b/drivers/irqchip/irq-loongson-pch-lpc.c
index 3a125f3e42873..035c621d1a069 100644
--- a/drivers/irqchip/irq-loongson-pch-lpc.c
+++ b/drivers/irqchip/irq-loongson-pch-lpc.c
@@ -175,13 +175,10 @@ static struct syscore pch_lpc_syscore = {
.ops = &pch_lpc_syscore_ops,
};
-int __init pch_lpc_acpi_init(struct irq_domain *parent,
- struct acpi_madt_lpc_pic *acpi_pchlpc)
+static int __init pch_lpc_init(phys_addr_t addr, unsigned long size,
+ struct fwnode_handle *irq_handle, int parent_irq)
{
- int parent_irq;
struct pch_lpc *priv;
- struct irq_fwspec fwspec;
- struct fwnode_handle *irq_handle;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -189,7 +186,7 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent,
raw_spin_lock_init(&priv->lpc_lock);
- priv->base = ioremap(acpi_pchlpc->address, acpi_pchlpc->size);
+ priv->base = ioremap(addr, size);
if (!priv->base)
goto free_priv;
@@ -198,12 +195,6 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent,
goto iounmap_base;
}
- irq_handle = irq_domain_alloc_named_fwnode("lpcintc");
- if (!irq_handle) {
- pr_err("Unable to allocate domain handle\n");
- goto iounmap_base;
- }
-
/*
* The LPC interrupt controller is a legacy i8259-compatible device,
* which requires a static 1:1 mapping for IRQs 0-15.
@@ -213,15 +204,10 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent,
&pch_lpc_domain_ops, priv);
if (!priv->lpc_domain) {
pr_err("Failed to create IRQ domain\n");
- goto free_irq_handle;
+ goto iounmap_base;
}
pch_lpc_reset(priv);
- fwspec.fwnode = parent->fwnode;
- fwspec.param[0] = acpi_pchlpc->cascade + GSI_MIN_PCH_IRQ;
- fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH;
- fwspec.param_count = 2;
- parent_irq = irq_create_fwspec_mapping(&fwspec);
irq_set_chained_handler_and_data(parent_irq, lpc_irq_dispatch, priv);
pch_lpc_priv = priv;
@@ -230,8 +216,6 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent,
return 0;
-free_irq_handle:
- irq_domain_free_fwnode(irq_handle);
iounmap_base:
iounmap(priv->base);
free_priv:
@@ -239,3 +223,31 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent,
return -ENOMEM;
}
+
+int __init pch_lpc_acpi_init(struct irq_domain *parent, struct acpi_madt_lpc_pic *acpi_pchlpc)
+{
+ struct fwnode_handle *irq_handle;
+ struct irq_fwspec fwspec;
+ int parent_irq, ret;
+
+ irq_handle = irq_domain_alloc_named_fwnode("lpcintc");
+ if (!irq_handle) {
+ pr_err("Unable to allocate domain handle\n");
+ return -ENOMEM;
+ }
+
+ fwspec.fwnode = parent->fwnode;
+ fwspec.param[0] = acpi_pchlpc->cascade + GSI_MIN_PCH_IRQ;
+ fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH;
+ fwspec.param_count = 2;
+ parent_irq = irq_create_fwspec_mapping(&fwspec);
+
+ ret = pch_lpc_init(acpi_pchlpc->address, acpi_pchlpc->size,
+ irq_handle, parent_irq);
+ if (ret) {
+ irq_domain_free_fwnode(irq_handle);
+ return ret;
+ }
+
+ return 0;
+}
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 4/7] irqchip/loongson-pch-lpc: add OF init code
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
` (2 preceding siblings ...)
2026-02-11 9:44 ` [PATCH v2 3/7] irqchip/loongson-pch-lpc: extract non-ACPI-related code from ACPI init Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 5/7] irqchip/loongson-pch-lpc: enable building on MIPS Loongson64 Icenowy Zheng
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
The OF-based MIPS Loongson-3 systems can also have a PCH LPC interrupt
controller.
Add OF-based initialization code for this driver.
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
drivers/irqchip/irq-loongson-pch-lpc.c | 35 ++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/drivers/irqchip/irq-loongson-pch-lpc.c b/drivers/irqchip/irq-loongson-pch-lpc.c
index 035c621d1a069..d91e3ba1ad781 100644
--- a/drivers/irqchip/irq-loongson-pch-lpc.c
+++ b/drivers/irqchip/irq-loongson-pch-lpc.c
@@ -13,6 +13,8 @@
#include <linux/irqchip/chained_irq.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
#include <linux/syscore_ops.h>
#include "irq-loongson.h"
@@ -224,6 +226,7 @@ static int __init pch_lpc_init(phys_addr_t addr, unsigned long size,
return -ENOMEM;
}
+#ifdef CONFIG_ACPI
int __init pch_lpc_acpi_init(struct irq_domain *parent, struct acpi_madt_lpc_pic *acpi_pchlpc)
{
struct fwnode_handle *irq_handle;
@@ -251,3 +254,35 @@ int __init pch_lpc_acpi_init(struct irq_domain *parent, struct acpi_madt_lpc_pic
return 0;
}
+#endif /* CONFIG_ACPI */
+
+#ifdef CONFIG_OF
+static int __init pch_lpc_of_init(struct device_node *node, struct device_node *parent)
+{
+ struct fwnode_handle *irq_handle;
+ struct resource res;
+ int parent_irq, ret;
+
+ if (of_address_to_resource(node, 0, &res))
+ return -EINVAL;
+
+ parent_irq = irq_of_parse_and_map(node, 0);
+ if (!parent_irq) {
+ pr_err("Failed to get the parent IRQ for LPC IRQs\n");
+ return -EINVAL;
+ }
+
+ irq_handle = of_fwnode_handle(node);
+
+ ret = pch_lpc_init(res.start, resource_size(&res), irq_handle,
+ parent_irq);
+ if (ret) {
+ irq_dispose_mapping(parent_irq);
+ return ret;
+ }
+
+ return 0;
+}
+
+IRQCHIP_DECLARE(pch_lpc, "loongson,ls7a-lpc", pch_lpc_of_init);
+#endif /* CONFIG_OF */
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 5/7] irqchip/loongson-pch-lpc: enable building on MIPS Loongson64
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
` (3 preceding siblings ...)
2026-02-11 9:44 ` [PATCH v2 4/7] irqchip/loongson-pch-lpc: add OF init code Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 6/7] MIPS: Loongson64: dts: sort nodes Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 7/7] MIPS: Loongson64: dts: add node for LS7A PCH LPC Icenowy Zheng
6 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
As the driver can now support OF-based platforms, it's now possible to
use it on MIPS Loongson64 machines.
Drop the requirement of LOONGARCH for this driver, to allow build on
both MIPS-based and LoongArch-based Loongson systems.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
drivers/irqchip/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index f07b00d7fef90..f2eee2bd61dd0 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -761,7 +761,6 @@ config LOONGSON_PCH_MSI
config LOONGSON_PCH_LPC
bool "Loongson PCH LPC Controller"
- depends on LOONGARCH
depends on MACH_LOONGSON64 || LOONGARCH
default MACH_LOONGSON64
select IRQ_DOMAIN_HIERARCHY
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 6/7] MIPS: Loongson64: dts: sort nodes
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
` (4 preceding siblings ...)
2026-02-11 9:44 ` [PATCH v2 5/7] irqchip/loongson-pch-lpc: enable building on MIPS Loongson64 Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
2026-02-11 9:44 ` [PATCH v2 7/7] MIPS: Loongson64: dts: add node for LS7A PCH LPC Icenowy Zheng
6 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
The RTC's address is after UARTs, however the node is currently before
them.
Re-order the node to match address sequence.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/mips/boot/dts/loongson/ls7a-pch.dtsi b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
index ee71045883e7e..5269bf0f789b0 100644
--- a/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
+++ b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
@@ -19,13 +19,6 @@ pic: interrupt-controller@10000000 {
#interrupt-cells = <2>;
};
- rtc0: rtc@100d0100 {
- compatible = "loongson,ls7a-rtc";
- reg = <0 0x100d0100 0 0x78>;
- interrupt-parent = <&pic>;
- interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
- };
-
ls7a_uart0: serial@10080000 {
compatible = "ns16550a";
reg = <0 0x10080000 0 0x100>;
@@ -65,6 +58,13 @@ ls7a_uart3: serial@10080300 {
no-loopback-test;
};
+ rtc0: rtc@100d0100 {
+ compatible = "loongson,ls7a-rtc";
+ reg = <0 0x100d0100 0 0x78>;
+ interrupt-parent = <&pic>;
+ interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
pci@1a000000 {
compatible = "loongson,ls7a-pci";
device_type = "pci";
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 7/7] MIPS: Loongson64: dts: add node for LS7A PCH LPC
2026-02-11 9:44 [PATCH v2 0/7] Add support for LS7A LPC IRQ for MIPS Loongson systems Icenowy Zheng
` (5 preceding siblings ...)
2026-02-11 9:44 ` [PATCH v2 6/7] MIPS: Loongson64: dts: sort nodes Icenowy Zheng
@ 2026-02-11 9:44 ` Icenowy Zheng
6 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2026-02-11 9:44 UTC (permalink / raw)
To: Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
Cc: Yao Zi, linux-kernel, devicetree, linux-mips, Icenowy Zheng
Loongson 7A series PCH contain a LPC IRQ controller.
Add the device tree node of it.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/mips/boot/dts/loongson/ls7a-pch.dtsi b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
index 5269bf0f789b0..84546ebfaf443 100644
--- a/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
+++ b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi
@@ -19,6 +19,15 @@ pic: interrupt-controller@10000000 {
#interrupt-cells = <2>;
};
+ lpc: interrupt-controller@10002000 {
+ compatible = "loongson,ls7a-lpc";
+ reg = <0 0x10002000 0 0x1000>;
+ interrupt-controller;
+ interrupt-parent = <&pic>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ #interrupt-cells = <2>;
+ };
+
ls7a_uart0: serial@10080000 {
compatible = "ns16550a";
reg = <0 0x10080000 0 0x100>;
--
2.52.0
^ permalink raw reply related [flat|nested] 10+ messages in thread