Re: [PATCH v3 6/6] riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes

From: Junhui Liu

Date: Sat Nov 28 2026 - 04:46:26 EST


Hi Anirudh,

On Fri Nov 27, 2026 at 1:27 PM CST, Anirudh Srinivasan wrote:
> Hi Junhui,
>
> On Fri, Sep 18, 2026 at 12:29:38AM +0800, Junhui Liu wrote:
>> The K3 implements separate ACLINT MSWI, MTIMER and SSWI devices. The
>> existing CLINT node at 0xe081c000 incorrectly describes the SSWI
>> register space in the non-secure window as a legacy CLINT.
>>
>> The ACLINT register space is mapped at two base addresses: a secure
>> window at 0xf1810000 and a non-secure window at 0xe0810000. The
>> secure window exposes all three components, while the non-secure
>> window only exposes SSWI; the MSWI and MTIMER offsets are reserved
>> there. Moreover, depending on the eFuse configuration, the non-secure
>> window may be entirely inaccessible, whereas the secure window is
>> always available.
>>
>> Replace the CLINT node with the three ACLINT devices, all using
>> secure-window addresses: MSWI and MTIMER for machine-level firmware
>> such as OpenSBI, and SSWI for supervisor software interrupts.
>>
>> 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 | 43 +++++++++++++++++++++++++-----------
>> 1 file changed, 30 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
>> index c3f2dce0969c..74831974435e 100644
>> --- a/arch/riscv/boot/dts/spacemit/k3.dtsi
>> +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
>> @@ -1261,19 +1261,6 @@ saplic: interrupt-controller@e0804000 {
>> riscv,num-sources = <512>;
>> };
>>
>> - clint: timer@e081c000 {
>> - compatible = "spacemit,k3-clint", "sifive,clint0";
>> - 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>;
>> - };
>> -
>> /* sec_i2c3: 0xf0614000, not available from Linux */
>>
>> mimsic: interrupt-controller@f1000000 {
>> @@ -1305,5 +1292,35 @@ 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";
>
> I think you'll need to also include the "riscv,aclint-mtimer" compatible
> here so that this DT can be used with upstream OpenSBI. OpenSBI doesn't
> include the spacemit specific compatible. OpenSBI boot prints this
> currently.
>
> Platform Timer Device : --- @ 0Hz
>

Currently, "riscv,aclint-mtimer" is not part of an upstream Linux
binding, so I don't think we should add it to the K3 DTS yet.

Your colleagues at Tenstorrent proposed adding this compatible in v3
of the Atlantis series [1], but it was dropped from v4. The v4
changelog says that the binding will be submitted separately [2].

If the binding is accepted, we can then add the generic compatible
to the K3 DTS. Otherwise, OpenSBI will need to add support for the
K3-specific compatible.

[1] https://lore.kernel.org/linux-riscv/20261109051050.105623-5-joel@xxxxxxxxx/
[2] https://lore.kernel.org/linux-riscv/20261127061432.17306-1-joel@xxxxxxxxx/

Best regards,
Junhui Liu

>> + 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>;
>> + };
>
>
> Regards
> Anirudh Srinivasan