From patchwork Sat Apr 6 17:41:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619901 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 84A27C67861 for ; Sat, 6 Apr 2024 17:41:39 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KVaU08z5HudZrLyUQEqyjYr76s3spH7p5rltj4jCtWw=; b=tiYDiQAr3uxKTb tyl976hmmncYdDLQM2zTrlnv89mz2gmjShhCvnbPcYzQwBzXaDAvf//JSRcAf3QC/fgP9c2YahuT5 2PMU2H28u47Wx3f2N4+KjUDuVnjZVvQ0iInHlA8+aKg++4gYRx1EAAe8hyFlkMSpWS+cdcZssLKXf wGR6hs1k6RuPP4kfglSXHETYEJNgCdvllURzuemfcJanTBwjvdLnStPXa22w7Qd7+Kq4AO4W2RFhS RrSw5oXrttVHOa7h9+1Ykt37UiQZOpkpwCkY91iJKyq6oO3pbc9nxqTzNAHcGorolPC7G9RaMH/Xe XBYRMw7OQVJmJ3hIoE5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA2p-0000000Al95-2szX; Sat, 06 Apr 2024 17:41:35 +0000 Received: from out203-205-251-27.mail.qq.com ([203.205.251.27]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA2m-0000000Al7m-1jya for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:41:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425287; bh=sxK2uMITViuWCRH/HETWDTh3a/M4c3Sxsj5q2qzVrG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oKCvA3CzhHM/qMTTH1G/HXKvgf7lCXTxJKwgcoAupJrGP//hhNiw+7BeKJ69HIuyL uJkzn+lqmswbRmrjap/OTs1w3IyHZdJSktr8pkXaQDlXNIGCE5+XY15aJbcAWjD06Q TI7ic2EQAbUyRczcLlYwu/KuId0ld5KKX1h/yKYQ= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425282t6w8mmbmw Message-ID: X-QQ-XMAILINFO: MmCmH9jyqHC2lND1K0VVvHxBwX7D9semj1UcUuiGU6laEyG7OxPlSC8N+zJyQj hRpVTm2c8/QDdVIX/tMVtcazHAoM6EYLmXfbus5z+ssi11RnzjlB8xj6dFvda1ao+OdOm7bngNbs epWsj8PkHa+OMsMSUi04ksw4t4qgAo7ZS1DPAQTmGpQfWLlxbAd2VwY+Jc4729MFdKUbNhG1ZirK u+ES+0QobLkaGUhvvp5osPBaIWDBLI+mYsLiw5W0jCIhN7WAjly/HaF5qyY7N8AmODVZfOz4XFye zrTWhsb1miXK5Z73eIKg3cH1jY3RhiKXFwShuQEpMG4EVCc/eiXeelnfLSQx0J6TYnF9CV7dvn08 yoowiZGDWIcbSh8DyD6fAKeCw6Kjgoov2ecb7fr0KeGeZsFEAI2J6O3cL+jwNFAtaVsU+0f/qRzT 2KPrEXEBNRM/SIRMaHGFFL7pI87QpL4j2G2IbNrM7OOAJCCFgPVb8BdTXhweGYMCkflH2EVR3Rrj b+wvw05+7HRBzsBOkvldgz2MFTMLiiSIhJfIupRvoVgCnYIgszVMyOCvMgsILuEuMF2ILK3F2Tl/ diUgBJFunbPf1s/RmuxSmTrVebTkJ5//PS2oIh7X3gukM5yC3Hm+1O0FaWzXNeNg/jQ4P241OaSr z7ZnA3VccWOSbbZo2EZrTvWtDCAU5i8gFo8TYLINs6/ZI+RC/MlwYQs+LuNrQBZI9EsHXLPqecLl 4ca5Zo0KpZb2hJliCCUmDDsFVFxg0OVtsvVzkZYDqDAZCO07lDt8VBqbfrBZhHvfJVoCIHn4dihq 6+rthkHB0nVesldg7C3xSSkszxaTHgpLbHqAMdg+ydUiBjWr3yR1L88Ofh0mhqJW7tfJhJsdETsB sDkX2PDCAgymMUtM3N7uTuGyQ8LZhv1sKunY1u2MRnpazSui4qPLfZhPU/PsPsXL20fO8ztmoTK5 HzcZdw6UboxpVwQo+Y49KxIz6/F8TjHQIVEgJWK46G8Wcm3eMS+S14WAdK/AxkhGFT38Bz1J/9oj 9e0bKol9OZJXtSThhu+2ct1z3+JtU= X-QQ-XMRINFO: NyFYKkN4Ny6FSmKK/uo/jdU= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen , Conor Dooley Subject: [PATCH v7 1/6] dt-bindings: riscv: Add T-HEAD C908 compatible Date: Sun, 7 Apr 2024 01:41:11 +0800 X-OQ-MSGID: <20240406174116.2945552-1-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_104132_790924_E0F3E7FE X-CRM114-Status: UNSURE ( 6.68 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The thead,c908 is a RISC-V CPU core from T-HEAD Semiconductor which used in Canaan Kendryte K230 SoC. Signed-off-by: Yangyu Chen Acked-by: Conor Dooley Reviewed-by: Guo Ren --- Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index d87dd50f1a4b..d067f2a468ee 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -47,6 +47,7 @@ properties: - sifive,u74 - sifive,u74-mc - thead,c906 + - thead,c908 - thead,c910 - thead,c920 - const: riscv From patchwork Sat Apr 6 17:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619902 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 C758ECD1284 for ; Sat, 6 Apr 2024 17:41:40 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cfXAcabfZlKVKjrPxhvy258YNXoddtXPGIU83RRam4M=; b=rkT8/fcxh0EaE6 Lcrev/qSnEs4BQP81L93vXRbfNvlD7kEMFrqj0qV7myqVozC5/cVoLSKHP7uuw7GzE0+EfGPtdvQY Mak1VRdRjiL22R06KE1l+WpGBHrCtLp1VTmi8o+5VyAKxkvfU5vHxE+uCBoqbFnpqaWyjE7UN0vNC RHhjLn0AFnIsv28dJem2lVeZggGxIWBbws23/WDnFTfABRN+UIgKKnJeoYLcT3UTaRv26QeI/e2yb a0XV0uOa+lJ/Uf34KrQOqwlG/zlRO/TVAYcCCFjlrg+GNvaMDRCs8EHFK/jAM4llRQsqgF5GHh5iG ow75P+11swViq9tEK4Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA2q-0000000Al9R-1QTo; Sat, 06 Apr 2024 17:41:36 +0000 Received: from out203-205-251-73.mail.qq.com ([203.205.251.73]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA2m-0000000Al7t-2VDu for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:41:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425290; bh=kvuS7K0wl30nwl4M5zznAdLvDfFhfeZr9JFWkFZyoG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=szzTPkjRpm6spg+BqKRUtm+mV2UmVruvy5z0813Aq4ejp7Yr/QS5czxPWQVkfUEzR R8jKdaUJ1V5pl08asVhiUWfM17PUxWE2qKfTtA8rAzfRpJBCmMWsp6onw3z/pds3qL 8ECBMjberFAMZBQIcWbgg1pIff9c4amHyqAXEDvk= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425287toocbwouv Message-ID: X-QQ-XMAILINFO: N7h1OCCDntujGRTedFeKpQyqeYhskNI1hu06uZeunloZZjDYx8K23TRlbt3B/D WTaYrhL9CAjCiT2UMA2L+giDT0nMuRE063sNYhcHVI3H2CHqJQCLP2sqT4xHrluLK2ywkmpunQvg SlWhS/6guj8VoDQYj1b6JnLZCHDERvv315IPxf78yjHvO4jaK8JW0iSloAuHM5kDptV8doUsWDjY +0cP7FEPC0EtOpPsXPs5pOpF/RJbnTjLdAL1F3LLMS0pEnRwtCtRwz8Uwcn5QQ1HSdTe+dYLxT6u 2+2ha78VCZ1aSJpfLntIz8g91CUiOyRB4KCFFzdct/L4hz3XikFaltNH4h/dPj0VNc6N+hpc/uuj CUA70rA4ZytKLJ+MLH2VszTqZdB5rCX7kP2aOdK3Cw+2oWDCn6HdXa/RSMUIqqb04bxhV4XxAl54 GKD9fgGdFp5Ns+Ur8GfzBB67jMeYZcd8QTJ4VWt3Z0FfpnzctnImoCxk/hsN+y8r9mgqHkiKd1IP 368ySoMGoFIYUAvXv/5VzHNcjZPr0NrAku2F7sbb5cvYSOAyBd0dOTU16bnW7tpuZy7wjCuxIsUJ SJj/VUwtBAyKQWg0ro7QxrFObRJCXoj1j7etLalvb+ujOmwxRZ8nHsyPJz4/xqeXaWBbhMaEKHps lGkFc833VHjm/hIwT97wdCopqjDo87d8HOIyWlnxB5RXO+PU/tzzeKMJj6fcbZGisWAW5R9Wyyg4 F/K+MGbs7yxAmCNW7thLkmu2tivXk0XiBhRl/4WyXZ+DDxEdXng11RWu25S3r9QkYBsp4W964W6+ nBo3NtoQwIlNZINerpqWWN1xFPnI3EYrX5vybaxvmbZvP9L7vSCxjo8DfcQ9fjco2nErZZuPbNVO BNHND2X7AhyoUFEcWW3obI9JyiTWqaB9fLmCj+CYnmklC0bym8/bL8UFS/WELt5BG29CNdgq7Bd2 P4dog4UOF09+9fLnkEyb7ukPZHSZtXSTRgoAIoNLn/C0O1+cPTQshmWGD5RLyONeswRWmtEGe4Dp gZEjXRY/YMEHzNWfUL X-QQ-XMRINFO: MPJ6Tf5t3I/ycC2BItcBVIA= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen Subject: [PATCH v7 2/6] dt-bindings: add Canaan K230 boards compatible strings Date: Sun, 7 Apr 2024 01:41:12 +0800 X-OQ-MSGID: <20240406174116.2945552-2-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_104133_401671_5B00519C X-CRM114-Status: UNSURE ( 8.94 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Since K230 was released, K210 is no longer the only SoC in the Kendryte series, so remove the K210 string from the description. Also, add two boards based on k230 to compatible strings to allow them to be used in the dt. Signed-off-by: Yangyu Chen Acked-by: Krzysztof Kozlowski Reviewed-by: Damien Le Moal --- Documentation/devicetree/bindings/riscv/canaan.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/riscv/canaan.yaml b/Documentation/devicetree/bindings/riscv/canaan.yaml index 41fd11f70a49..f9854ff43ac6 100644 --- a/Documentation/devicetree/bindings/riscv/canaan.yaml +++ b/Documentation/devicetree/bindings/riscv/canaan.yaml @@ -10,7 +10,7 @@ maintainers: - Damien Le Moal description: - Canaan Kendryte K210 SoC-based boards + Canaan Kendryte SoC-based boards properties: $nodename: @@ -42,6 +42,12 @@ properties: - items: - const: canaan,kendryte-k210 + - items: + - enum: + - canaan,canmv-k230 + - canaan,k230-usip-lp3-evb + - const: canaan,kendryte-k230 + additionalProperties: true ... From patchwork Sat Apr 6 17:41:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619903 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 C9D2AC67861 for ; Sat, 6 Apr 2024 17:41:54 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A7ZcxgJMDEcF1ZtQwhuXye85QbL0opjF40NY4HDWyWA=; b=2e4vpSek+ROxo6 F6yTLKuorBv2z3ZekO1ceYdAtyYGRHVq+/V7eyPBGgQgnYHf6amG7fhng6gGSUzsq0GyaPj8adas3 atSQW6tabcfRBAakmkwKzaZOC8VDgn+BftwxcLpCEEME+92lizwzygHctFTMkyLXkFhVmhC4kcjZc BXEFmgSyM6NVEf7OIEUTnhNBZ6zUwTReLoV/caHHPxv72IDMFyzFA0IQYkf+l5G8/Lwg2ZlOzSEoq OH+mtJ3UYjYhERAVorCT5uo83Dnkx8thHszeRhK8KfBLgwgut/mYwwackNESG6RSusPoKy7uWEfIK h7Cct4P8+9KDenx1wQMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA35-0000000AlEC-2Jmm; Sat, 06 Apr 2024 17:41:51 +0000 Received: from out162-62-57-210.mail.qq.com ([162.62.57.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA31-0000000AlBd-3R8a for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:41:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425292; bh=rcU9GmGkfYObnRvy+6sIXXI4nFg1KITAK23jcYZUxzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=plRvRvZ9KDvgX63ucSRvEnR2foSV8jfFCyDmmcBbFcynQynBCLVr/slJyIIUYYxhk 3+Doswj/hPUOe2GLeoa/PYSlg9qaoB5ITWQxaNn2h/UjitxLC5IgNrn4+uvv9uEEe/ n88D0gHMs2NNm+3jacK2/uF8hDaHwxisAKGMT780= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425289tanbkg6hz Message-ID: X-QQ-XMAILINFO: MB5+LsFw85NoaOVyhodLMB48CQJ3P1twEygEY9BZjQnqBJMaHqLb4knc5uw3ED +GrAS3e1JQQH61eKkbP13RfI3LUisjnWFSnwxJGzsVoYOpj5LB/UoV7/jKUQkG4Y0MTo8hKEAQzo LnY+eb6+6iKVG542cOwzs+ezhLswCP1z0hjGK5CbT1gmleVXVaQIyYpmfnGFrGS5ecF46WAZ2xWu rUu43ZCSxURBiAnu5KVU28A3RzvP8l2T14QXZF/BoQEw4gyLWfMesjYIl4uUV2q8W79fUIrlHAmU xiet7JUV84HfsjijNtFxdnie8RymcRJkVQ4233b3t5JMJHLmfU+bCo8YZObfLtfC86GSnd+YHLfD wHanFS2gHlO9tpwvwBmqbSIuRsuEWoIz5ddc3Tqf+RnM8m55g2fYRiDS6Q+z9qFYzWu0vsCqkqqN DEIo4qb+9/5zEJwBlwi3ZzrhGbLnsUDjku1lPFPB1WB57hwOgYpFsGWxK/3dORE4ZLboZGvzg6Ii 2/D9RPy5z3Dkz1FSx9+0Xufvsi6GNtmmXJ+gyhqnvidnyheqbEVxZpyWQTIfWGI2YBVwndKlb0z5 jBGfmESbm+UqdjSrJ7twH62YGnLY2k1LETfF8CY5xq05k2HwqbKaOIT+SIkL514oSFnDyZxJ4IfC TLstxrYTLdSdY2M8X7D9XAJ8nSCqFD3WDx9XbTELsCMy0t9OUrd63S/zQDF4isUVe7edNf701DN/ SQsXMNS4XTpHMCDiuqoOSdDg/Vyuz1AoXnEJKQzZ6BM5rexVZ67teCRD8sSAyusdtZU6wgZzsDnF dN3MMpvLZ2YAkP55JrldC6jwnZhrprv/qyiZKfglOKGn337Zkkt+maA5jeHJtBI/go9Olq7NSK2x NrRx1V0s05PJyFv3fg77oQJU3UPupZQRLEtt30CbPojVWSlfG54REIqY/Lt0LpIO7vUXAevo/PZy 9WCTgJ+gV9s9rOvM/SvetaZvXae4nkjvVWjJl6xkgNVJGpRcV4vQ+zZvoNQaoG1q6DR27L+CDQpn p9oa3Hh0OFIlbVTdYfWYW80Js7fms/OSIT3k/W83w143NQazuT X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen , Rob Herring Subject: [PATCH v7 3/6] dt-bindings: timer: Add Canaan K230 CLINT Date: Sun, 7 Apr 2024 01:41:13 +0800 X-OQ-MSGID: <20240406174116.2945552-3-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_104148_535193_9775E3DB X-CRM114-Status: UNSURE ( 6.50 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add compatible string for Canaan K230 CLINT. Signed-off-by: Yangyu Chen Acked-by: Rob Herring Reviewed-by: Guo Ren --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index fced6f2d8ecb..06c67f20ad3c 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -38,6 +38,7 @@ properties: - items: - enum: - allwinner,sun20i-d1-clint + - canaan,k230-clint - sophgo,cv1800b-clint - sophgo,cv1812h-clint - thead,th1520-clint From patchwork Sat Apr 6 17:41:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619905 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 53392C67861 for ; Sat, 6 Apr 2024 17:42:07 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UPv5m3XyljSPrl/rYZvfvLGkOiWcHq6oqXSyM1Zr7gQ=; b=GLJvaNvy312KtJ cbGQYF50+3MinLyipXLeS5q1HA5Ow6lSiHErGK0VkTOAq+CLSBiMogZ1pCGv13VuJt5Aibv0k5W2o 0v3OvVC1po0BaCIsKqBulC3N2P9s//rMz2VKQiftJdJ0g1sfoRNxsPwWGyrnjBo2PUN4/SHEjwC8A 1cV81M/BZHbGoZEy5HH4XMDe02Fp0nf57OhS0sKHqgFthQVSF2llAayd874p/euJTzHPeU8UImRyQ 3eeemFD/fCi0KyxcrPQxnk14SF604HIzfDLaXNBz4L29mg9XbMzpUb7hN4KJoNLwTCptKOCD6G3SC +FAvfFDpcteNcTwCGd1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA3G-0000000AlJg-2pd8; Sat, 06 Apr 2024 17:42:02 +0000 Received: from out162-62-57-210.mail.qq.com ([162.62.57.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA3C-0000000AlFT-28fB for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:42:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425294; bh=jaM56XVEDkeOpfko2CLF+2oPCWKBzRPYG5Ofw5dlTQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=keAgr7lJKF2G10a6C8NtzWdPekl2hAGZ1TZ5lbZd4KPe3J0XSUvLDGbQGKAYVJes0 HHEgMwYZyC/fdoGfvr9tf+Qz0YuLu5BPn4Ew2s8skwV/2Hm+6k8oHi6CcHKqC1+tgS PVAcG20HvCZtFRRaS8ItqCkg6D0XU3FTCJ/uBLUM= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425291t10d8njzm Message-ID: X-QQ-XMAILINFO: MRw/zKT/0BpPuEAjjYc0zNkwXSefQdsO/pK7morQsdvep4U6aLOUTHdQBe6/iS kv8PoHzgIO2BLqZBIaUs80HJoxts5lfFoIPkfeGq3Q510EJdgedTMCCg0iRq+dfuUDwpApG/fm60 VsxFnvoD8cRLXs3ORD7/RjVFxGFtoKlStSQCLOhvnuuoXllSn1GrG6wDsbmVmNTLj9jDIwDWEms1 1mRjopi6AoUaLg1GURwEmdEJ9OeHGgLA1OAKO9tqdOM/Z66rHJhvY6uHnq0RKpNwPSCKeMMHYM/D KSqcVVnwpFgxrACcStTJDstPNyFTFM7C27oiZWy/PfOuvCQwIF4vVJ0WlIZkB7/z+VJJq926YQG+ fwr9EJBZp+F8ZMoG01NrSjwaLSgwcraJ9DF/EekppzMucOu68qs5AKz10HkuV9U2/8XRdlBcRB8o 7vxD+tBps7r7yd1HJmaFTNZYTsXeeeOcmIgU4MVds+qzw1nGkyS1Q0ycp0oG7HNtMuNg6UGMc2ng fykYDpW11XsTCpOEKh0u3xfEKlvrK2vynF4eO8Mu1sRAVyBetoDmk9IKV+2DFByZtDpSE9wHru+V LLThdJ9F4hPCOd5LfrZRAlIWbFD91zqK9V9Dkc2rEOqEM6dHhnu6jw6L2mx8+aWhKI8zlH5frGOv Y+4Lo3r5ePtJsMZucmvhdKaaPLlO7+rTkXko2CPf5gXU/ndu08qti5/A50zSS/4ebY+rWDnenT5i hZwRuou/Ecq5E3s+YoB2EsQTkax8AFtJqUjAbjFLx7VCXR9t7iUI6YQvoO530ovQCe13FIJc2WA1 qRYgeTdH0P+8htYZVRzloifC27z6FaEnsXIZMQRf5aBXZQknf4roLYttZjKgy4hW2XeEAEGjMTyT o1KyZvNURaAhOo0W7shDJ2eJNhn4rR4faX/zNDwmzlwERMQs1Ll//CqDlqPmIFZliBUoolGdFVyq eY1pZePZLPHxBlBKaVWv7RHprfMlNl9B6Rkj9cxMe4Hbndk99xv09TjHT9SD2OObL4XSdYizpT+G xSdi8XqyzeHqL7tYfLTpESuH5uWsTSp+QlmEUOSQ== X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen , Rob Herring Subject: [PATCH v7 4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC Date: Sun, 7 Apr 2024 01:41:14 +0800 X-OQ-MSGID: <20240406174116.2945552-4-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_104159_293188_B05CAD4C X-CRM114-Status: UNSURE ( 6.50 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add compatible string for Canaan K230 PLIC. Signed-off-by: Yangyu Chen Acked-by: Rob Herring Reviewed-by: Guo Ren --- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 709b2211276b..122f9b7b3f52 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 @@ -65,6 +65,7 @@ properties: - items: - enum: - allwinner,sun20i-d1-plic + - canaan,k230-plic - sophgo,cv1800b-plic - sophgo,cv1812h-plic - sophgo,sg2042-plic From patchwork Sat Apr 6 17:41:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619906 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 65A0EC67861 for ; Sat, 6 Apr 2024 17:48:11 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3XPyYsBwXOzgGvgwm89E0u+/gSFdvUC/4dTABrhlt6k=; b=2UJLQaXYKzEg4t g81YVuNquyPlthELA0dHA3wk79uY0qoOKZOwF76tf/4okOIYbSzmEZWd6ZlOBHCK1f6Jmn5QYPrDg EajYXK1w7ZQ3Pt2ji5KHP+ezxemjuUfVSJiEA4rNJWE5JuVsIMa8tPMCl4GKUzr8ujPktl2y21TFK TWLrYyra036iczDDRmUgyuuRXC51okt9yIXdtPVgiVCxzA71FTYC5qZGL+q04UNZmKziqVXozhn5n WbpZjv8sRCrXP82r4/nTG0MWgXk2Ubf/55fi9O9tjx0zrP2RLgzu9jqSe8eKDFlIuO2W+AE2vTqUr BE5ZssshFdaLs6NQDeVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA96-0000000Am2b-3PYl; Sat, 06 Apr 2024 17:48:05 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA95-0000000Am2O-0wt2 for linux-riscv@bombadil.infradead.org; Sat, 06 Apr 2024 17:48:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Date:Subject:Cc:To:From:Message-ID:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=6xbpb2z0qZF5gLcFrc+JYOexR0DC5lhr3RgErwZ1kd8=; b=nXXFW04DEBRP1Ot5wrQws/+KV3 2p+j+dc/shb6wOPR9zv/eWhf3vLbZz/UTgcNLlphJ81RDq49fA4CJTslnB5BAICGOP9vdQCQNXhp7 dStIt1ScgfvD+hxEDdSbnxGMscSp6aG2H0Qh5IB5ml6JUIQelpK07nA0cwykUAnmPbHBlx36z+Ahg zzRpkBjmotk0lelaXAiJT6W+6YzbuG9frn1OBeusS/oteDFygnvsUdr4aqPnJpjSGY8LZ7IY7ujYU bIPDZxeg8ZcoD1sDegjO4YtqIwcebvPA423u011kkMn/wVfOiwzSa9bSfaDDCvJEZ98fve2ZslE/q oUv1qPhw==; Received: from out162-62-57-210.mail.qq.com ([162.62.57.210]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA8z-00000006J6C-3w7x for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:48:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425662; bh=6xbpb2z0qZF5gLcFrc+JYOexR0DC5lhr3RgErwZ1kd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Rfffz5B1vFMnxmpIz/ML6ArTs911H784CcNqtmUNNrqubZVYhxZ4f1Ap75R4cBoD+ hZYOL1qRJ8Nc0S9Y69wDhIQyKxnwLA+0Quk8DLmtVkInrQuPvS+ag+uSC3Qks4S7vm F4uGHNcCPgvesaKuBUWY6/yCfQnjPMwnnzOafGs0= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425293t6ye1i36l Message-ID: X-QQ-XMAILINFO: MUjlMaoygc42ewbi+VOeoeeIPRRReiFiNU1Vkq0nR5Kn86yGWQTwsdUfzLX0Sh TZRq8xzrEMQ991ZrYhe0AcLl5NqMjZVK58dL0w7tgAChQZQiHfSqi44bO7XuWsJiEWtJeFsadQgq YgUxoOPRr7hxaVBherkn2c5TbS6i1I5kle5t5q8Be4ksvbkAt8pX+/i0vmzHMeMXlRsnk+mWKGly YjdKNEX6TF7e/YX6MSohTWnXy5wk+xVHRj4eledKxGDVzdVErhzfKiZvW9XvqdElfrn11YWeA2kP TAvAoadR2s65ZE1V+VRreX5m3iiI0VQq3+6vSOjyQ2pE40CQ0VM6L9vDEOebjvFOuAu3NXC0EhnE AxKHJN9SMfQ1NH5fGi6xtit4zmhy80qXsMyp8xShYwtZaDZoQoVexPAQps+IcWbbPl1Qre7sOAhl 0A0k9si2zkGQsEvslvqaMpPU6UsvT5mE3dm2lEI0Db+LR1Fmauwh6tLJhY0lFLNtvBJaBwlvp8CP MO6ygbLGTA0IQLNrBgzFPFoNHqUbiemdKszBmzsI7Sd9In4mxdgjiKzsQOGM0BDfFjTbDfrttN3V CfUiTW8ERwxzqhQfimk6gZuX/sJKMDML4z2pZLM8Cp0MHD1o/JTm10NiFSZMEwHNx2aeYRFx56To fkvun6iNK+zRP5zPoXbou1blanEUGDEuHTSt+I37OgmeJWG4ZpNjFr+db33/G9djvOWR83Y/1CbY y4MJo5dN5ERFn8L1yqxaOoWM1bAlS9YUGrWdmcLPyN/VXtqqO+kCO56Y+pAetQHsmmAjPOm3yfjP qfym9znPnkuYJMCxSyxh8EDYqg9FtD0sNz7CqOSOae844xv79vGWaMZgKyOVkhrzGp/ZML3GlAuO vCrPPqKbob5ptx3W8XfgOwZxZPR+PvpOJjCd+KhSyeZPV7gGiUDooQYAq2sz0z9NW8VGlqsuSbQg QcsNqwq9nZELq08GNK4FlAG1QT949zLeS634+vkLoxZdjIGGRwtQdRxlDIP33hZFwkCa4EIFLxXh ysEJyl97C2cMWte6avqwYgy82ZsM52wFleDJPMy6oi+PZ38wpr X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen Subject: [PATCH v7 5/6] riscv: dts: add initial canmv-k230 and k230-evb dts Date: Sun, 7 Apr 2024 01:41:15 +0800 X-OQ-MSGID: <20240406174116.2945552-5-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_184758_894509_707CD21D X-CRM114-Status: GOOD ( 22.74 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add initial dts for CanMV-K230 and K230-EVB powered by Canaan Kendryte K230 SoC [1]. Some key consideration: - Only place BigCore which is 1.6GHz RV64GCBV The existence of cache coherence between the two cores remains unknown since they have dedicated L2 caches. And the factory SDK uses it for other OS by default. I don't know whether the two CPUs on K230 SoC can be used in one system. So only place BigCore here. Meanwhile, although docs from Canaan said 1.6GHz Core with Vector is CPU1, the CSR.MHARTID of this core is 0. - Support for "zba" "zbb" "zbc" "zbs" are tested by hand The user manual of C908 from T-Head does not document it specifically. It just said it supports B extension V1.0. [2] I have tested it by using this [3] which attempts to execute "add.uw", "andn", "clmulr", "bclr" and they doesn't traps on K230. But on JH7110, "clmulr" and "bclr" will trap. - Support for "zicbom" is tested by hand Have tested with some out-of-tree drivers from [4] that need DMA and they do not come to the dts currently. - Support for "zicboz" is tested by hand Have tested with my own bare mental M-Mode program [5] which tries to use zicboz to clear a 64B aligned block and got output[6] shows it supports zicboz. - Cache parameters are inferred from T-Head docs [2] and Canaan docs [1] L1i: 32KB, VIPT 4-Way set-associative, 64B Cacheline L1d: 32KB, VIPT 4-Way set-associative, 64B Cacheline L2: 256KB, PIPT 16-way set-associative, 64B Cacheline The numbers of cache sets are calculated from these parameters. - MMU only supports Sv39 The T-Head docs [2] say the C908 core can be configured to support Sv48 and Sv39 or only Sv39. On K230, I tried to write "riscv,sv48" on mmu-type in dts and boot the mainline kernel. However, it failed during the kernel probe and fell back to Sv39. I also tested it on M-Mode software, writing Sv48 to satp.mode will not trap but will leave the CSR unchanged. While writing Sv39, it will take effect. It shows that this CPU does not support Sv48. - Svpbmt and T-Head MAEE both supported T-Head C908 does support both Svpbmt and T-Head MAEE for page-based memory attributes and is controlled by BIT(21) on CSR.MXSTATUS. The Svpbmt is used here for mainline kernel support for K230. If the kernel wants to use Svpbmt, the M-Mode software should unset BIT(21) of CSR.MXSTATUS before entering the S-Mode kernel. Otherwise, the kernel will not boot, as 0 on T-Head MAEE is NonCachable Memory. Once the kernel switches from bare metal to Sv39, It will lose dirty cache line modifications that haven't been written back to the memory. [1] https://developer.canaan-creative.com/k230/dev/zh/00_hardware/K230_datasheet.html#chapter-1-introduction [2] https://occ-intl-prod.oss-ap-southeast-1.aliyuncs.com/resource//1699268369347/XuanTie-C908-UserManual.pdf [3] https://github.com/cyyself/rvb_test [4] https://github.com/cyyself/linux/tree/k230-mainline [5] https://github.com/cyyself/simple-sw-workbench/commit/32657d807d64217323a80cb04ce114671e51ed60 [6] https://gist.github.com/cyyself/aa98b07b8c77bb1d53b5a4c5e67a37cf Signed-off-by: Yangyu Chen --- arch/riscv/boot/dts/canaan/Makefile | 2 + arch/riscv/boot/dts/canaan/k230-canmv.dts | 24 ++++ arch/riscv/boot/dts/canaan/k230-evb.dts | 24 ++++ arch/riscv/boot/dts/canaan/k230.dtsi | 140 ++++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 arch/riscv/boot/dts/canaan/k230-canmv.dts create mode 100644 arch/riscv/boot/dts/canaan/k230-evb.dts create mode 100644 arch/riscv/boot/dts/canaan/k230.dtsi diff --git a/arch/riscv/boot/dts/canaan/Makefile b/arch/riscv/boot/dts/canaan/Makefile index 987d1f0c41f0..7d54ea5c6f3d 100644 --- a/arch/riscv/boot/dts/canaan/Makefile +++ b/arch/riscv/boot/dts/canaan/Makefile @@ -1,6 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_CANAAN) += canaan_kd233.dtb dtb-$(CONFIG_ARCH_CANAAN) += k210_generic.dtb +dtb-$(CONFIG_ARCH_CANAAN) += k230-canmv.dtb +dtb-$(CONFIG_ARCH_CANAAN) += k230-evb.dtb dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_bit.dtb dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_dock.dtb dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_go.dtb diff --git a/arch/riscv/boot/dts/canaan/k230-canmv.dts b/arch/riscv/boot/dts/canaan/k230-canmv.dts new file mode 100644 index 000000000000..9565915cead6 --- /dev/null +++ b/arch/riscv/boot/dts/canaan/k230-canmv.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2024 Yangyu Chen + */ + +#include "k230.dtsi" + +/ { + model = "Canaan CanMV-K230"; + compatible = "canaan,canmv-k230", "canaan,kendryte-k230"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + ddr: memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x20000000>; + }; +}; + +&uart0 { + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/canaan/k230-evb.dts b/arch/riscv/boot/dts/canaan/k230-evb.dts new file mode 100644 index 000000000000..f898b8e62368 --- /dev/null +++ b/arch/riscv/boot/dts/canaan/k230-evb.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2024 Yangyu Chen + */ + +#include "k230.dtsi" + +/ { + model = "Kendryte K230 EVB"; + compatible = "canaan,k230-usip-lp3-evb", "canaan,kendryte-k230"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + ddr: memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x20000000>; + }; +}; + +&uart0 { + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/canaan/k230.dtsi b/arch/riscv/boot/dts/canaan/k230.dtsi new file mode 100644 index 000000000000..75165fcbeceb --- /dev/null +++ b/arch/riscv/boot/dts/canaan/k230.dtsi @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2024 Yangyu Chen + */ + +#include + +/dts-v1/; +/ { + #address-cells = <2>; + #size-cells = <2>; + compatible = "canaan,kendryte-k230"; + + aliases { + serial0 = &uart0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = <27000000>; + + cpu@0 { + compatible = "thead,c908", "riscv"; + device_type = "cpu"; + reg = <0>; + riscv,isa = "rv64imafdcv_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zba", "zbb", + "zbc", "zbs", "zicbom", "zicbop", "zicboz", + "zicntr", "zicsr", "zifencei", "zihpm", "svpbmt"; + riscv,cbom-block-size = <64>; + d-cache-block-size = <64>; + d-cache-sets = <128>; + d-cache-size = <32768>; + i-cache-block-size = <64>; + i-cache-sets = <128>; + i-cache-size = <32768>; + next-level-cache = <&l2_cache>; + mmu-type = "riscv,sv39"; + + cpu0_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-block-size = <64>; + cache-level = <2>; + cache-size = <262144>; + cache-sets = <256>; + cache-unified; + }; + }; + + apb_clk: apb-clk-clock { + compatible = "fixed-clock"; + clock-frequency = <50000000>; + clock-output-names = "apb_clk"; + #clock-cells = <0>; + }; + + soc { + compatible = "simple-bus"; + interrupt-parent = <&plic>; + #address-cells = <2>; + #size-cells = <2>; + dma-noncoherent; + ranges; + + plic: interrupt-controller@f00000000 { + compatible = "canaan,k230-plic" ,"thead,c900-plic"; + reg = <0xf 0x00000000 0x0 0x04000000>; + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + riscv,ndev = <208>; + }; + + clint: timer@f04000000 { + compatible = "canaan,k230-clint", "thead,c900-clint"; + reg = <0xf 0x04000000 0x0 0x00010000>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>; + }; + + uart0: serial@91400000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x91400000 0x0 0x1000>; + clocks = <&apb_clk>; + interrupts = <16 IRQ_TYPE_LEVEL_HIGH>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + + uart1: serial@91401000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x91401000 0x0 0x1000>; + clocks = <&apb_clk>; + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + + uart2: serial@91402000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x91402000 0x0 0x1000>; + clocks = <&apb_clk>; + interrupts = <18 IRQ_TYPE_LEVEL_HIGH>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + + uart3: serial@91403000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x91403000 0x0 0x1000>; + clocks = <&apb_clk>; + interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + + uart4: serial@91404000 { + compatible = "snps,dw-apb-uart"; + reg = <0x0 0x91404000 0x0 0x1000>; + clocks = <&apb_clk>; + interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + }; +}; From patchwork Sat Apr 6 17:41:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619904 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 37A59CD1284 for ; Sat, 6 Apr 2024 17:41:58 +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:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sRjln73GQwZXS9BSL7/i+UI4gcLTfGi/vO+oFpXq+o4=; b=Z9Vv2rUCmPsKe5 gPUOwYG+WI1ZZqDPCqsqqS5xMU9m9IMrJQxADMkgjnDPi/BRxNWsHNtSXcQtVQPmsTqs3Ho61GMCs XjcoDS89TUVuiU9zJ9psVRnJpGPbQz335CrEXlVM1i+yjdLZlxHH/2i/5atGvSMs7bupF0vph+uaH lMB+pXTvTnKbaKNcj5TILRNX4AB4bdWVjlP4pYx58lIrKd0ypq9X3vkW6M1U5PjLclSNei9oD12aS 1qloYjjPpmWLaNqtAQKeyEB3acFVunOqsdI4GMSRY3Fi/AouGkjES3YeJXqGfJXPvK5iWESHW2KFt qeKY52XHgkqbrL25vxSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA39-0000000AlFV-1eWb; Sat, 06 Apr 2024 17:41:55 +0000 Received: from out162-62-57-210.mail.qq.com ([162.62.57.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtA35-0000000AlDP-2SyI for linux-riscv@lists.infradead.org; Sat, 06 Apr 2024 17:41:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712425297; bh=k2XCyj2HtiyDsP/ZIm+qg3j+A+CGArLiMKptqsaRcss=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OPp0GO/OSrZ7+0kQO1aEqmi1f12V1lFUGXRexsOnIpxrv32qS9M1eAHZc/XB3+Rdz tXI8pDp0GR1pbvyHZzCMDJlGdz5bJg8UqoM+H1Y72tuRbBS//cT2QaF9rManBQxnRp 9gfs4uOIfvg00b1V0dV2rRSI0Ar77FMpMaicSHp8= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id A56026E1; Sun, 07 Apr 2024 01:41:22 +0800 X-QQ-mid: xmsmtpt1712425295teaf0a4d1 Message-ID: X-QQ-XMAILINFO: N6qfSVgljG6XqlxMj7skvbga+PGj6Zo7gFDhnlKWcn/iwwH6S1Lz4gP2RmyHIa 35PLtiHfvZAvsW4Kfkc63oO14qE/Lh2S3w99Ck8ETqlntcQmzrB3FpkkXiNj8Wm5qp5bMzINIreb uJ4XTPHJlLxpAaIIvv4UuP+E1LGeWbFSIfZHDx3n9PYo1L+/Ssmq4jC9HH6whtPg71raZF3lu6pY GLAQZmH64Prhckrj4Ef53pAH0YfHjpOyaRfp0wNTSxdTrz4aV8Z4cLMW93imfYl2w/5A63c0+VRN 3AqrLyQIO49fmUiTrYFGGziFbq6OJhSMPNEMXlRv9gKSea10ay6TcbZwIxsmuTHSd1+UQj4YVGbc YU2vu1zBtkvlB6ufn1GKRC8HFbpi+lTv/iweY4+C3duJ/AFGHXjZnwR7ttB5PVJOFv2lOGwRmmDn cKrIMwUV+EYQZ+kSF8mB6BT4hQ7wFpWTTzFt/BgAS0JLOlaa3O7cJ4EjoZXquGYzWTfriRfexluP Kz9CF1WHVPsvJO20bFJJGjOs91Q5bQjD91gV2Dv8jqTn9y7+uQScFhwDSjo1E7COdg04w39Ui25T 9lH5ll26IAVOmrShVNdE2ClpShbNkikSCPa/6KAMToUP03MB045ZrR52ir2gkM11RhC36RC+KKuP 0y12avuwTfH8fmuD2jwnsFVFkgcLBinzB3MiRNJolOOC22pirxy+3o/btk+0dlNsWWg7IobLiKEa SPyRHYtySpiWhnVNXELPBT3ZJdMAMlqQjuW+6Y6tfW1EYrMzLTsYXaR3GajuQerhj7hWzAQkQrbC ynWcEZaxW/oSqCu7nuOjACVUJGFg/ExhOtL2ZfB8xQNyuQkKTQpruXwhKoAQ4B0pwHUIS1u6IS25 NzTs89PsTB7nA/v7bWwruuMO+JopFLVWZGVaadhBexCA7GueWNk3VRm3YMdLCBXN3xbhJ7XLr7KE GrgLYXY4FEl+hAvtCZIkTYz/65k6i2BEdg+yB0b/5BoLRQMLAeJqOeJnS+TQc8nIxbc4956w6d4U yLse9YDl189DI3zV7Ji9WUOIRSjZy0E1syTOsrJx3iHlDOCp7x X-QQ-XMRINFO: MPJ6Tf5t3I/ycC2BItcBVIA= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Dan Carpenter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Yangyu Chen , Conor Dooley Subject: [PATCH v7 6/6] riscv: config: enable ARCH_CANAAN in defconfig Date: Sun, 7 Apr 2024 01:41:16 +0800 X-OQ-MSGID: <20240406174116.2945552-6-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_104152_247982_7C394639 X-CRM114-Status: UNSURE ( 6.96 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Since K230 has been supported, allow ARCH_CANAAN to be selected to build dt and drivers for it in defconfig. Signed-off-by: Yangyu Chen Reviewed-by: Conor Dooley Reviewed-by: Guo Ren --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index fc0ec2ee13bc..27bea8296b9d 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -33,6 +33,7 @@ CONFIG_SOC_STARFIVE=y CONFIG_ARCH_SUNXI=y CONFIG_ARCH_THEAD=y CONFIG_SOC_VIRT=y +CONFIG_ARCH_CANAAN=y CONFIG_SMP=y CONFIG_HOTPLUG_CPU=y CONFIG_PM=y