[PATCH v2 6/6] riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes
From: Junhui Liu
Date: Tue Sep 08 2026 - 15:28:44 EST
The K3 implements separate ACLINT MSWI, MTIMER and SSWI devices.
The existing CLINT node at 0xe081c000 incorrectly describes the SSWI
register space as a legacy CLINT.
Replace the CLINT node with an SSWI interrupt controller using the
K3-specific compatible and supervisor software interrupt IDs. Add
the MSWI and MTIMER nodes to describe the machine-level devices
for firmware such as OpenSBI.
Use the secure addresses for MSWI and MTIMER, as their non-secure
aliases are inaccessible. Keep SSWI at its non-secure address,
0xe081c000, because an efuse bit can restrict access to its secure
alias at 0xf181c000 to Machine mode.
Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Signed-off-by: Junhui Liu <junhui.liu@xxxxxxxxxxxxx>
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 37 ++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index c3f2dce0969c..7ca662fe4cbe 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -1261,17 +1261,15 @@ saplic: interrupt-controller@e0804000 {
riscv,num-sources = <512>;
};
- clint: timer@e081c000 {
- compatible = "spacemit,k3-clint", "sifive,clint0";
+ aclint_sswi: interrupt-controller@e081c000 {
+ compatible = "spacemit,k3-aclint-sswi";
reg = <0x0 0xe081c000 0x0 0x4000>;
- interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
- <&cpu1_intc 3>, <&cpu1_intc 7>,
- <&cpu2_intc 3>, <&cpu2_intc 7>,
- <&cpu3_intc 3>, <&cpu3_intc 7>,
- <&cpu4_intc 3>, <&cpu4_intc 7>,
- <&cpu5_intc 3>, <&cpu5_intc 7>,
- <&cpu6_intc 3>, <&cpu6_intc 7>,
- <&cpu7_intc 3>, <&cpu7_intc 7>;
+ #interrupt-cells = <0>;
+ interrupt-controller;
+ interrupts-extended = <&cpu0_intc 1>, <&cpu1_intc 1>,
+ <&cpu2_intc 1>, <&cpu3_intc 1>,
+ <&cpu4_intc 1>, <&cpu5_intc 1>,
+ <&cpu6_intc 1>, <&cpu7_intc 1>;
};
/* sec_i2c3: 0xf0614000, not available from Linux */
@@ -1305,5 +1303,24 @@ maplic: interrupt-controller@f1800000 {
riscv,num-sources = <512>;
status = "reserved";
};
+
+ aclint_mswi: interrupt-controller@f1810000 {
+ compatible = "spacemit,k3-aclint-mswi";
+ reg = <0x0 0xf1810000 0x0 0x4000>;
+ interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>,
+ <&cpu2_intc 3>, <&cpu3_intc 3>,
+ <&cpu4_intc 3>, <&cpu5_intc 3>,
+ <&cpu6_intc 3>, <&cpu7_intc 3>;
+ };
+
+ aclint_mtimer: timer@f1814000 {
+ compatible = "spacemit,k3-aclint-mtimer";
+ reg = <0x0 0xf1814000 0x0 0x8000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu0_intc 7>, <&cpu1_intc 7>,
+ <&cpu2_intc 7>, <&cpu3_intc 7>,
+ <&cpu4_intc 7>, <&cpu5_intc 7>,
+ <&cpu6_intc 7>, <&cpu7_intc 7>;
+ };
};
};
--
2.55.0