Devicetree
 help / color / mirror / Atom feed
From: "Junhui Liu" <junhui.liu@pigmoral.tech>
To: "Anirudh Srinivasan" <asrinivasan@oss.tenstorrent.com>,
	"Junhui Liu" <junhui.liu@pigmoral.tech>
Cc: "Daniel Lezcano" <daniel.lezcano@kernel.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Yixun Lan" <dlan@kernel.org>,
	"Inochi Amaoto" <inochiama@outlook.com>,
	"Radu Rendec" <radu@rendec.net>, "Paul Walmsley" <pjw@kernel.org>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Anup Patel" <anup@brainfault.org>,
	"Guodong Xu" <docular.xu@gmail.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
	<spacemit@lists.linux.dev>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Bo Gan" <ganboing@gmail.com>
Subject: Re: [PATCH v3 6/6] riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes
Date: Sat, 28 Nov 2026 17:45:15 +0800	[thread overview]
Message-ID: <DN6QXCF5LYQM.1F5IA58ETMXVM@pigmoral.tech> (raw)
In-Reply-To: <yf2dawzefycxhhs7zkua3v3hoirals3wtr6rheh4li33eq7r4i@yb7cem4r6x3z>

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@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@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@jms.id.au/
[2] https://lore.kernel.org/linux-riscv/20261127061432.17306-1-joel@jms.id.au/

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


  reply	other threads:[~2026-11-28  9:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 16:29 [PATCH v3 0/6] spacemit: k3: Replace bad CLINT node with ACLINT nodes Junhui Liu
2026-09-17 16:29 ` [PATCH v3 1/6] dt-bindings: timer: thead,c900-aclint-mtimer: Add SpacemiT K3 Junhui Liu
2026-09-17 16:29 ` [PATCH v3 2/6] dt-bindings: interrupt-controller: thead,c900-aclint-mswi: " Junhui Liu
2026-09-17 16:29 ` [PATCH v3 3/6] dt-bindings: interrupt-controller: thead,c900-aclint-sswi: " Junhui Liu
2026-09-17 16:41   ` sashiko-bot
2026-09-17 16:29 ` [PATCH v3 4/6] dt-bindings: timer: sifive,clint: Remove spacemit,k3-clint Junhui Liu
2026-09-28 18:02   ` Rob Herring (Arm)
2026-09-17 16:29 ` [PATCH v3 5/6] irqchip/aclint-sswi: Add support for SpacemiT K3 Junhui Liu
2026-09-19  0:06   ` Yixun Lan
2026-10-02 11:25     ` Yixun Lan
2026-09-17 16:29 ` [PATCH v3 6/6] riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes Junhui Liu
2026-11-27  5:27   ` Anirudh Srinivasan
2026-11-28  9:45     ` Junhui Liu [this message]
2026-11-28 13:47       ` Anirudh Srinivasan
2026-09-18 23:52 ` [PATCH v3 0/6] spacemit: k3: Replace bad " Yixun Lan
2026-10-02 11:19 ` Yixun Lan
2026-11-01 22:16 ` patchwork-bot+linux-riscv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN6QXCF5LYQM.1F5IA58ETMXVM@pigmoral.tech \
    --to=junhui.liu@pigmoral.tech \
    --cc=alex@ghiti.fr \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=asrinivasan@oss.tenstorrent.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=docular.xu@gmail.com \
    --cc=ganboing@gmail.com \
    --cc=inochiama@outlook.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=radu@rendec.net \
    --cc=robh@kernel.org \
    --cc=samuel.holland@sifive.com \
    --cc=spacemit@lists.linux.dev \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox