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

Anirudh Srinivasan asrinivasan at oss.tenstorrent.com
Thu Nov 26 21:27:47 PST 2026


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 at pigmoral.tech>
> ---
>  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 at e0804000 {
>  			riscv,num-sources = <512>;
>  		};
>  
> -		clint: timer at 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 at f1000000 {
> @@ -1305,5 +1292,35 @@ maplic: interrupt-controller at f1800000 {
>  			riscv,num-sources = <512>;
>  			status = "reserved";
>  		};
> +
> +		aclint_mswi: interrupt-controller at 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 at 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

> +			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



More information about the linux-riscv mailing list