From patchwork Sat Mar 23 12:12: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: 13600615 X-Patchwork-Delegate: mail@conchuod.ie 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 C87D0CD11DD for ; Sat, 23 Mar 2024 12:13:04 +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=W82Cj38OmzPqDpetKcV9bENAhJftZpwLGN9dxKUMRws=; b=41Fcv4cKZnojQb uwVNCmuaYqEenyp+QzW26IVzH23ARq5btRuV78Cq/sApaoxz0dhYEBr8rvR7jozoYjZ8UA3X3+ikP 1DrNNwVn3t5OE806/GXutgOWZkKIlCFwh9/kYjSNeyojvCBbpwuLB07ngmQ9jfrSZ5P6CkNOLviEp SbL55+MpXzmtsg/AN5M2sTQkfF7kQ8z8Cu5QltFoLHyr0i1taKlZiYB8Bc9ZCKR5VNnCl4NinqKyl jsqw94DiRsvwggVoezAT2lIGg8xtMclXrkOfCO/4kxvkdrLh3g+DGXFOQhmGo9CYcIu4wmLaFu3rI io+n5fuykb0wqWqHOgFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FB-0000000AKeb-2CWb; Sat, 23 Mar 2024 12:13:01 +0000 Received: from out203-205-221-221.mail.qq.com ([203.205.221.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0F6-0000000AKb6-2ViC for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:12:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195962; bh=GtPTI8Yys2Opga/0sm4OTBYHCoOZG/cPKGGmNpGSVMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d7a0vtx+YFst6K5J4oakR5Lv7q5OUjaQFSsPtt4J0C9ki4JHAA+FtIW+bEAG+qkjx OQwS4t19DljgI2zTLuqvk9jvt1f6hcrTTOkyeLAPoSCRQr0s3CgD2cGAAsvzdIQpVd kj6IElAGQfXzD383uQiOiMJYWXHOEBKf4mnNw0g0= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195957telpxi4j1 Message-ID: X-QQ-XMAILINFO: MmpliBmRb3iCDSzsEAV2QCRQjRAFk9o+8r9VM5Zg5peC8KBDAe+tCwfmZFuFs3 87mjOAZQ3JWiRJZuNzVyBHTZW1AvYFLpr3X4rBcZHJWGRvkfTYELoIH1xgHhnfxZaik2cQpnYTYI h0GCf4o71ynN1usGBQncedropdAUfM3bpUiAqRIGbmVwyIEs9TUqw3ntmq6qEY/he29XKcpTXoTx kx0V1AyxX4eu5o/v2mD+OrtNXjgXg+b0acKFZuZ7Vpdg990NT+Qx5CSX8XVPhcrmRtulwk2xov0N E6MSuRc5ftBB542NefvPqhbxOyjg17N8RELxE8PudXbyYzVr4niRul17KFLT8zX6zIzfmfbAUBRo WDca6iiyZzxPGcs8AnbhCOQPKJPLGi4FKPQ7EI5fCy0tIR4oC6krBumeAJ8I7GRzTJNwQKtWa7rS gpwCHoSlfZrvyA4Fj+UBJt57Nn2LcR2vP9JT5qjMsg06LSUA21xjX/Q4A1KWHLCfuSdaVy3EL0Xn lZTaI5DRjy74neDRw2nM+PycPmy3MnaS42sfdrDoQeyS5tsBeUnUgVNDr1DKL5ok8Csu5vntkvuG I1IrTfO6OPoy9buA8Yd4z89YgT5yOvZxqMpoqtgrYdbaDykOIRczdu5yQQRUglj5KRqEUhLkEu3A MDiRJ2IoQTAHKZv3IlSzEXUTPZoesnawQQlelDmsjRbHprA8baXz+vPGA20A2znf80XL65Conmnu LarJRSjVfndi5X518LGk5C8PcPNTkHJgniD0JMQ9CiYlL18tKsL5Z6d2VL46l+jpLXHdcK9Xk19H e0V+nAPi/598WfDVpw9qgGQClPSRRo9nCLrmp6gp9wyKmA6NIKeZEu+Ah0tHaZmd+gSgwI2pSWKI djFNfAzNssZK0JaSi0c1Pyd+zpUNdMp9ZMBsRa7FmkdIqiOIGc8FOZEJHWA+KvzdZewLBW5ZN4xZ s8XzeHPuKCRdjo3mHBkQre8IVOmW4w9FLh7v/4vXUy1y/ED7mg9v7jTCr7Kg3CEmwmG/9M1I3fsH su2u152ZYCjkVsRJddiuCDpuWzwZY= X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen , Conor Dooley Subject: [PATCH v6 01/11] dt-bindings: riscv: Add T-HEAD C908 compatible Date: Sat, 23 Mar 2024 20:12:13 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051257_048163_1FC57E13 X-CRM114-Status: UNSURE ( 7.27 ) 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 b252c3966b8b..02f939449e54 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 Mar 23 12:12: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: 13600614 X-Patchwork-Delegate: mail@conchuod.ie 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 050AACD11DB for ; Sat, 23 Mar 2024 12:13:03 +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=dK/sjMe8kuv5Dk 5pgAViDlOmhg8li84ZS25kr8xSLDto1rmywLCkGMQ0b50RgqScim2NnYQu0cPuBmgV465x3X2va+b T7+oEqssd4ny8B22fTcEAU1qNoyHla91KH2xDFcg30CIc4/bHJ+HNaIQkQKLWOLSBxr0f9VhGUYR3 8nqhq+LYG5vri4EJMpsibAaPp4H5ndywcgYyC5jOL5HfXtSUwN2Wr8pQm5/tuMgeuJYR+AZKQ+k5u sHU7khFrHWDSa/EzD3XnAl6E5GAVHu+SHNW1avcOJD3VC5v/XjOCzarRjLEM2syzVij2CKRhy72gt 0FanEWSboIjiBe2nhycg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FA-0000000AKdl-1933; Sat, 23 Mar 2024 12:13:00 +0000 Received: from out203-205-221-221.mail.qq.com ([203.205.221.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0F6-0000000AKbN-2NV2 for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:12:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195965; bh=kvuS7K0wl30nwl4M5zznAdLvDfFhfeZr9JFWkFZyoG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UAwxZfTOnsMlrE0TydZIYo2U64LS6Whupe6SfLEEtEOlbmXjOxygdcxmK5wZ3cK2d 6Lltbx/BQLihIpvr/9ZN3RZMuh073rTY2wnl/VThwTXbxaCnHKCo0edtWmjS62xRXi jRgecDXEwuLgJFvQOFB3kbkqXaDYI3HvwOSA/m4c= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195961tqo3gwp33 Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeie4AIX3n0T6n2lu58j6vXgROfiC092HgAEm8RRTXfZaJpCzJ9OiY 2B7IOHvEe5F7TNPSPasm4NV1ylAM/5PTbvvLAZQKWxONeUuasKlNFaqFniXuJbAmXfkNXgjS/ZZz OimQYeLT+dYTxJ/EIkojZeoS5ivI/d+OxLzQopg9DxHHf+IN7/cTQJpD+3CZltaKO7K5AwOZdGmj CTKTJpKvbSugjXBsYoaxWNZpMv6VSspUOXTfnHfMND5W0cK5AUxRKRqj2/TNcEsLefe2TXaaW1pt zmTyQ3GyRo3XCgpuYMhQZisBFfPtlx6QOh9MrH5l0C6v7GMjX/NEbBVh5WCqQ09sg/nHeOWxP3hp oqiNSgxKNddrjrUy9zMTtwdE90mvNvHK3g3DLtqIjRaAy4cOddiEZHdnQh29hrvnM2K2PKJrm3rf fRegbfQZYzl4O3N4Rb1fOimJxgnMEX8Is7NVK55JzYR5gd7rZqYVVeFV2t+xDmzcEPNcjiDawpyr 06xovEC5i6TYjxdMVYVsfRhqeQhRoK5zo+1KLniy2UI8tkKk8Upn5pnf+Da2N6jaltb3U1IogbsY 6km1CBdbtyJo4K7ewGF9kP8deREHeoMrJfmzQU+P2l5rxMU6Hy5Wcm3uhbJLZ9+hcIRZOTlaNpy4 b5OSShNl/P9PnZ8OJ1bA4/ZdCfdafoRZm4hKXEHYB9wSOhhDG4lUGuz+z5iJrCUrfBzs+U5xXmdd XfI4GM3/nbRaHBcY18Ker+tzMJBTS/xwJ8VlSUAf9SoBc17iguf0PwElOK08rNH1zl71NRvzS40B //uBduVqBx9JYSwCGlngR1wy/RQ+UQPH+rllMv+eByNiD3+9uFQF3EQJj47SG3QN3EIpxDI3OAMY BAXG83xCcSc2tvgPdGWJWN86nWFZxBrjYEPwYLC7aYJfkuuvz4oDznP27HGQ5Ej6YjfQoBpPYg4U HBkgRnDB1ylFphWhvEeQBAXLY8VezRIeDWfL+plC8WkZQjZK7wBnOG/BNoLzjTOUPTNpLDf8df8P 5lIPm+YKySKuJyNLDV X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen , Krzysztof Kozlowski Subject: [PATCH v6 02/11] dt-bindings: add Canaan K230 boards compatible strings Date: Sat, 23 Mar 2024 20:12:14 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051256_960996_8CD0FDD4 X-CRM114-Status: UNSURE ( 9.63 ) 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 Mar 23 12:12: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: 13600613 X-Patchwork-Delegate: mail@conchuod.ie 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 892C7C54E58 for ; Sat, 23 Mar 2024 12:13:03 +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=XFzEqGPzo/ceok nX5OOfVVdOYj1ZpqUPM2pusTGrNSU3YyZ1UAAKEWdGdCawE5k6A4R6E0OkQQz0OadfPz6rGbu8GoB I8DUYtSfCRxNB2wnSczuMR/CRU/KOuJcW6fInX5vHeViOOn1uzIsPGDoHUaby1hf7SemT6r9AWiXo i8xyP2Le8h7YP5QciPfyBsUDpw/rDKe05Z3XosdHAjk9FCmJ2SFbXJhjfgOUTsKinehfUohEVWsIa lhbFYw+weDqAYbh0Mc1/dIqXCnOKjrkj4MfiCVCrF4EZOfSuHE/CccMNb6S6F/gHYAD9XtqNM6Xzv pfJ8jJvtJFY+pz6nMPBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0F8-0000000AKcx-2RKE; Sat, 23 Mar 2024 12:12:58 +0000 Received: from out203-205-221-233.mail.qq.com ([203.205.221.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0F5-0000000AKb5-03Of for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:12:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195967; bh=rcU9GmGkfYObnRvy+6sIXXI4nFg1KITAK23jcYZUxzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=upNpY1qVU9E881cMsUqmNFhtpMVIzGT5sbW6liaSbvAbFCDUTz5hRpZzKYPUwolaz U0LqrL11TJofbymw0ovMkhodQrp5Q7D6ZGDx9ha6nKo5ffbALzfETU/gp4f1vCFc4r 9ByU/kyaKswTp/c/WNcxQkO7Q7zaPyS8xgVm91Vw= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195964t53j80xve Message-ID: X-QQ-XMAILINFO: NQR8mRxMnur94KfB+7w3r13yNMBf1WJ7kj32mtd7jCEliNb7/euZWq5fEPspM/ 7TdDQRfBiBNk9WayPerDVe2Hmu/scyD0G2qiwwJjiKgfIryT91tvfSHEfpzY02Foj3/4Q1Xt2oP1 xPyqUfsYilHzBhwJ3iXI3rJdNfO3AybJ8f6L4nqoBokQj2esnVr4/rtc0C1kwbqXfXELl4POVOpy Whfci+FqD4C0FfMK24Ngm674JLXuxd7YD8M5C0zsndswPzr+HPU7vxhI6+Mldg42t1RArrZHapqX 21hk4R+0cDdFNBa5tAh4LZgPVvbRw3RIiQ6HvOmP7bbEwGCst1noIA63vjX5lJE892Ac2Yrz/hta FgHsIkGgEqdJO8JD/nLus+uN2HlQiLk/9ISlQS2NTw3EEN8JDGcwDZT9gf7vmdiMWD30OeSigLsA a3wVS9Paf/EDjVj2MbVXQ0/P/nU6XDpQ9/fXkUBfOUYcZzshR9Xy5gLSiT3Q3uNF780qaKzxikDZ 26u0GyxTqZeAxr8idi9Y/pmNaKhAQlSRrjvwIEXGADSrtZ87OxMe+4KoCHWEQU7lk2ealsV1xoed dYOl7eFHw8YQfC+TGQTA5Clf4sOEZexhANKhSCL1QC/Gd3XSxtHeWY4rdrxDFTk4I2pxWcg7rBLn yFcumffRcVdPggT4amgdA6/QPQhBkvLH9bjbngW6HyPh/BKAVmaCkNqphIbYdZkxAQpY2dsYfWJ9 Pf44XsB3PrFh186BMZ7sL/mRLJrLq+bO6oaMgT1Aby2Xt3nWch8aVyF+fEBjuKEqTkHc+aGIDxnH dtKqOSMN1oPs0JXs1gqOdyjsVJJZqOWdLI2fqkAazCWBXQkEVUBb8vR7WnbO3fU+0YYawyO0g2Qk ZMhYxyhGA//ynLtCnC+wSFW8d3+LXejtMcyosUVjUKxem2K+r1S5EfzQ1ubnIOK/QG5AhNVYZ/h8 MzLp3LrrVAzvAhznNkGb50ofLv3P/24EfQEiZzIfIThSm2JC9OtnI6sSxs/PjUPLyZNYTkhXe35X /NBP7bc7g32EO+0KxKI19Y48lebMDjfN1fbHdu2z1WjpmekcoGwFztLKUda2I= X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen , Rob Herring Subject: [PATCH v6 03/11] dt-bindings: timer: Add Canaan K230 CLINT Date: Sat, 23 Mar 2024 20:12:15 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051255_438296_02BCCC2D X-CRM114-Status: UNSURE ( 7.09 ) 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 Mar 23 12:12: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: 13600616 X-Patchwork-Delegate: mail@conchuod.ie 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 8C803C54E58 for ; Sat, 23 Mar 2024 12:13:08 +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=ROGEPWh70jB87Z 8U/iB7QvBfBiXwVlrUJiD7gC7bnn+uCEFhakRbtMuOyvdF/n9GS3sDZ3tr+CJZ0pKAAEqpCPR/Qmn t11hV6z/PrSLGXvZYYpScM1uth1STypk1HVyBwUYDi6qwnqeZY78JnM5qh+u5QSUMRRxRwd/BRRrK pon5GsH374s325cxT/iYcIU6RQajKsJi4mUnYHHqFoIcO9MVZK5RnVJ3aWPwYdMiCcgbc7AB/lZkz DJtkfneVYLov8PNvwBplbKe4k0ztEMiw7hEItkpIm39kihhDqQiwF2kSMGqIeDuOuwLAO9MPmEAik wjy3g1n5pDK872baP5wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FE-0000000AKgT-2JB0; Sat, 23 Mar 2024 12:13:04 +0000 Received: from out203-205-221-164.mail.qq.com ([203.205.221.164]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0F9-0000000AKcw-4C8s for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195970; bh=jaM56XVEDkeOpfko2CLF+2oPCWKBzRPYG5Ofw5dlTQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gxxoEA64ZPc9ULscjOxXXprSOytH11AoB89nHhZkk1j9vZbytGlr9AoTObOJe1/bg Aj8B/LEQCN9Uv2xlxvs5aYcaOskKxiUSNPV3tW7oRWWBVL0igxIaq1WdGkTyhougm2 Gh6e71DyGgffv0mXEw5wEXcN7DC/YazHSyOmHiyQ= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195966tascze9lu Message-ID: X-QQ-XMAILINFO: MB5+LsFw85NoaOVyhodLMB6vQGFNYeNFWaGC50wVFAW8rjIf0HbkFl+03/qCU9 ZOpchX6kxJhjxYSYN02wRb8yAiqINgZqUAqGM1a2UmpIGpFvue01N+Bhal0WVYsPEGXsjPuz4SRF c2raaIAeoRKbwiXhHIXgbXlIBoL4qYzCLS6iTiEPDmKwZds2FwLxJ9V8wTzkVTY+BBzIN1cZqNmv ARkSXbJcOibyakXfJcb5jOZ2PppxJv3Kxjrfmv64eDqsjrEJ+fEagDT8ww2qRpvTV70fV2K7qFj7 XGAw+zaE0OQX03XSsOOlHoo4vGsfhTlD0dOM/5LRwKBS00FZFdcDw1HpRi3NDOM7mqCvdw3TiNIc 0N/VPlzvsVokkeubl6IGNeuBdmvWZ8Ra4/QwLJpWzXqHlPUcvPygfKrZpBrh/SJBwV57WqhUILSn pMC7roTPKCAAKvvETI5DLYZUsdXnxzF9sZgclzuPswRoH1jYHdXca5vlU5oJAAch3oMhZCD2Pn92 heqOW5bY0aEjFWvP1D2IBiDhwQ+aXYsAzpGhNAUVucACP80BKRtTPHtLCpZ0e6LPBeiutFN2ureO STCBAAL3kE/EuH2nJhE/2aOkKpN4PWETrQFeHJQ60WaM7e2wEfNJYp5lGPqiW+168e6cPWgmlwaV b/eFlk7RXxRD06mWuSx774q8XKgGnwqBgXBECl5rsC9U+B4xVBPLl8nnIr+kiKqb7zB+Gs9v5u7D eBZNPLEbwu4giqg7Dn08pTUYOdG38+KrW02sR5Fmg4dN1YPKgWPv19IJTapPwtKnhUUcwZIqnfZV 5v0azewkDEb94LlyXfXAM3IPIdyRv5uLOyNwpZAmZNo0S8Xti+jsE6nsFRy6Ad/0KBXrEdMpKFZ/ FFTVGf+a5FTurqorTmL+Lr1q6qMbzQ1w6/Hwzbq1s8ILsJL5a8TwNLzzN9/PU9XImHTeEqclt8ew hOyP9LQlTor0Ema64tJAmJb1OGEDko3DnCVoJzm0n6Mvme7LlcHzR6g4ddpJKagVkA3TcyS37lcC qUbF+h8+RQKiv1vprAmG+LPQwKJME= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen , Rob Herring Subject: [PATCH v6 04/11] dt-bindings: interrupt-controller: Add Canaan K230 PLIC Date: Sat, 23 Mar 2024 20:12:16 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051300_522057_CC033E40 X-CRM114-Status: UNSURE ( 7.09 ) 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 Mar 23 12:12:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600617 X-Patchwork-Delegate: mail@conchuod.ie 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 5A310CD11BF for ; Sat, 23 Mar 2024 12:13:10 +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=lxrb79hB0wvIVG7rt8vRGb5fC+Uz4a6eTIFrquTEdis=; b=udyeiBJ6N8rB9O CqwC33X/v2xdbxMi6zSv2uOM2MBZoY8EqCYmVjKDJg05U9xfdyOU8xLLDytTZmQUMhM2So8fRUR/h wKUlM54wZkPXde7oaocjQZgAgcK3Yfa4wh8w+9nUMck5LfJlM/C5bPw4+gt5P2L+RJ7SpuFCd7Sw1 xxYVv4+ZJ8Yr2n5Tvn2AglsoDfrLT4zmSBPKekVokNYXmIbEpinUYbdrDQhhZhx9O82KI+/4RZDtJ jdmr4Svaly6JDQ9hjJmv6Axo3NJZT3Bwa/NUg+RT6GecoEnMSRMWReY9z3UtWipjbGTbxlYqLdvmu mq8M/KEIp/O78U/EUt7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FG-0000000AKi6-1kb4; Sat, 23 Mar 2024 12:13:06 +0000 Received: from out203-205-221-190.mail.qq.com ([203.205.221.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FA-0000000AKcl-2Igo for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195972; bh=5MpYpfT0eNaGtEdlbvizvrZCBY0mWQjBXe0Ac37Um0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ekilKsN1Kmwni40C5x3g5mWmfqzTx2z/QyJ8cCGowm4lj+5cXXD6I8iyJsBdGC/XH UMYlWZSgDvaTSfSJm6rmbJ95PV1l1sOnSNfFbaiack0hixbM9qwc3lWat3F7fAoN30 RBUFbxZUoRWj9G+dOp/6kDGL1f/EVTUhUP4842WY= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195969tpfdvk5ux Message-ID: X-QQ-XMAILINFO: MyIXMys/8kCtun29cR78Yys0AwmqeM/v0G+9hjwKHKZ+XZCcWoA7laQgQFc7Hy BA1slHKuzjwLNC3wTl3ktEYZYOb3H762Ci8JDR63DKdGBqKcH0IbYfGT4ihZdl4ETu2UdqFpEjYR wS++nVOK/7CRT2O8Y89nQ3MiPCUjp0ZU9Eqa4MERanDXWCFAyhzMZ820RMD5eWio5w9baVeJMRwS yUN3ItLKXkeWXpdANmBoTySpZTVPAaUuAnekb9P2HQLKLzcjIJ68n6RBVnIJcsawmwPzGsBl7FIh 3SC1nhsacLPq+UUAquvjTJUzX+JhHDde5h0VmFFf9CrdgiNt+XpoiFkx1JOFy7HQigl1VSwl/JXE DpHsQx9oCddbAqLoEsUme5d1nMMwwj1oRkApwQBuKB/4INOlANAyjK1KU/iKllTUaGSG1rqxqRjf azpgMzWS9eGckijsNwMwPfmA8C1vSjSld7muix5V20ww/ptnBGqt0jAfmBaZv6ACTqMNOk8r79L4 KkP73aqCSNKsvDXV4VEtbEUYnyHciHRhFgYJzqdgDvcaGPNYwVX5esaAlLG/9MPYEMdvEktCYCWj lL48cmSqcYGicA24LHSSV5Q+YWfPOxNiOYGWdtfVzMB9kUskeJgPg5ZJuklcmMcvuKvhgfZ1KzNr WnhDu5SRUMrqw5MWQhkFba02RHDI4G9u3u41XxBwLyHvARJos/WLU2x6lPwVWNFe1ee4q9RfngJr p/nbZkCaIV/p3NAHS8qO5b8IM+zFqrQ7+p59pMNmAquUPc8RIiEYq2UZTop5F58cX7X/ZQH25ZSw hmHjFxk9tFIuEOyvMxpDFdIGgLHk1XTK8i9Gslqmi10LsIIj+S8p1H338lFOpXPK+Pk7aG3SqOMx HxYaHbjWTcWmJ78iUlsShJ/QHYKbBnLP7GkwJxdpFCQcJOGsf+YepPP39DbmWsLYf3SARzRQbL8Q z27u7NB6ipGnDYK7xqb2rVDjRLUQ6KCJyO8peSaiuBzodVpzORnPkFMnLWu9LZDfnRmkbB9PcWWe 5Z4VvfjgMM6vxv2YcpJw8gAY1XuC8pF1lBRL2nIA== 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 , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 05/11] riscv: Kconfig.socs: Split ARCH_CANAAN and SOC_CANAAN_K210 Date: Sat, 23 Mar 2024 20:12:17 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051301_100588_3162E6C7 X-CRM114-Status: GOOD ( 14.68 ) 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 SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4], we remove the use of SOC_CANAAN and use ARCH_CANAAN for SoCs vendored by Canaan instead from now on. And allows ARCH_CANAAN to be selected for other Canaan SoCs. Then, since we have Canaan Kendryte K230 with MMU now, the use of SOC_CANAAN is no longer only referred to K210. Thus, we introduce a new symbol SOC_CANAAN_K210 for any conditional code or driver selection specific to the K210, so users will not try to build some K210-specific things when MMU is enabled and see it fails to boot on K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ Signed-off-by: Yangyu Chen --- arch/riscv/Kconfig.socs | 8 +++++--- arch/riscv/Makefile | 2 +- arch/riscv/configs/nommu_k210_defconfig | 3 ++- arch/riscv/configs/nommu_k210_sdcard_defconfig | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs index 623de5f8a208..5710aee456ac 100644 --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -72,11 +72,13 @@ config SOC_VIRT This enables support for QEMU Virt Machine. config ARCH_CANAAN - def_bool SOC_CANAAN + bool "Canaan Kendryte SoC" + help + This enables support for Canaan Kendryte SoC platform hardware. -config SOC_CANAAN +config SOC_CANAAN_K210 bool "Canaan Kendryte K210 SoC" - depends on !MMU + depends on !MMU && ARCH_CANAAN select CLINT_TIMER if RISCV_M_MODE select ARCH_HAS_RESET_CONTROLLER select PINCTRL diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 0b7d109258e7..294b2b3e8e6a 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -149,7 +149,7 @@ vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so ifneq ($(CONFIG_XIP_KERNEL),y) -ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy) +ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN_K210),yy) KBUILD_IMAGE := $(boot)/loader.bin else ifeq ($(CONFIG_EFI_ZBOOT),) diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig index 7e75200543f4..2552e78074a3 100644 --- a/arch/riscv/configs/nommu_k210_defconfig +++ b/arch/riscv/configs/nommu_k210_defconfig @@ -27,7 +27,8 @@ CONFIG_EXPERT=y CONFIG_SLUB=y CONFIG_SLUB_TINY=y # CONFIG_MMU is not set -CONFIG_SOC_CANAAN=y +CONFIG_ARCH_CANAAN=y +CONFIG_SOC_CANAAN_K210=y CONFIG_NONPORTABLE=y CONFIG_SMP=y CONFIG_NR_CPUS=2 diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig b/arch/riscv/configs/nommu_k210_sdcard_defconfig index 0ba353e9ca71..8f67fb830585 100644 --- a/arch/riscv/configs/nommu_k210_sdcard_defconfig +++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig @@ -19,7 +19,8 @@ CONFIG_EXPERT=y CONFIG_SLUB=y CONFIG_SLUB_TINY=y # CONFIG_MMU is not set -CONFIG_SOC_CANAAN=y +CONFIG_ARCH_CANAAN=y +CONFIG_SOC_CANAAN_K210=y CONFIG_NONPORTABLE=y CONFIG_SMP=y CONFIG_NR_CPUS=2 From patchwork Sat Mar 23 12:12:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600623 X-Patchwork-Delegate: mail@conchuod.ie 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 7C5A4CD11BF for ; Sat, 23 Mar 2024 12:13:32 +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=EyFQ2WbedqhEZnaSwBsyjjlcq8THfDnl7nIeUf/T58s=; b=NZbZgQlPwaMZuQ pjlgoPZeG2icahb8OAEzhsexwXbkY0QkWZ8A076VVGyT1vlPporyl1GDcPKheMP04CsEVWLnv99lQ tQd3EVX79RxMVhbB/nGfLa1l0oEf0hLxu0LsU2NYn+SCjqT24JLWnMX3DqsaPm1oB8re7eAbYFu07 s+PS5nWc1cIBYoM1UhQltdFqfPpFp1kTLRFXygmcfv+Lb7v2/nx/oJ39cyBAL88hXPE8MP7VQ4MF4 IWwmc9Blw2KaiobvaA86CMFn5Sae5n4uUAYQjbQTY7RW5RJ2AHEg8qHT3A6fSm813H5TqFyGfEMkr 2LmR1N0riQTVA2QpvNFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0Fc-0000000AL18-37Vq; Sat, 23 Mar 2024 12:13:28 +0000 Received: from out203-205-221-210.mail.qq.com ([203.205.221.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FQ-0000000AKpn-3sfs for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195994; bh=gxGEA1zI0RM+I3kpAeG2Tfht93lBnbsfTrZDhfruV3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AV50GZApwLPOJywfaEN0XIWPyTIJsC3Ne6CzKmNU45ml6vYcefjhKnKkZM3gMqvDH muZvoLaJivp6Td7HhV0E54Nvi9K5MbYzspHDGDg/qmNNpDfist3MKtgTiu121A9ge/ dTRW9pSXLe58A9gemHjV9UnMYzEFJ+XW7WgVpxxk= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195971tonyfvaik Message-ID: X-QQ-XMAILINFO: OZZSS56D9fAj61jTOe54p85UExhdidaDwwLUsRR7zkr0fCV9v9nd4Trhy5U/Eq 1eGcetKRrVcRFO3+d6O2nKFy0N+YEo+zNX6QYJ9ZnWgZssmh5u3xAzfOpfnwl5RlmroYW/yhSJQF 60LUYBoW8b1fsDq42tXjLPaPVF3KU733xftgU82ZlqdK/QNHwp46Q/cUoF631vOe4FALQHsuJxOj Kd1q/A7swXqYqLzBNXSFYlqHEwHkBqF+0ynNFjt0tA78iN2l6c5bw/5p0SMQVBTKlDJ5XJSp4zdd i6MME9fypgZoQSnjtt9ArlyqC0/c+Ke+rdEyX95i/Q0m6Dbx1hJsmufb/4NbOzCdPH8kjj5OQIo0 KDihCCiVpuhO7G0PHq1W/LaODrU286x8Q42G0aUSZ/tscaeJDOXpthYPQ6Ju8+kQaNSxHXQr/Xbd swEIP1S7J8Cy9cVGrW0Vx34ggJZU+5w6sJwFChIKmu5A2yNySFrBVYMKPMFmVytPKOYIlsYuEbTP BkgJPEWvBnquRl2rhj+whKTWlFhApb1wAl2g6AlN9U4BalBUrLG6AV0r01mHxSGdFPuTmx3/WAc+ CAq2HW+hHmvDRZgspEjF2nftibfTjBFrzVgIbKaZckhv79V+fyqW/r3qjHHpNywIcl7WQbOjB5PJ kJlopcwYbeHjoD1Iwe3ejXaG9gSJQ+SmH7iFrV0xdV7TcewDi7TVaRtROP4HRsRyPyvaUVKfi3VA jXjqpDEzfHu5J8RCUEap75d8GL98b+tc9PWaIZrbEeP4TfCzDL+otr85+ZL4ZDW9NLvT+3QVT0I8 Uhl2/ctTuQx2Sbpa8iFNo1XRhF+qVYJ/l/TTH0YsDq3rrvayLu9mIrvGoJahhQEm8aW/whfM5Z7w JK8hRtfdweSf1DRhyYdiOUEVeOP1T+nOJCebiWLRaJCW301V9TOVa+fLf//rZ+j7PdJ7nHpkmklD JXGBfoM7Rc816OezvwWbabQUKZ4GTKd+zu9J4Sb9u6BAGRipM3Rx6pkgIoQwJe0FY2kcxA2B3LK9 otE2bCORE/acVXNzm4Bf1QM6wX2MXg82fHmFKZSA== X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 06/11] soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210 Date: Sat, 23 Mar 2024 20:12:18 +0800 X-OQ-MSGID: <20240323121223.1729328-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-20240323_051317_404912_2CB12EAA X-CRM114-Status: GOOD ( 13.13 ) 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 SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4], we remove the use of SOC_CANAAN and use ARCH_CANAAN for SoCs vendored by Canaan instead from now on. Thus, we should also change the Makefile here to use ARCH_CANAAN. Then, since we have introduced SOC_CANAAN_K210 for K210-specific drivers, we should replace its drivers depends on SOC_CANAAN_K210 and default select when it has the symbol SOC_CANAAN_K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ Signed-off-by: Yangyu Chen --- drivers/soc/Makefile | 2 +- drivers/soc/canaan/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index ba8f5b5460e1..fb2bd31387d0 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -7,7 +7,7 @@ obj-y += apple/ obj-y += aspeed/ obj-$(CONFIG_ARCH_AT91) += atmel/ obj-y += bcm/ -obj-$(CONFIG_SOC_CANAAN) += canaan/ +obj-$(CONFIG_ARCH_CANAAN) += canaan/ obj-$(CONFIG_ARCH_DOVE) += dove/ obj-$(CONFIG_MACH_DOVE) += dove/ obj-y += fsl/ diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig index 43ced2bf8444..3121d351fea6 100644 --- a/drivers/soc/canaan/Kconfig +++ b/drivers/soc/canaan/Kconfig @@ -2,9 +2,9 @@ config SOC_K210_SYSCTL bool "Canaan Kendryte K210 SoC system controller" - depends on RISCV && SOC_CANAAN && OF + depends on RISCV && SOC_CANAAN_K210 && OF depends on COMMON_CLK_K210 - default SOC_CANAAN + default SOC_CANAAN_K210 select PM select MFD_SYSCON help From patchwork Sat Mar 23 12:12:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600619 X-Patchwork-Delegate: mail@conchuod.ie 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 83EAFC54E58 for ; Sat, 23 Mar 2024 12:13:15 +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=9MY2K+zVXEi2PhB8yIvqQ9BQRDnXlrOgMBpFkL/2MmM=; b=FQtrPXUrg7fkrV Uj1KQcsw6EEJqcZj0XswVT/emW9yv2b22+Xlb0u49LndHW3CIAN0tTnTVsfdUHHOd3fDymM3lMLKp pYMFdC2gwM13j7Zlk8U91Lj/wd/v0QTGLPHvpMgfaN68n8/lmF0DgdRlff28TukNruUv2wdRLkfTo YYyda/hLR6IN3yf0BErb/PSoyE7lsKpk6iLkmW7q+joSWoWBVPUc+nWV9GbLzCov1HLld/tux3FXe bsfJo2JZBNEJ+j7ZCW6W63wcG50gDQbfh8m6yiQyIhnatZoGl7emtChBwI4R65OIcVQH3b/+qsykY feofsBDZcNkS9ToxxvPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FL-0000000AKmK-3W3O; Sat, 23 Mar 2024 12:13:11 +0000 Received: from out203-205-221-190.mail.qq.com ([203.205.221.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FE-0000000AKfT-1Qwg for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195977; bh=Mhw9uIUtgqh31+f3FsQG870+GJ/mAlkg2CUWtyQ+yl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RXC6B1AT38wp4flybuunP9El5jwE34nUC5TNj8OhSsGhqfg9lknv6YLxXbzXzyHAH 5fI6JlD5szHRVlUsDDV1GDYGU6eZP1OCQA7pckx66lazcCg7+6bpfHf7ujaK7O6CPT QGfPSbb29YFsUQPsg/kBrR3w7rLG+rUMNWd9Ynic= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195973ti896svy3 Message-ID: X-QQ-XMAILINFO: OKkKo7I1HxIe57aA5A2c3PUOYwJgdumhef5e4VKF8/tfQppXOl3jPTQThZWrmD JEQS5Th9U+9MN5UUYs4UhH4mr/pyaxIiagnqvktF50wn+8rGQt0+FmE7ALENpb7DKKuvIJbL7KP6 75kjlhsFVPo9/LmCwAbHfwhPpByX8UySgI730L2GTODL5luhmyM69+xh1phkVgCTxBJhTX9cgWr0 Xaz01wv1XqJQFNQsBJG8JNzFDcxy8umEns6zQ/xg5GNwyRqtYmu2lCTjgMtV8qbzMFXSAqeFd/+u z/Q8pOgLv7BoEd84oN8hqyf2wNwJ4oktvYvQ+s2xEjC2T9jQZ/M9MuFTUpUtbt+MonVpiIKlz9ra O7bWmSTcZsxFJDuUI5p/J/ox7SoyCPbtslEr56c/lY+2cOueR65/yWrrTRovkIHJ+h1yOg3+KV5+ I1PdDWFo5OJlydJFTLbzum+qF0h/Fo+1lEhKrbMYHPORp5HUlWSNl4vHoEG1/yVivOV4fpyWOPaG z4eEZ5GIA5M3n2xrv/CRG7r65akpOArndjo80qULCr64tEEeeMPazztamSFJ/boBENS7XvqrnXAv qx+jIU0cGH/UemhCBWfZjv6iLKzMHQZL+8WaDne65w0+jSoemT1Au79h601lZYh8546KAOVdA+oO VqODt586V5WfXqEbPi7nPXfvT68150zFhmPBKYJ1/kDExZkKPIwW1q8wvS1yqenld0fEGmVDeZvi R5jgWO1chHTW6fQQyd2ONhXvIXWU4kF5ag2BR/VvsJcdU9yzKJ4IU5sZeHgFlVfiAf2N7JJkBrwJ 47p0WYZngFeqd+YqrFDFvjq7oWf4FTDWvL78+CKgRTHDJKeBdqze3ilrr4zpsHqAuZ3QbP513HJl ZU4XY6pAp7r3x+EKLR9kkxDquX6uZB2GZpcrUR0UKNyoo0Vod173SXcXw7TzR8EUQ/kQarrTnEsK ery9lOzpwKGp26zUtd2c8GnH274l5BOLHfWluvTXFBjrA7LBgsK1ME7JZglY4c++npiLrHVZJdrQ BmvduzW3xKxYQ2LUfIp6ozDiK8n68pWwZDJFDwjL6fRvbHJCa+feZ6a2FCG6blUePUyjQKTA== X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 07/11] clk: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 Date: Sat, 23 Mar 2024 20:12:19 +0800 X-OQ-MSGID: <20240323121223.1729328-7-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-20240323_051304_927394_9EAD4E15 X-CRM114-Status: GOOD ( 12.31 ) 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 SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4], we remove the use of SOC_CANAAN and introduced SOC_CANAAN_K210 for K210-specific drivers, Thus, we replace its drivers depends on SOC_CANAAN_K210 and default select when it has the symbol SOC_CANAAN_K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ Signed-off-by: Yangyu Chen Acked-by: Stephen Boyd --- drivers/clk/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 50af5fc7f570..7517a0dfd15c 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -451,8 +451,8 @@ config COMMON_CLK_FIXED_MMIO config COMMON_CLK_K210 bool "Clock driver for the Canaan Kendryte K210 SoC" - depends on OF && RISCV && SOC_CANAAN - default SOC_CANAAN + depends on OF && RISCV && SOC_CANAAN_K210 + default SOC_CANAAN_K210 help Support for the Canaan Kendryte K210 RISC-V SoC clocks. From patchwork Sat Mar 23 12:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600620 X-Patchwork-Delegate: mail@conchuod.ie 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 9D09FCD11BF for ; Sat, 23 Mar 2024 12:13:22 +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=0SEbNXr3cKGaygZY+7odm0Ot/6fILO7FQJ5dqUwueRA=; b=eNWpyCR1WKDSXg XV4YrblvyA2g2kleeyxGn0XNgVvqSojMTnGVD+dcXFbtIOtNPEGHlq3ki3Eta1bSN64LG9MOQzs4C IGsPbxsWzwX1SppsbLgXyYvPwGyampmtecg1eVIEfVm9cqRaWR9iM2H+FMC8qKJlF+1W7HZJ4fAdd QyOwHTjTdsZOfoQJoGktrzJvztsfwdqdBNb1XfggCQOQLRbXTms4uptvtCDJPZvw6IUw4OFI/Q5Ps qVigl39UJnvBOLoVFsmB6sG4Y9aJGyD2UV+B6LTI8GeOWW826aDj2wxH1wywfKt9KGJfFhc+OI36+ fgfczLGPVHSTmwXqlaRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FS-0000000AKrQ-0XA0; Sat, 23 Mar 2024 12:13:18 +0000 Received: from out203-205-221-233.mail.qq.com ([203.205.221.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FG-0000000AKhU-3aYE for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195979; bh=egExra67k3YChMagH1xWaPLg0q0pmTviVHV20R/fW7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MKC5HAdfQsc2nrepUgBhWJnE/tL7b02SiKi0mo9FTAxMctQZDX15Oh9wuiLxzK/ZI sdHiO4O/+7ma8K/3AOKHVgDP8i+XKoqKVwI/Fk7iMjMykn6Q9tyCWFfcn+7+a7ZzCD 93Uy3Tcxn42zE+6HWaBphoMX8QzW46XbWWQULazs= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195976tu1lz28yh Message-ID: X-QQ-XMAILINFO: NkHKfw09D6j8RA6sM/aK2Q/rOau4mOSO9cg/EhJ5mg7yFfp/oYnklKbxnc9Xml RjF3T8lkX7vUn4LpjxulPMX3NLCENF6YShfieexD96piot1adQWkeEPkyG3XfvcwnTNUaKAOH1/1 cx4UGxRRe81wnfHJRJ5f/Iy1UQjpbnm/7am6aYwJdwUKfhE/LEa/cTNPrRKuFRRO1kxiJWfczI5D gP0XOQi9rHQXYiKTNrV62ln2IMuxkcLRafx5D8gw5dPhv50XDJk+ZX+qAVTmWBck/JIPQ1vUDsNN NaioEnqxq7csmhAzj6pK/E69MaKzrTVWtRwyI6Q+4AwECqjDDOLNgGEnAJOrS+/dKBKdqsxIaCPW tGf9NpWIYJ5cvo4JLK0Z620dhFZJiwnlpvF2MQOIJi0nWW5DazXZ9KLpf3AjrdiklumLHAFf6glf cyq8Cs8AWYbN3vd3c1/VcL8R9cVIokV1K1qb7g24/sfedFuQZg1C6yypM+b38LnxwZ9TBgyXQu6e j5paGDvYab9rBBSDO1eElUcjmeEdTZdJw4gVyyQCiQ+vzw6G7+9hq5pq5iEkT/lGeW0cNWFYikeF 1/80kIa/gJ+eoja4LHpO9fMYmFbwwUZXnufVOMrLi3Ht9L5sBLsXG417r6IBA/KTEEQ/zNWwz+WJ Mdys69aenjTnGvwWnAj7WXHFV/6ANDvaA21AobrgaO0ypImlPNtUUVH0gJ2mbWy5h1z0SK9HrL0+ H81Uv462A15s2nrEzwu+7bl+VeoG16V2qiX9YKrcjIIQuTKfOLXWkbTgxyyrAKGOSlArDsUMFCd4 JLgbLfdZilP/dHZ6WXTWCETd3/aky0wnbK8PX9YKb7x/N+A7X27eUcejnsdoZK+jIpjRCw19OfLs z0TSnieQZqyxk2aFqraahR5yYgwhSHPQfjwvy9eUARMmf7WoOJEbchDQBdJzynHCXqMyeQQGhu5l 6phj/wkl1FvQ2+ATXBIvoCVERXC7jHPbYXWRGKbwsRtxSeufy8F3jCPq2WVk5L7H7LtPFQhe//ls wpn3a9uzeRtVTQR8HS1pSuw18uPfAklNhF6+sWXqrxIbGenBOGFXGRiJ9Yjnk= X-QQ-XMRINFO: NI4Ajvh11aEj8Xl/2s1/T8w= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 08/11] pinctrl: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 Date: Sat, 23 Mar 2024 20:12:20 +0800 X-OQ-MSGID: <20240323121223.1729328-8-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-20240323_051307_385742_8AF8FDFF X-CRM114-Status: GOOD ( 12.24 ) 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 SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4], we remove the use of SOC_CANAAN and introduced SOC_CANAAN_K210 for K210-specific drivers, Thus, we replace its drivers depends on SOC_CANAAN_K210 and default select when it has the symbol SOC_CANAAN_K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ Signed-off-by: Yangyu Chen Acked-by: Linus Walleij --- drivers/pinctrl/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index d45657aa986a..1be05efccc29 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -235,13 +235,13 @@ config PINCTRL_INGENIC config PINCTRL_K210 bool "Pinctrl driver for the Canaan Kendryte K210 SoC" - depends on RISCV && SOC_CANAAN && OF + depends on RISCV && SOC_CANAAN_K210 && OF select GENERIC_PINMUX_FUNCTIONS select GENERIC_PINCONF select GPIOLIB select OF_GPIO select REGMAP_MMIO - default SOC_CANAAN + default SOC_CANAAN_K210 help Add support for the Canaan Kendryte K210 RISC-V SOC Field Programmable IO Array (FPIOA) controller. From patchwork Sat Mar 23 12:12:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600618 X-Patchwork-Delegate: mail@conchuod.ie 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 27452CD11BF for ; Sat, 23 Mar 2024 12:13:14 +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=CN5zjbviEXOeeOsuzQ786cZ7QWS/6AszeCRZUTp4XCw=; b=fbVn3QxJavrGdV SSKGzgLxyFei+Gp58OXiqrOTvyIpkrqjVziTZfZEFIECDhKRiOPfedoA42b9yA3rg1Oz4H+NCU8KV vP6NIgLLmEJt5MQw6rff9Qj3minFevyPQpK7FM09tUnD3PaepsWDEleXJ+3YqotZM82zLOLnjnLhY xtdI+jHgithfqth9FoTZofV67fRecokddCpbiqX7XkSmUqZ9csa7xCqqBQSsU1DKX1AUqh+tGQXwK ID+I3hhTjPZz3exbtrCB32h06to9QXgt0qycCOS0GIE78SwZc7X8QB3XwzBkwaInHBf5ueCKbePiO ejIaoShozjJZ4p3wYZuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FK-0000000AKlB-0u4C; Sat, 23 Mar 2024 12:13:10 +0000 Received: from out203-205-221-190.mail.qq.com ([203.205.221.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FE-0000000AKfS-1L62 for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195982; bh=prkqax1s/YPOiuAZGsCqzxUs5Mq7p8+18pkZu3zCxio=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FExgpxyc7VxO+CJoSBQzjwA6ggvC4ApILGMK39zrxzE0omXjKuQVrsNw6IicRXhO7 iAzybrY12kmFFM18TjVlELGTJv5WwRZG0aw+rwhPHL+248xYRWq92NELgkVFE+pBYh u9nMiIypby76k/byF5D+2Y4Kne8HBriKUpEht4IE= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195978tnmlc3wz9 Message-ID: X-QQ-XMAILINFO: OakVxA/3u/8RJY9aJxFZniVxmyjuv+LnRwH4BurKFJB3iN1qA6IOmp0/dMwmGq INFrrIaazWaGFoEuymArxkohE6PFoK5yiXKOvxcdoT8D5n8yfqfYPpSw9lGIHfmkVheMdL2z5pt0 9vYFjBFTEAEY+EHInLHRem7AesRCeGKMrAqbPsGPm+TSdIzUg3V1oZdW8RxDYENgg9ZXCa172B0X Gz9E7NicSdmTzdY63OFO0IpMvqmIYKgU9zdp4rBlsI8Qk/KLBkv1h9B5kv6aQ0SaKP5741c6C4S5 E3Iq2mOMUkKqWKHwYZg1gor5WBdZu8ZVnBQIzqYtoov5VFQ1c4HmlJyPm4UFb2WFhUi9aAnPuFSp KN0SpzT/ThmgnQAyKWIeXWocwRzmbCywWu44Xz2K5uVNTvecAfNCJU9ix6OL6tYUK2q8HpbX83GH gViqq84mYBnl+Bm363O6gQC4zoWydpo4DkEn6LOkYviXPxA0Qqzb5pDTPrbkf992jDcYTam1oAfe foBX6gMtX3rrhkDzUaSe+VaPutNlIArRzaZxkQIAB/FSiabGD46XrQw4k69xJjbq5eZNwBxgLPuJ hH51Kge4KnM0dXNQ9backIuoneNkl4OOY2aq7RtHibNy6QPDNJTXz0Gu77EOm9hmlK+b35BpZ5Ju x3CIFB8ZFxyg7XWghwzcbFwhZP4nB02cDxH6ykrVePXY3xsCOsCJWqt6eZaw42KDtBfc3+WSjkhA EiEgZyMUFMOxicnQKkk76Q1Sp7AaqA7KL68slHTRz+1Mcgr5EfjPVjhAKaZNl5v8zOg9KpT4dUGJ y2qv4l97K1/Y6Yi59CMw/oJp1UGHwgv1aFrDOoGJCC8A+0WvSw8fqjjIWHvaAup+IBbPXpKov/sj WKND29wrN3sXj/qLz8nerguDF8O3J7BK6292HjwkRrqMI43CiUABAbmOkDEV20yniYCkedSicui7 4tIllPcH6NX0I8haL2cqKlQGACvNOVHe3nC6DzRoUjkkQbXcCz797BdLeuxoyVKqfKc4azC6aRlf 0ZPUJNzOvSY7aatIEhBh2IOxOy3OZPVkBVmsCYLPt0JNw1gx6P5OrZEaBgF2+9awiLpvTbWWx00E pnjcW2v7rt+3Y9oUA= X-QQ-XMRINFO: MPJ6Tf5t3I/ycC2BItcBVIA= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 09/11] reset: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 Date: Sat, 23 Mar 2024 20:12:21 +0800 X-OQ-MSGID: <20240323121223.1729328-9-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-20240323_051304_886985_FC9B2882 X-CRM114-Status: GOOD ( 12.23 ) 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 SOC_FOO should be deprecated from patch [1], and cleanup for other SoCs is already on the mailing list [2,3,4,5], we remove the use of SOC_CANAAN and introduced SOC_CANAAN_K210 for K210-specific drivers, Thus, we replace its drivers depends on SOC_CANAAN_K210 and default select when it has the symbol SOC_CANAAN_K210. [1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ [3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/ [4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/ [5] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/ Signed-off-by: Yangyu Chen --- drivers/reset/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 85b27c42cf65..7112f5932609 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -103,9 +103,9 @@ config RESET_INTEL_GW config RESET_K210 bool "Reset controller driver for Canaan Kendryte K210 SoC" - depends on (SOC_CANAAN || COMPILE_TEST) && OF + depends on (SOC_CANAAN_K210 || COMPILE_TEST) && OF select MFD_SYSCON - default SOC_CANAAN + default SOC_CANAAN_K210 help Support for the Canaan Kendryte K210 RISC-V SoC reset controller. Say Y if you want to control reset signals provided by this From patchwork Sat Mar 23 12:12:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600622 X-Patchwork-Delegate: mail@conchuod.ie 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 5DE55C54E58 for ; Sat, 23 Mar 2024 12:13:24 +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=P6BDTyFT7ugLuWzDr5955HyJY+yJT56iw9FqNDccLIY=; b=ZR+cK31tzsBprf 2tb09HwmuBSYxKZIHuxPGAMcxEAm7XpmtGRmmgO1VJ//Cf+uKJBSVBpaJYtDNoAUIGx7ysijxXqlq yYpfSXFTFWXsyP6uSowDzDgLTTxavzjoliyNnYqkmRuEt3rrJn0RQCXpDW4Wk8UggKnig4bTbFzsl 8/HQfCkbvXCB9E8aaHhUzYaFMdRjTQsj4j1xDvzbDEyWcbTt9WyMW8artIoMlTj3l+MyUa2lwALBo xN395aNOWsIlzIOfNehmIh0MR7K6Ui4qRrNOjxYUcLz50+NGT3/eEXP80MoMVzqdGJ8o14NeWa82u rFXBxnihCyBbLqnq2qZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FU-0000000AKtg-0gye; Sat, 23 Mar 2024 12:13:20 +0000 Received: from out203-205-221-210.mail.qq.com ([203.205.221.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FI-0000000AKhd-3G7Q for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195984; bh=1WxNJHWHxezSU1ExyMx2JrY3ERVm20llQGz6KhWotb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=P1HC++jIxCAIAwbSbb7mN5mniDE2ne1gCsHdJ53p9VNM+ooTPJMBM4d2O8n0aVAIe t+00jB3DF5ZHGofDTmPSsZ7FqiUlP4Xj0juAmUFaPab6hZKidOMf9l9vf30SA6Bg0J r/BdRdP8LO47lRTvfRzHeifTHiuU1lzFj4b5i9o0= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195981toie5rdd8 Message-ID: X-QQ-XMAILINFO: MAcVqULX7QQ1nEWPxCClLu0fXQC41zMmp969VU9VtA8a9di3wrTyrOvEvPLezd GZZPzU2VvFS5MW5ctKLUCz3db1X+oQVAS8578YNZ1wQLoml3fTAqGCGhaT1uOvvtSs1UUNpk53Gp kKaS8J+NWp/szXLWHf+lrWCk2pnJPSXvlhTjJC+ddTE38DB7TAr61AK/D0pgPIAvgozcPLRKd5B5 YZLlaTQNN6+Mey9e4I0lsG7u8r03drNM3bkGEQvf8Che40PEkNbXNdI1hSm3DgRdqbpUpxgyGwlZ FyHVHqBLHYrtT7+1wof7jccL2m3+ES3CL8j+Upg+3aks0adVwYxm0CQdlVymlLM6z13l2RoZ8BAV KDoOhrEtNvI8hb7nm9vpg1ANJb+mEFCmK/yw1E4lMr+rGbFHqlNlbsl/t0Dh+x2d7rAE3FMnpnAL bL8d4+7FYD2QnihkYUyhOV8Bn4143418NxuRHqb6MJQzjyh87LD1eg31upcuDHUUxaK+UXMqwrq+ qLXQ2KN7uUxAJEU9ajtY0Z4nyMd1Fio6ZV48InvfDNQBmaqxmVGOLZ3Q4Ew1M383P/CrHH6OhyRe WYwB9LMr9GXZijg2+tdE8PD8qW6ugT/LEUOsEsWdiNWHKhzKjgeIDg1jo9wJg2LF8DuTZ+viuue4 yhe7Pn5onlvh8dxx9jlphXgS7UCkfUblrrdvRI9ohk1Kh8xmJkbhZJa15KCmnuu7s2iLxDh2TU1C ENFO6N4j5knEQw3NstpjW9lOqsfAmABzwBZtBx28j7gYv2uk7pBeKNiZKgAIhm73zIF9eXcyVZUG 8ENeD0oF3lts8jI2AlQKyOS3vHTVx5oIc12lw5pDgLCZQbKZ3EaH9E4Gp9jSWYYwPM9EQtRPs3vA zJQULKLgyftcPTqqzWb+/KY0eel2iO2OKgzG9U2A6P8MqQKzZc7R6qDfFqXDcbPSggZf4wZJxm1g lEPVpxpyTT7sIZga0XM1a7LFIkFIdXb+c0OGt6L9NwdI7Fz61UaS1W2pfZdjbfcjym3OV8GNF6EV GByEXh3mirRJwV/aN7q2IZXJZfGh8= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v6 10/11] riscv: dts: add initial canmv-k230 and k230-evb dts Date: Sat, 23 Mar 2024 20:12:22 +0800 X-OQ-MSGID: <20240323121223.1729328-10-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-20240323_051309_474453_F3FFDFF5 X-CRM114-Status: GOOD ( 23.32 ) 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. - 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 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..7da49498945e --- /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_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zba", "zbb", + "zbc", "zbs", "zicbom", "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 Mar 23 12:12:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangyu Chen X-Patchwork-Id: 13600621 X-Patchwork-Delegate: mail@conchuod.ie 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 26164CD11BF for ; Sat, 23 Mar 2024 12:13:25 +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=84zG7uARsOGX14/cr5AWicDNQIeaAVbcJqjgiwOPX2k=; b=uXiSlSHMiSdXE0 fgGBSvn3IuA3YCoqVJSaRcY0OAGcTeni+dQqBRnnXjmatGqeSWsgtk/LxHbcM+n/H13Z27VaSh8Yk jv9OvFgwwXzN1di0JmDKFjrVZJrO7cW1A5CuyQ+d46I29N79zRd9XhFjVtAtze0UhkqdN80jsBtA4 Of7WNoMYg6/7Afn1rct7KYPEEFS9/QrIaskmGk6KkJ7Eu01I7ANwHcWHZ/rDb6X1adR7LSPpPskmQ B2hBOYjO2i+3xZiMcJEtzBIPA7ayS0BPNfhBSSo/sSR74xrYRwJisZcLzEww0VAkUHFTfpAXJjzEW ZrtV2NLFmcaY3cGeOt0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FV-0000000AKut-1cdy; Sat, 23 Mar 2024 12:13:21 +0000 Received: from out203-205-221-210.mail.qq.com ([203.205.221.210]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ro0FO-0000000AKng-21IA for linux-riscv@lists.infradead.org; Sat, 23 Mar 2024 12:13:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1711195987; bh=zZkfplMllcGZXaAHOpijHZhZw8UR9G8J39uQSbllctQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VEe9MiCEtSL6XIltfGKIjLdJxBdxoTn2ftxcoAjvNgs8mgWi6Hc4ZFvXfxk4qV78v LMkqn9i5HrQSj9zqCSt4l3lCB1FeeNK+Jnl+q6QmuLUd0QeYaRynuZGVq6CL/Xo5EZ 0LwnexVF/dJ2+3cU7B8emJDUWlk4Wc9DSjJZJwy0= Received: from cyy-pc.lan ([240e:379:225d:8e00:b91:b2e7:7c69:8554]) by newxmesmtplogicsvrsza7-0.qq.com (NewEsmtp) with SMTP id 32594C7F; Sat, 23 Mar 2024 20:12:37 +0800 X-QQ-mid: xmsmtpt1711195983tnrpaiiik Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeiexUNVyYWNTlxWuqPcHDTGFQ3bWaqzeOLy8Zyn+2kMxyOmMrE2U2 rhfI7jZQWix3KgacKtk28pjhwFUQiLgDzU5037aHSyAs3/RXqBbGThIBIbA/eGmP6hZW5fA4wjlM PpH3YVcID2ZBakBIwLuuzMIuRXsdSOhoL5pnk1VRRrpdZHPDs9ZPKgIVpfiUKKu08OHqweEWQcB9 Lq4Q/nSvRQoCXqrv3KO2Mp3h601TscUSkhdj9bOjQ9piDqkZXasTuxgbJrIm9veGmTtvT19fKi3P c1BwQevO35E6KGoeX/mTpfBkgIPiRqw79j2iOLtEU3WRGDBTOvspZ2sQYxJkGvkuu4BctknDajTO wvl+Khec4apVpV3fLqLJZAL/D8LhjN53S8qhS00UJqLmu58Qlx8jprnY8Fdme51PgvDw15VtoK3a Vmvt29QUZpVkqDQ7lAJ6AyeiomaUCN/yxQPgSQ1KiNPOes4Je3sHfJFyT+QVPeYKUofZztCEJY94 yAOmAUUVFzVBU9h1VmqgIPWZ7kNT8U/cZ94jqXGhiUZncNpFZNjqilFKkVOmdgBvLMA4MkNItQLW pVKpZq/abV/uyxTK5H8b4IpcH9+nYJ4Dt6vD24GXkmvZfaLXkYjAWlyNIi8J8/FaPPGkVD3FpGj2 wmxXzV/cBctc3lEyzcuTZHxdRjNzehljX0fewMO8WN/qcyMqBRybfRlNUF9zs0Pl57OeMm4Akifi RK1h54ASYwhVV48x3tfgcW6ub21X+xz2uhhNemVFgmk6zxASYR1TWYYn0+rI7YQLb5mmQSXWzCTN dlKa+ZC+qMmMBQJa7lDKmsRDxzSV1m0aaKcVMaMVPmCU7KUl/fYKvlCrAiPO4m3fuhLXBngJiBOq lKoKaYv7t4vvlRQf8AOyjfB1cEljZwGMzu4IR9tIj29vrCi3cQaFoc1UVAkGtRY5tFgTZuyFG8Vp lSqT3o+LCj5LY/WC9Ak0M73eRjjQkb3ObLk+Z0zU4TG/EFMqxFVbC0A72qNhar5/TyLolEi2TZMm r2+9PEpn35jlVcVI6AUQ6CioywxOo= X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Conor Dooley , Damien Le Moal , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Michael Turquette , Stephen Boyd , Linus Walleij , Philipp Zabel , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yangyu Chen , Conor Dooley Subject: [PATCH v6 11/11] riscv: config: enable ARCH_CANAAN in defconfig Date: Sat, 23 Mar 2024 20:12:23 +0800 X-OQ-MSGID: <20240323121223.1729328-11-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-20240323_051314_976724_8362E00D X-CRM114-Status: UNSURE ( 7.55 ) 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 eaf34e871e30..1d5524cdd47d 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