From nobody Tue Jun 30 00:47:41 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7A2DC433F5 for ; Sun, 30 Jan 2022 13:57:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354922AbiA3N47 (ORCPT ); Sun, 30 Jan 2022 08:56:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354916AbiA3N45 (ORCPT ); Sun, 30 Jan 2022 08:56:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0DB1C061714; Sun, 30 Jan 2022 05:56:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 909D6B8293F; Sun, 30 Jan 2022 13:56:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4CFEC340EB; Sun, 30 Jan 2022 13:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643551014; bh=mtArtRxdfzyYRARE8Hm/YmQshbmLOFqK8TABaYcosT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dI3Xl5BSUthtIvycI3fPzWvSaJxLenQTli/9DMmN1fjOgB5XHwFyHwTaQF/e0fCPH hF1mqP7UELHSJBfYPMmbEzF3SM2ty7l34ckjXiMM4Gn0B6ORt89YDIJdhCrTNgiD7X xVwGOei/tJbSYL9MPYY2SOuZAZd985NMhtz0VjicDyTY/4JYZY9FagzYPRkOCzzGxS fcHhqeJmRNzTO2klk3HUJc1AUd97FJHq0gZLaSIK81uDwcPAq6NeuJsbA/QZqWhVc+ RWe4bnW4fXTOhvx/1Zac1NXO7eRWj2v5pGSCRQMDV3r41Ugd+ylEy2cuheef2gRocs JQbddqAT+EPNw== From: guoren@kernel.org To: guoren@kernel.org, anup@brainfault.org, maz@kernel.org, tglx@linutronix.de, palmer@dabbelt.com, samuel@sholland.org Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Guo Ren , Heiko Stuebner , Rob Herring , Rob Herring Subject: [PATCH V7 1/2] dt-bindings: update riscv plic compatible string Date: Sun, 30 Jan 2022 21:56:33 +0800 Message-Id: <20220130135634.1213301-2-guoren@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220130135634.1213301-1-guoren@kernel.org> References: <20220130135634.1213301-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Guo Ren Add the compatible string "thead,c900-plic" to the riscv plic bindings to support allwinner d1 SOC which contains c906 core. Signed-off-by: Guo Ren Cc: Anup Patel Cc: Heiko Stuebner Cc: Rob Herring Cc: Rob Herring Cc: Palmer Dabbelt Cc: Samuel Holland Reviewed-by: Rob Herring --- .../sifive,plic-1.0.0.yaml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,= plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/si= five,plic-1.0.0.yaml index 28b6b17fe4b2..1fa5aa7e4c2e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml @@ -35,6 +35,10 @@ description: contains a specific memory layout, which is documented in chapter 8 of t= he SiFive U5 Coreplex Series Manual . =20 + The thead,c900-plic is different from sifive,plic-1.0.0 in opensbi, the + T-HEAD PLIC implementation requires setting a delegation bit to allow ac= cess + from S-mode. So add thead,c900-plic to distinguish them. + maintainers: - Sagar Kadam - Paul Walmsley @@ -42,12 +46,17 @@ maintainers: =20 properties: compatible: - items: - - enum: - - sifive,fu540-c000-plic - - starfive,jh7100-plic - - canaan,k210-plic - - const: sifive,plic-1.0.0 + oneOf: + - items: + - enum: + - sifive,fu540-c000-plic + - starfive,jh7100-plic + - canaan,k210-plic + - const: sifive,plic-1.0.0 + - items: + - enum: + - allwinner,sun20i-d1-plic + - const: thead,c900-plic =20 reg: maxItems: 1 --=20 2.25.1 From nobody Tue Jun 30 00:47:41 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD12C4332F for ; Sun, 30 Jan 2022 13:57:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354933AbiA3N5H (ORCPT ); Sun, 30 Jan 2022 08:57:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354919AbiA3N5A (ORCPT ); Sun, 30 Jan 2022 08:57:00 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29324C061741; Sun, 30 Jan 2022 05:57:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E7E33B82947; Sun, 30 Jan 2022 13:56:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED348C340F1; Sun, 30 Jan 2022 13:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643551017; bh=d2YKiYzP01A3mCNJHUZ74cocdKYQgHlJs70hqz+NyK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPfx8A43HO5Np1lZuZnuLPq4FCXdBUZQb23c26v5DJbWOcuusw2mR+LTjUuZTGPYO 7pbjmL57V8uGn7o1HZjAFImDlAOxZeEeDfBPXCjv7GQ43pgiecsjcpFaHJBMDRtW0h sfoC6Np5LVCuZBeU8NNAYzQQGgtqoM2JkUjNl2WGCxJdlpAMQQM/+fqMjQL9sdGPdm 2hwYbafbVYQbbkOsgzx6ot2Yv5MV2P7LJmDpug6D1pjR3D/+JmcAC+W13DeWitpmKX EQgnvajcUUZuGjsXVPvIrDkKDyz2q1G7HWMpwSCQ5oS5iDrTq9FJgCWxx4QTk0W1EB uqY1M2Okquq4w== From: guoren@kernel.org To: guoren@kernel.org, anup@brainfault.org, maz@kernel.org, tglx@linutronix.de, palmer@dabbelt.com, samuel@sholland.org Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Guo Ren Subject: [PATCH V7 2/2] irqchip/sifive-plic: Fixup thead,c900-plic DT parse missing Date: Sun, 30 Jan 2022 21:56:34 +0800 Message-Id: <20220130135634.1213301-3-guoren@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220130135634.1213301-1-guoren@kernel.org> References: <20220130135634.1213301-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Guo Ren The thead,c900-plic has been used in opensbi to distinguish PLIC [1]. Although PLICs have the same behaviors in Linux, they are different hardware with some custom initializing in firmware(opensbi). Qute opensbi patch commit-msg by Samuel: The T-HEAD PLIC implementation requires setting a delegation bit to allow access from S-mode. Now that the T-HEAD PLIC has its own compatible string, set this bit automatically from the PLIC driver, instead of reaching into the PLIC's MMIO space from another driver. [1]: https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd62653= b9fb31623a42ced45f38ea6 Signed-off-by: Guo Ren Cc: Anup Patel Cc: Marc Zyngier Cc: Palmer Dabbelt Cc: Samuel Holland Cc: Thomas Gleixner --- drivers/irqchip/irq-sifive-plic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive= -plic.c index 259065d271ef..09cc98266d30 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -398,3 +398,4 @@ static int __init plic_init(struct device_node *node, =20 IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init); IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy syst= ems */ +IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_init); /* for fir= mware driver */ --=20 2.25.1