From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F05EC79F99 for ; Tue, 8 Sep 2026 16:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wMJAqh0IYs8ECs5CjiAWOk9IVr07JLAXX0YB4NOHoiw=; b=v/DUkj3gsNwXFu qw0vLwR/ZWS42TZkQKBw5jp198wP8doymU6ZJTM9tlxiNPhn5kiBrZl/1GSBYm+SqbrtAJ7FaWQoj a1TkoX28PkhbR/x37N2/Hi84A0MhigIyFgsHLU8TX/06CWfPBNFtrIMhVYU5ZRNawIvpnOYa/S9Eg 8DJ3jEMGLsbxkeopZB9eLFu/P6gTiMM30RAKGx0CRLDEOK5Q7M4365M2Lk/dHsbmFuUuMp2GqdIwg 1NFQCKxAXN+eeltTKQ2BASIjJe3NEmAP2A2XiE1rtx+P8yA94CgWRLZBrJs6cK9mIQDm4L1atvOeL M3P3j7NdibMl2XWLB/Xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x3yhh-00000009fpi-0bsL; Tue, 08 Sep 2026 16:29:49 +0000 Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x3yha-00000009fof-3kct for linux-riscv@lists.infradead.org; Tue, 08 Sep 2026 16:29:44 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1788884959; cv=none; d=zohomail.com; s=zohoarc; b=hRcIu/kDve20s5QxX53vTX9xFddWSTmceSQVwzKQ1ODxTRfHOA3gmYG5Z4IniW5Y0yo/xBMDX1EQfLrlaIx2UsUvs/mNY+Qy0mbJjd+8dZ9y6jl2K/1cCoRUE//JhroiMpf5p5KRFFSS+r6qcVD1UxHuBcoG5ExqKGYjeFsR3D8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788884959; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=D8qxbwrZwATsoR3QHFGwMxcNbr4zYF2x2RxDDaZcC44=; b=SEfRB2UgduhZLyT7c5jAYdvdQKRMILS6P4gDCWWrSTMDqpR7VJv6DrCQwyv9Me3R8Y5bAGq5hf/Yq+CThBv6VF3dOK3yUdGv8F1Teqa2mxMCd24gCqcM4wjcVh0gNu3byoJQULF0adWmlnwgHt1FA9F3oZWBgs7/b5aAGrBPjh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=pigmoral.tech; spf=pass smtp.mailfrom=junhui.liu@pigmoral.tech; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1788884959; s=zmail; d=pigmoral.tech; i=junhui.liu@pigmoral.tech; h=From:From:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:To:To:Cc:Cc:Reply-To; bh=D8qxbwrZwATsoR3QHFGwMxcNbr4zYF2x2RxDDaZcC44=; b=fRHK4dN7YIPk+hRAxc8+W8ScDuHeoFG58ePScaLgggQD4n2eG6+g+OIVia/0s0g6 wTxg9CAQOaf/a8mAOoUA5VJZ4r1msG5WQcibEjFvRDEFDVUahKIRi/fLamGhoO6MzH1 3KyBWtqfSsg9QrJWV0GCEQjlKy522niXf3gMG4R4= Received: by mx.zohomail.com with SMTPS id 178888495744144.65748997996377; Tue, 8 Sep 2026 09:29:17 -0700 (PDT) From: Junhui Liu Subject: [PATCH v2 0/6] spacemit: k3: Replace bad CLINT node with ACLINT nodes Date: Wed, 09 Sep 2026 00:28:43 +0800 Message-Id: <20260909-k3-aclint-v2-0-7931e5bc86ad@pigmoral.tech> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/22NQQ6CMBAAv0L2bA0tiMWT/zAcatnCKhTSVqIh/ bsUrx4nmcys4NERerhkKzhcyNNkNxCHDHSvbIeM2o1B5KLKz6Jmz4IpPZANrC61qtvCSC4NbP7 s0NB7b92aH/vX/YE6pEAyevJhcp99tvDk/esunOVMoZGy4mVbqNN1pm6cnBqOAXUPTYzxC89Mx ka4AAAA X-Change-ID: 20260729-k3-aclint-94ca9d3f818f To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Inochi Amaoto , Radu Rendec , Paul Walmsley , Samuel Holland , Palmer Dabbelt , Anup Patel , Guodong Xu , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, Conor Dooley , Junhui Liu X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3822; i=junhui.liu@pigmoral.tech; h=from:subject:message-id; bh=n0RwmVYfL4xTZKBJL8mGbYS60sV/U2MaKAHBgZld1S0=; b=owGbwMvMwCWWvDb1VEXc8j+Mp9WSGLIWmO+9w2V4MJcppifUcbfIbLHPLuLzrvbubJB1sv+78 8k135MdHaUsDGJcDLJiiixc/uL/rHV4vh0RaL0PM4eVCWQIAxenAEykcTUjQxPb/WNShsanpFM/ Jl6tUXOJjQgoFpc6IfhW83bciqlVOxkZFifIOOYJu1XlJq9sdP91f0uV/KuIS7Oc5LgU1SdXT37 DDgA= X-Developer-Key: i=junhui.liu@pigmoral.tech; a=openpgp; fpr=15B30CC69C4BF0CC3C08F85A2A90CDC122DF37BF X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260908_092943_389197_C1E516F9 X-CRM114-Status: UNSURE ( 7.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org When testing OpenSBI with the upstream Device Tree, the CLINT controller failed to function properly with the irqchip.riscv_imsic_noipi boot parameter: Platform IPI Device : aclint-mswi Platform Timer Device : aclint-mtimer @ 24000000Hz Domain0 Region03 : 0x00000000e081c000-0x00000000e081ffff M: (I,R,W) S/U: () [ 0.091014] smp: Bringing up secondary CPUs ... [ 10.104917] CPU1 failed to report alive state [ 20.118689] CPU2 failed to report alive state [ 30.132288] CPU3 failed to report alive state [ 40.145953] CPU4 failed to report alive state [ 50.159604] CPU5 failed to report alive state [ 60.173212] CPU6 failed to report alive state [ 70.186981] CPU7 failed to report alive state [ 70.191411] smp: Brought up 1 node, 1 CPU Through exploring and testing, I discovered that the K3 actually provides all three complete ACLINT components, and subsequent confirmation with the vendor yielded the following information: The ACLINT controllers are mapped to two physical memory regions: secure (0xf1810000-0xf1820000) and non-secure (0xe0810000-0xe0820000), with varying accessibility per controller and execution mode: +---------+--------+------------------------+-----------------------+ | Offset | Module | Secure Region | Non-Secure Region | +---------+--------+------------------------+-----------------------+ | +0x0000 | MSWI | 0xf1810000-0xf1813fff | 0xe0810000-0xe0813fff | | | | (M-mode only) | (Inaccessible) | +---------+--------+------------------------+-----------------------+ | +0x4000 | MTIMER | 0xf1814000-0xf181bfff | 0xe0814000-0xe081bfff | | | | (M-mode only) | (Inaccessible) | +---------+--------+------------------------+-----------------------+ | +0xc000 | SSWI | 0xf181c000-0xf181ffff | 0xe081c000-0xe081ffff | | | | (M-mode only if efused)| (M/S-mode Accessible) | +---------+--------+------------------------+-----------------------+ Taking these constraints into account, we choose the secure region (0xf1810000-0xf181bfff) for the M-mode ACLINT components (MSWI and MTIMER), and the non-secure region (0xe081c000-0xe081ffff) for the S-mode SSWI component. Signed-off-by: Junhui Liu --- Changes in v2: - Drop the generic riscv,aclint-* fallback compatibles and use only SpacemiT K3-specific compatibles. - Match spacemit,k3-aclint-sswi directly in the SSWI driver. - Squash the ACLINT MSWI and MTIMER DT additions into the patch that replaces the incorrect CLINT node. - Link to v1: https://patch.msgid.link/20260729-k3-aclint-v1-0-aef88614d3a5@pigmoral.tech --- Junhui Liu (6): dt-bindings: timer: thead,c900-aclint-mtimer: Add SpacemiT K3 dt-bindings: interrupt-controller: thead,c900-aclint-mswi: Add SpacemiT K3 dt-bindings: interrupt-controller: thead,c900-aclint-sswi: Add SpacemiT K3 dt-bindings: timer: sifive,clint: Deprecate spacemit,k3-clint irqchip/aclint-sswi: Add support for SpacemiT K3 riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes .../thead,c900-aclint-mswi.yaml | 1 + .../thead,c900-aclint-sswi.yaml | 5 +-- .../devicetree/bindings/timer/sifive,clint.yaml | 5 ++- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 1 + arch/riscv/boot/dts/spacemit/k3.dtsi | 37 ++++++++++++++++------ drivers/irqchip/irq-aclint-sswi.c | 1 + 6 files changed, 37 insertions(+), 13 deletions(-) --- base-commit: cee9395acd8043be0644b25c34bfa86623f2b935 change-id: 20260729-k3-aclint-94ca9d3f818f Best regards, -- Junhui Liu _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv