From patchwork Sun Apr 7 01:29:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619967 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 A43C9CD1296 for ; Sun, 7 Apr 2024 01:30:12 +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=eEc+Md+7d+L2WY hS1FE4HlJg/7F/jLdRebeWvZzXrHgoJvJuacRNmGS8Gv25v7xRDFAYdHQdiNQ/AMekkxulDor8sGM 3Bb6PAeU8PAFBPcFCWwlwot53tGlH0t7Lq5T/NWfaydnlOiiIPD0du44bFL0kcoIhrKsoIwHGtoVX m7bvjaUH6GD2Zt5D9KgK9rfVda6xKh8y4uO4INwcuXy16K8NCtbywkCnxyhYKgyNVwWrkT4MDX7a9 ASwhjhNRvJ7+LgsihZZ7ljD4KZU4emBzHUR7Y+k/afX4NcmRTIbksNI7wrbE3dE9PHKvRM2FMYVmT HGGD5uhzoovQQCY6DB2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHME-0000000BOMv-0AC0; Sun, 07 Apr 2024 01:30:06 +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 1rtHMB-0000000BOLL-1Aec for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:30:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453396; bh=sxK2uMITViuWCRH/HETWDTh3a/M4c3Sxsj5q2qzVrG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OEl/t+Q8ci/I3GEBTNNo7XNE4f7jqj32soALjyFr3HysHL5YxPlLLVcdi2FzIWd92 fKJcedfwHu3iBcWAF3phOMEeRkl67nf3554KadTcEjuD6I4SZqqKlyHLflrOMLiGZG 656kObijfwGciNZ/zkRY+Tn4pkSka/FxeSjLdklI= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453392t19ym37jd Message-ID: X-QQ-XMAILINFO: Md0EpfRTqfgWnk8qoP/GWeCvf5JbI+UR1glwYtQp2wYl4oF+eAdbhgmeZPj2Vs AZSYTsAFl/LQybfYoLWNm8YHWjtljUmFsrEMiCJGaNsn7eEpSVsJNZAh04bNUKosr+3fr4mN7biM Xsi9hR/QJGf1YIOzT4Vx2US2VB7yWtIc9BmAud1OOVKUHpr3L5XbFWyirS/Qn4dBB5eXbkJ8Fe+m D98eUA/Cl9aneRyuzUlG/F0ftwstGbAoy3lximw3zNTt8tdrtsEDnsam9UF7pVq8oWYOn1T05ARX u+d7wiYu+7iMJnRquBpp5mMN9jnGTn3yhkiapls4I5/5s1SPmaq4UfYNJl/bUIfDT66fBM/+7Cw0 HpPixXA0RO1M0SWB7ynqBuHHNUO0hvzWY+qU3s6uPLpFBoegMZ5pJZUxtE7yVol1Z4qyJKikzQ3M VUaiSIHMAuqiC7jXVLGq/OgVFju5qfnKzxuT4+IMzHpBz5crSALapRbHjFt6CkISWbKizcR4qBbV gfANrIkJTOptYxGz5tkrAWQEutT5vX2TUY3AGEm1mhVhE9J6c6kOg9cVMwhm0uOZ8gfV8tdmy74J zVDzq8nUPNIy6be6XYD9uK4XAzUXk4+ZKhwNofsPdcPqhkt4TJxklvqZzinhAYQn10LbqhhrpYIS DI4drxrJpUrgpW5RbHzIZEoTQ1ci7RRpJO/2rIURbHiaWwa6vn5oPejEXWGPpuUXBjBUe2vtjkBA XqI7tiMcTzc4YjxD4b+kO7aMLM65yjyLBb7n3h9K/BsYY1tg5HKe1AeyQb6zapuwjy8apnSmBjmG cmAnB3nfPFsOfdYK7sZj5xPdjpcueUWvDVlmKvVg2kGdasx+T/ndKQL68Ly9Y4xKnIWN6cAVHHj8 8ZdedwQQLBb3Ws6/xG7F0+KatBF4kgiMNrLEo+fQDHvd/FOyBZbitl2KdjsKYVM+CV6ajjsYqxiH Rrjg/F0VK1d6jRjaM2sVHrXGP/dUtSfSMm0dzKRj1WIYI2sMCINEKKpFsq+9gMkdFkGrxSDWlfCv /LlmZfG6z8KWAk3jB7eYTnhlspwGTF05fYlIYOqw== X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= 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 v8 1/6] dt-bindings: riscv: Add T-HEAD C908 compatible Date: Sun, 7 Apr 2024 09:29:39 +0800 X-OQ-MSGID: <20240407012944.2996666-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_183003_648254_7D7BCC9A X-CRM114-Status: UNSURE ( 6.88 ) 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 Sun Apr 7 01:29:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619971 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 52B8EC67861 for ; Sun, 7 Apr 2024 01:36:49 +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=qSTCp9afM9KC39 Qb6Rn9/WVpyIamPOXzhMlhKqKKRTXi7f7rgbnxFjqcW9hckrsc8Gbf/y6jLg+10+t7lM9e06zWZhI 8o/jyyguU6HvOyPKzQpe7ijlclpAO7EQR5CSE9mgJiQrNO5ouWvbV9uRBxr6A59DBTUG/lPE7khQO 7WR2jhwZjMcKfg3gLNfiMMsiEEwS1QcTTyhY0jm5p99krnZ0RMAHgTEf8iijdc3OgYV0527RGMron k0dNFf2Ul+j/6e93fYs/0xbhFIf27LQYjeAXiaYzPvEacNtSimA9NGLA81EJrb122rRZBRF1xw4t1 KN54QrdlgFLdsAHMmSUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHSd-0000000BPMH-0pXo; Sun, 07 Apr 2024 01:36:43 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHSb-0000000BPLq-0g15 for linux-riscv@bombadil.infradead.org; Sun, 07 Apr 2024 01:36:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=kvuS7K0wl30nwl4M5zznAdLvDfFhfeZr9JFWkFZyoG8=; b=KSwAvCyafhHFDdqQPb8sPpj6D+ 9c7XSeO87+trCRp08gQrx7mqDRReIquCJ62DkVJAXqt3UFmFd0Z+xw1uLg3lwfTWqcnIqKgzRoo39 0wUr1pCRFU8ISSZxFZU8P//uSyBlBkxFJP7g7jS9Sy3Iv1JhW1rg+PCh5Jad6i0O8uzopoypkD0Y9 UhBg6yjiLJqWXcqb1nJU5vbkDIK+M7t0M5OLNPBZUjhcX1LwpLCb2x03g02fT1u2p/InHEwnQ+uAJ K+Uin1xvwuLrVR/wTrm80WYg9wfrlyAIhcAkHKe9PsI6Hl5gWIwu+tZVZ3FR6+Q+lBEAVJqEpE6P9 vDKdEQFw==; Received: from out162-62-58-216.mail.qq.com ([162.62.58.216]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHST-0000000E3Zk-0UXS for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:36:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453473; bh=kvuS7K0wl30nwl4M5zznAdLvDfFhfeZr9JFWkFZyoG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vUnZQTHBqXL3BuZFHqIynXdF1BuWJg6KEMlcNLpS0tTLGA2rgZfw8GbfvFMPv9Vlm 83hoN2mOeK+1g0VOabViJpKamHXIzz4eCqU4pGLjlJwzgysWD1J106NpASAPCKES/1 R/ks0Pn84pUuaNRKc72YR5s7d9D9B29fRr6HEEKU= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453395trm4eubz6 Message-ID: X-QQ-XMAILINFO: NY3HYYTs4gYSFCBfYc13/eaElaqxaU/zZaBpC8/2tdJerdp08rbG9SAKo7wX8+ ZpJy7dmKZeK8itvt96PfNdTrZ0EsAl12g6QmKAIVqVNAxxvzzN9GBc1uDkLyG0hUzOdodu90G251 o6nKbez5k1JG9BxCpslFhlFYz2ZgUFBRdHOi+jXkOFCADgPDSw7kCTpV9Ed7RLoY30MJN7oaXwXK eY4gBv6szGmNIfk9tRnEigVPZG8p9h+w1EyepNtBSjdHQrqOW14NtJmfiAb+H4w3zhcoXYlkSL5M /LD0FqLeVW1Lks5LhDeyadKGpKyY2K3QglqG8CLMv7ixi3865I4pfXJeMy8U5n+qTM5IRw2NWXEW 6xhvvR2FBi7o9FClm+nRD2bee/+NXTHnmi7VhEcAa/IrS7uayU3y0yN1lEGC7zDY+iNu0K+B+QPt tYiQUDY7P3sbdTgg8tJGTIqwLpr9GezC6Am7m79cSjqPafQdr6VMYOaiIPyZUTcIO3BmMzvd+4QQ hwVLP9K1slsUFvu2srC5mntSRK4VhnHgrxNPstsB8Y9VsTl2zOmB3uOc9HJOwbU0So3xNlCo7Wj4 e3/gfe5b3Hk40YC6s4LpluQLHZ+0a+lDwLq4c1P9quEa89vZLfkOFiRo84vLDNb4AlspqQP5iukz TWpa1cbkhhW+uLYLki2O+YF+M9NFJzb5y0685oucR0k3WMkDNPXQRk7JN33f7Af+7niMOMBd4WAG mPtBDwDNsgSzBoH7jizsRcS1wGrb9+n2OqYZ72DdCIEGHvo6+0QF7we1fXqCnmYDZeLij+r7URQG 35CmRKy6Geqv4lFp0//CLm0czF8O6IRdEuC5FHrMHzqVaLhh89TxFIJ0yEdlL7xsn6pPRRZK8quV 2iKneJRgOBU1eY4hVT5GNivRLB486o5+Md4r6uO+w6gRoAYq/yQG4XI3KsIrrinDkVbKUux9fwP6 qfKikbDy9R6bH6DQxuf9Cp7P+KrwoKEFIwV0IayPo5Y4nbsOpB0bpDEEffBR49fDrdiArEnNzfIf vJYBAtLX5vLyXwD4Qi X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= 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 v8 2/6] dt-bindings: add Canaan K230 boards compatible strings Date: Sun, 7 Apr 2024 09:29:40 +0800 X-OQ-MSGID: <20240407012944.2996666-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-20240407_023634_406016_8C5C0334 X-CRM114-Status: UNSURE ( 8.14 ) 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 Sun Apr 7 01:29:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619966 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 9D1A4CD1284 for ; Sun, 7 Apr 2024 01:30: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=A7ZcxgJMDEcF1ZtQwhuXye85QbL0opjF40NY4HDWyWA=; b=BSdp0PpsH61fjz HOeBaGuMu227XUbzi233bi/XpxI5PjFHsXo5C+BTWMBlc5rxqqt40yuGFoiH6c77TEBUw1+PZHGTh buluYh1IEjICni+neyf1MLoeLhxw3yARNQ0CHhsffZbcDj/42YdHEpcemYPUNX+FyhqF1NNCYWRJo I7+iY7P/WOY1jvVRyTzmQoxEe3m89Ub00F6MzKsxcGulOv618zMf5hbfp2hktCkD5ifF+sJ6+fmJX Fy/ZZXThD5f55G+ZNwwD02bZF+2lZwLXAEzN+jB2Cowq3b61bqCU7sXYgeurM5/5gZjj3MyiNIFSq Y2FWZBLLjxOIozHNUsVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMF-0000000BONX-3LV9; Sun, 07 Apr 2024 01:30:07 +0000 Received: from out203-205-251-60.mail.qq.com ([203.205.251.60]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMC-0000000BOLJ-1PeM for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:30:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453400; bh=rcU9GmGkfYObnRvy+6sIXXI4nFg1KITAK23jcYZUxzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cczAhbesSdLhfdmtjEsvjJSBEosBfKVVF3k6rT5FTncar7kNIC8QoU2wSy/W/qO26 HbfLZs7BopEx4jn6Rhi0B04kgT+GShlAwVUHXIz+Dbgj+egCPxMDCbZeHyYyDt9sfj EO70nr+20iCGvotnN4JNfocNxPQhWIKr8K43jbME= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453397tvn39vr8c Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeie4AIX3n0T6n1gmCVIQK/LewveaTQKQp3z+c3jhqvprV+9XRHqVy sv9RGYfQPWhm8EdMBExygLre3yNlJbBcYeOiz2gTaA5/5OYPM5qI8udQdKRcEbgBl17JKqzXsPlB 7BeZvWEp9abKkACq0jo1XdqG6uM1YJr9qmcxRD0upWBrsqvhTO6YcWTxPq3i9y4CVh2ikPQLLYH3 pmdUO0Sc5wdzVHI7F7wy7g7CKGaFbwlcvy30IqFn39ZLDwKDjBzpZxTq5YseDq9HPAXUHNytK+DE NQfQCrVLu4Txbv6BZD0YJU83iG8KGH8zAfNz4tAyce+Nfn0D+T7HmzPSGDtNYwoM6tG73ZEdQELP 0Qdl6JCfbl0TGpJ4hPvCBSWqhUsa1icD5dxOZSYOE5PswDUSnx4YgAV9E3NjofXDv5c4ZC7oDQLG n2VflqKiZIbfErJUaC9oQ7rk8pVtv1jfJEfoVFJFhZacEHjmCUyN2hCdcM7J/oSqtkpnaDbH6i9/ 67bjmPGa9DwmuPuKXhpQUamTGjf6AQcmYyQm9c1boUD+Yp8r+z14hgsorJl9wI7ifBPW5I26f4Uv Oyne0RGMHRM9mQyLMP+I8X1b+W9Pv6ooiskh/rjpGsFIw3LGNzQi+xYjKs5SEWiFbzGa/oWG9ERm Mgg+HF1uxBbkNjrwpl6ia7jTjD5apBuEIV0Z0t3l20l+YfqqF58plACd3CcnZftyjVbVRb8XjncI FUmmN14fK2+DxWbO/XsgvqeQNcXziOJy6sPu5EGZHIEM9XMsyNzRs3yapa0LNZkGcNyyeM+xmUKt hmqDVLcP4GuNJhJci5buKs81m7h5rbLuk0MjDceFsTXTSEuJt1wkgVtLHKbx8SAP45Ty06EubRrD 1g2JiDiHyXAys510xEUYzC7r7cWu6DhiUgKkMoLfT6EWLaF/RKcbHpuAY7lU1maROIeL/m9G71ur 6093O2gYs801BYUmGu+KEYavUpf1e9EhdtWbGxLUfffjUIxA11cr2JW6+6F1PIsV+29FCaNRsCcw VjicLySF2wXpBRDSHMG5cz0ruzwu6S+wh4MYYXRqjBgPi741+thXiETooWt/gv+CgkFNJcqfhh0K 2QsZEfZNUvq6R1lgQ= 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 v8 3/6] dt-bindings: timer: Add Canaan K230 CLINT Date: Sun, 7 Apr 2024 09:29:41 +0800 X-OQ-MSGID: <20240407012944.2996666-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_183004_710393_5E3C3551 X-CRM114-Status: UNSURE ( 6.69 ) 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 Sun Apr 7 01:29:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619968 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 EA02AC67861 for ; Sun, 7 Apr 2024 01:30:13 +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=bcLzqliWaqQiOT rXA2KW4yxb7t3vb1MzXhhbUPEyNVUTlW/SWJZTLYnjXif2euIa0sJ8B+aTqO1+iTDhHd/Jq10O5AQ taFOJD+fAoAOiaiU48vcQwjc81yH5znAUq+yUC98VpBGJ6jVhTcnsqCcs+J/9FW+QNj4XmOjXy4eQ mY3mVMTFUpWMFqwTu4ji81/ewdMYPjcZKFBwugRJNFi94f+LWQouHIX7UL1gwXM7bBVyTdbU5jb7A Kth5rP37A2Od4tIxR33Tr8n6ehg/N41h549Lc3zfbSfNV85RblhPvJ3lo8DMGzgVSbL2AQZcRO6av dlJi9pJbensAE/iZXxqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMG-0000000BOOC-3LiN; Sun, 07 Apr 2024 01:30:08 +0000 Received: from out203-205-251-82.mail.qq.com ([203.205.251.82]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMD-0000000BOLn-0Fh6 for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:30:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453402; bh=jaM56XVEDkeOpfko2CLF+2oPCWKBzRPYG5Ofw5dlTQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fm5Z+LWLW1LB0gM240l610qyG2rr3xWfcX5QQtI/Ie8ZQ71gsbCwHRchIJOOmcM1r SBXdKcfCGk7YPpViDnXTPdg3UEi2YIHgRASrGo3oOUwjy/0S7CismQpaHMKXU6cfNT /M8GMrFFXMDjomsRUmur88Qf8qT3OrRIACQ+C2kA= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453399tsd3q6wi1 Message-ID: X-QQ-XMAILINFO: No84gL0ijbqcWM57GT/1QME/lzlrWLQeu/s7M3RlS+CTR6sI54JpPOhYrgNPdg wDZgknVmt0FGcwoGmu7Wb0s12qrzo2WdNNwpIKKW/KqasLipQyU1dV1OL1fye/As7Q4h2XeUnSU9 L+6L8WaX7ggRsHvav5Xyh8SNzwgIbQSztwbo/g9BR/Np+cZ/feRS1EHoTxK9W8DcU2ihWjRG8Bk0 3i0FYobGZBurUeUMv28aCpHYDTOXxUPg8CzDREmLWZyOYpjswul7qK+9jfxLsn7YQJQatx6xd4Bk 5GetmZPNvTnpMxyHeHqoZAAX70KhSmYQUGU0Tinw2pmQBc/gRDfdX8FcmG048Aq0URhi5NVesYvR Lwz9yLSkX/AB1rAkAnnPM5fVph9mCIiw6U8ouM0093O55C1foT9R9iu7dAAAfA2V5eoOI0ooWN3v GvnJ2nvXE7cmVdFww4Rar6lduEIHZWBfSkZFk+dA3zFpNsEtvQSqTylhg5Z65iMQnI1TKrwXKV+p ik8SC5+bxx96ETGdIPcU+O+bCGjh1aMIhiymzswRoeyEpjairaA+RhUSM6dlMtrNXRxfGQJDJwib KAle10t42MU9d6HNf+RQkAsW82CkWyEfwCgS+MHojPZjYFhHLxzpsFNrE5qiBPsMUrQoZdiVMbXW RYxDhtPKI8XSZFEdo0Vo2/6Qc+XV3SWnSv3CfPuOwFsuGb87uisAelWAGUt+vG2TqgTO6UTqMdad tQwyJoVVTfOV+5mi2X3W999gQXPxjIJY/QdLHeSmk13tZo9zRLKN3MUKpIUGQPqAW4CPKLHhNC9h jQEA5RekfpH7ANhR+ZWzqnEgM9/HRD94u6ErKiNSOy+lvbRdH6ia2GOrzWw8MZW6TrntJM7k/uh1 YssajKAc84xZJa7j5iKzeMM87ncOGEMTVAEHJp0OUwLM6+OnqRVlYgJhsV2/L/bhAoIn2hAFomls JnWpWyKrL7J2x64LHMkGA6TnpZ1K2Io19BCnwkGxx6sVopl4WJUxbGCorzCDnAjYD6NYyNsKTcAI EfHQb1ctX9VfnpiJMRslRLiwhrCCg= X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= 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 v8 4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC Date: Sun, 7 Apr 2024 09:29:42 +0800 X-OQ-MSGID: <20240407012944.2996666-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_183005_439375_842C6D05 X-CRM114-Status: UNSURE ( 6.69 ) 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 Sun Apr 7 01:29:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619970 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 823BECD1284 for ; Sun, 7 Apr 2024 01:30:17 +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=dADL81KJwdetsBsFjr3Hmt4XOlaZZocn6akuQ4RxVmo=; b=wfDA0yT6GqW1rM X8XSHT3Zvhm5pDKHRbLOecYzkOI/K824650RDZIa4MOFXbKB11816m8lym/o2/FxdmC7Bcf8l/gxu 6a9guzrhZrRtdhQifPyIgqwHjxwMFwUaRKkOtq/aVROJ9pMRFXazTviWe+rQvv0uuWlZrg0zMXZD+ EZiUfk+IKLHeH1dVCpA4C494MiumxLhmfkGE8HeQLYfRAg1PteutJdtlGl7fHp3MIUZ0EmLGfHYGN X/GOFmCKbMH2v2TWuJOsGtf5gU55+z5YP3WgwLLcC3Ute8wBevVc/aS4vvwWYb0laftD4HCLxmvAg zrc6dreGTFDRsIa1CkFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMJ-0000000BOQJ-3dw1; Sun, 07 Apr 2024 01:30:11 +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 1rtHMG-0000000BON2-0oYh for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:30:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453404; bh=9oqU6VEHh8jBFFwTptwV+5ypJiPWZBgEpxz6YMVsWGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rz7ontIl0+py/Ih7saNo6u69RUzXFPSkpwgMcKrebY+fVpJlTJd0yLIFyPcatfn+V obLtKHlgNkev/1IeXwUhi+8Da2JFlIkpyQZ89y9mBWS7fZkCv88kL/vFTMEXFiaVdt NKP9hhKD7mhAJEt1QwUSNbcuo+fITeVO9jclaMUk= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453401tnvu9pu78 Message-ID: X-QQ-XMAILINFO: NBOcPERDMH3ATP86RoJ0eiigWldsy1UtTtYHsz/PiHnDL0euTNJ/L5/JYUpOb+ ff/YnsKDi2AEsYNU8eYYH8IzHbvF9mRYbgkcUN0tvAmEAgK1O/7QR3xzkbzcBDvXN7wDgHTcH7EH IQ6DR/lREdd49GnJVzF6pJ/ZNTgT7DcNKN3kWxav9EeCJ+/hfJ2sKkAaIjU2uHHVgMNRo2cBZNwO Gqa5xtTDI8uTaSoS2ESw1fvxtrKzxeWrg8+tQXhgnopmY1Rawa/Xli4mLiGr1E3JyOjc7FwD/jud j+hIVvXxQ6cdPRaNWhqp7pIwptlm+fxA0HyriXNlBeMJSMC3ZQjC8qiJsayC/cU6L0Cgw2hRas+A V361UnbyRCyo3QBErjfHFjBSwtC8yegz+7Shgx9T+mOvGT0J4OWmovSLl8021CR3XgnMZ8j905Mx DaGneYPl7OxCgWeZKgObLAWrfy1VxjK+w56uM/a05FpHbBw6BkD8TYYBLNm5btzL/i8Og8XUG8Fl 3LW0li+9Ezg42AuxJdEoOdhd2NEe1Vsdusc81b20MZNhztkOaGA6BlWsBNQfidZ+WQ3ge19CarYq PoDvAka0itCJuxG382crB95iChen/0/WK05ZCf3aICdx4ANeleYC+eahGqAURirFftaolAM45zr4 GGOFv5pOObTHdoFj9weeHRrlsccdvuzXl57QBMA4ipu6r+O7EZDtoCqH77t9f5th+qF6USkvARF+ /TaWljkRBQKWW546zrLq1wpmQ04fEdSllR3VeJQIV0COhqaxdUy3AXyViEkNqy9Ywq/odYAlaUqf sIK3y38zOdk9XuhLn+VOKbHnaTcvF8+P7+4tLd1U2WONpA3cEHPN0tlx60GtYetVJMtBX74HQibG Pqj/1pNvdRSvWKBkBgmhcM9OqhdVa/Pluu2xxXyoHEXeW67QBdZWX7+sjXh+kb3SV3mKCx4vlzSO r7ajkLZ2mNrW3JXBYkMG6O313Pmh824131S/4uc6xkOJrG8PwSkWsYSlxVDPbPMGcE9s7aZ9Knm7 hxOjAQU3BZjj5mneYZVZugMfGiFpHqWIznZn5no4kT5g50wONz/O8dB+gMcwg= 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 Subject: [PATCH v8 5/6] riscv: dts: add initial canmv-k230 and k230-evb dts Date: Sun, 7 Apr 2024 09:29:43 +0800 X-OQ-MSGID: <20240407012944.2996666-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_183008_589644_C0E9D551 X-CRM114-Status: GOOD ( 22.71 ) 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 | 142 ++++++++++++++++++++++ 4 files changed, 192 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..95c1a3d8fb11 --- /dev/null +++ b/arch/riscv/boot/dts/canaan/k230.dtsi @@ -0,0 +1,142 @@ +// 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>; + riscv,cbop-block-size = <64>; + riscv,cboz-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 Sun Apr 7 01:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13619969 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 28102C67861 for ; Sun, 7 Apr 2024 01:30:17 +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=TEb8jVsFHhxxTH D9E+a0TJoQ4Gd69s7+/gplkN0RiHW0bF3XggqI6fwRO1Gi5o2AovPRejtymxHmP4a6Gyb1n65SaId sv8eactxTrDqamG7tRapR3zgJG8JYEg7LMKffUHC+RBnrhp1dVta/rI7c9xUnMG6/jjBQsqk4sNOL Fq/4j7gnJhbxDrSWA8QJ6Y4hOQtoQ2U/x2Ftb4wzo4FmDoJW7uqPDGNg0iiysu+mpVT+XreiXWEdy 2d2DNVbSRULYZq/7Vsa9XmBO5PHX2tMOEvfxTrFM9cNg0lrR17ju5Swam3lgh0/SaBmeIUD5roCd1 K0a2SrilLjayFH2Av0Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHML-0000000BORa-49ii; Sun, 07 Apr 2024 01:30:13 +0000 Received: from out203-205-251-66.mail.qq.com ([203.205.251.66]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtHMI-0000000BONU-0JT1 for linux-riscv@lists.infradead.org; Sun, 07 Apr 2024 01:30:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1712453406; bh=k2XCyj2HtiyDsP/ZIm+qg3j+A+CGArLiMKptqsaRcss=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VtEQsyCODR6e+Ddzh4wdo6K/aNoruU/AKSvhR6XoyCoPne/TfL/BhISeGYfEkpzCE 5/Nvq3haZesHTz2NUkpaghL48P5XARbgk/xbHqm3P+/Sm5WpOCvlQ/XC3XMW5bZ2/T I4KZce247GWFQkClqQ23eRmPd1y55aYgqGedD5nA= Received: from cyy-pc.lan ([240e:379:225a:6d00:f878:7a6f:5832:7f4d]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 7741FE3D; Sun, 07 Apr 2024 09:29:52 +0800 X-QQ-mid: xmsmtpt1712453403t3v0hfvf4 Message-ID: X-QQ-XMAILINFO: MdoRYM9mYrydIhPjf7JInuTgACUHdYElYYGn3GRcfJmO7aFfX4w5G4IPROs3BI JK70PSrlPcq9O5TLjenzytJ0+LdME0gIpps4hDpbeqreTLLahDZj50XqR7HF2mIa0wdf0dNuk/G0 tN9rQUzIeiO92zIE6Xrr0eqgkU+IGTuVpNlcwHi8wGBk3nFNOfGmOTqm3s2PHb+MRE8Eemvf1+cm iZzMlQRNRCFrKF11gF6TWZ3Mh5QYfHcF938HtZJM9FAtIWAdAxPtRe1O2ZuVdcdUBa/CCBs7E9zU NOxhAHw3Vv6YrO/f3Hiobwb8rqiKBIC8mNSNt7yqOBPjHHcERAGo474DqWYgPsAPKuag8MQ0eODs tnbqVDNrKh6dv23HISE7t+sdXjsPiMH5R7AggN8QHVMX+n9oVS5GDC8pLcGCxmDCa5iEZzmcnyIl zF1iPOyEKAFSxrFxgK3/VbJ85GrwkFtNQJxtakOvTNBK6Ago+/xv5mO65Qcq0SMC2LKy6McEGxoV zJyuPyKdyMAPN5R7Xv24zWQ+GVKNwOjyu6c5aZy/w8+YIa3I63AltOtjiDEomUebNiHvGx/bPyMM fd2hv2p7r9R/ydLz2dL99X0+xaGF+GbAHmywox/ylniQOe7OJav1kDsxA8qZNujlkkxHsg75X2Eq 9Wgw7iG8wtgbkXUUuGY0ux5voOWsWTBYONJYLcdV5jhhYDx9D2SDIf0qlEaasz68Gu/2LY0xF3Wq Xtf7u2gG8DfoiReDRFe4XycfP9y/zPpmpPRE+qbIVmhDepE9dKVosDl/9yYP1F96c+Tevnkmq23B rHtQ+ki0QnWjRhotLWaKhse8MXwu7C2CrKOzbhMKDmwVLA9wh4JondMQdp+QWASMUtboQi1KhR1U r8+KX8+VQlwbygOKBJiBRyEwnItjBk1Ch05BWhw0hnmPzOyNOX1zoiBUNQ785hd1VihvR9/veCil cNUim+P6mcbjgEzzjhck3BaGYFf6PKPlKcpptKOiULFL+1kaYqLkkkNgLh4GqoSoDH+HNMUJJtBe RDu3qA3iTSQsDuG8O6svI3eorR4tQWi/0rdLf6irjjVQL4myLYq0BfaRDCg6k= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= 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 v8 6/6] riscv: config: enable ARCH_CANAAN in defconfig Date: Sun, 7 Apr 2024 09:29:44 +0800 X-OQ-MSGID: <20240407012944.2996666-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_183010_442533_0E5DFB3A X-CRM114-Status: UNSURE ( 7.06 ) 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