From patchwork Thu Jul 4 05:46:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13723268 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 D4F68C30653 for ; Thu, 4 Jul 2024 05:48:00 +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: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aEm40x8BKCDED4jVlUBduROXkW+C9NJUNhwLV7Lbc/Q=; b=ED8fuwzyEVf8xV uWd5K0MpJTutPRXvLO53aXp48HVvrJ4C9M0cw3oEB2BeV0IfWPQdDWY123fqiKXSTb7li4DphPnSO KpHNcF4lqr/DC1c+w+4GUwzErVSMPZJYRE5XyVogptNLZRlWTHpTxCwJYmhd9nCmr/RZm1Lvi0FMr cKC48xLvFUZfM5u6Q2oYhQs2rlFs7/f71UGHjX8CNUV/lXsY5wPWg2BW/Y3xEpQZSdNuoJMxJsMQm n3Mni6E/eFLBOdt8qLWjk35VZMuL/bgyI1Wn0K47NsceaXFuofUT/P3+zUwn7pgZi54S3H+14ieZd 4+aA8pcAa9I/M4CRmLow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPFK1-0000000CFZL-3Bbg; Thu, 04 Jul 2024 05:47:57 +0000 Received: from mail-bn7nam10olkn2082b.outbound.protection.outlook.com ([2a01:111:f403:2804::82b] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPFJy-0000000CFWn-3MDk for linux-riscv@lists.infradead.org; Thu, 04 Jul 2024 05:47:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpVdYjUfJqbRtBqU5PZNQwQkI+Ej+A+JVILNEDP/pz1kOiM2Xv4vUAqq5O/2Cep+U32geqOLZ9Ga36oUzFN1jPkqvQ61yjKd9wt0FfAWEN9CL77dVLLH0LEze4tZvTB94pyzE1g4jgG7jr21kNNAnqVSSjU1Dnn4xjoIc7FCPOxduQZCS5d48bJeY85liGVfSj0WgHjzP7lDXBcRBoALrWko9uXZLYg0yW2Sfa0ChElAUUyGVUDpoJT7OC56I/U7fP+Ma6nML7pNBbHlP+cS7opHFJJiTFF1gGxKr3DiG2q/0AsaM7rSkEWTKNFlb+AWwFE1z/BIbFYlDXQKT0tuVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6vgqR4RoQwuztUJqb/siUY7tTgEmE4Ogs26S4ZfMSQg=; b=F24CkoUUpbRkRzHLXilISJOj4r3PdcAXMy0RvZQXivcArxC19Gid1rzbn+wx4I/3Dx6GCNbf7LtJDQUmNn83MW5mL5UHjHZERF1c6usNqiz/J7biE1TR/CkXWiddenJ5g6YhVUS7RoyAzigM4FALLzWRTmNoevdVX8nDJHhly3QJXkIpv/QDfw2wPPuqxl3v0tXRrZGl9OlHvOO7AtH6jSVY0rUjvmxlz/cR9rUlb19oIIiVsHT09KtBLDPlUhiyuL9F/5n+V3LFvi5zVztD2Q3CyedAZbw/YAzkuvxL8BobYOaCr6v62n2rDScqiuM41G9mhvzFIPWcuuFZOVC15w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6vgqR4RoQwuztUJqb/siUY7tTgEmE4Ogs26S4ZfMSQg=; b=HQ9n8h1EBCtvlRYaClug3M3GVN3+D6o8E8XduGquA6yEBcpXlDVPwHYEngSgA/7AdrWKMO1+4PEKD3E+G7fn6PFrAoQuB5chqwCjE24ftoV0VhH1SNpA9aNtO5/A0/PTP/dTS99VAYaTiohz2RZU9jTtes9GDczMdG20dXRrPGsdenuxHw/6oO6oLcQAAg9I+8QKL3HlXT/X3DCKo4qZfRtXpkfihXcqmZ4DjN1KT2E5hqCnIAL+RE7RcpfGdUjho20jn3EAbXt7l7m1ZUCPOrxRblcLwIpGyH0EQWyY1siZosjY8ug6yDVQYRa/aJ+G/YRcY4QR0jyTdNZnFB0Rvg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MW4PR20MB4293.namprd20.prod.outlook.com (2603:10b6:303:184::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.33; Thu, 4 Jul 2024 05:47:51 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%6]) with mapi id 15.20.7741.017; Thu, 4 Jul 2024 05:47:51 +0000 From: Inochi Amaoto To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Guo Ren , Haylen Chu , Drew Fustini Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH 6/7] riscv: dts: sophgo: cv1800b: add pinctrl support Date: Thu, 4 Jul 2024 13:46:42 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [bNbiyOfaM9YNFGSP5+5h5HmmCS4vCjp+yyY6i7Ovakg=] X-ClientProxiedBy: SI2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:4:196::6) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240704054647.1747392-6-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|MW4PR20MB4293:EE_ X-MS-Office365-Filtering-Correlation-Id: f3ced59c-cd0f-41e4-536e-08dc9becd79a X-Microsoft-Antispam: BCL:0;ARA:14566002|8060799006|461199028|440099028|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: QKp2TL7w3kNSgbOYLn7fRP0rsql1/ZP7SDnfij/bUSozG3FFRCrv5VAYAs/ggUQhhxnuUDU5r+WWPRQ5UtYWMfJpYNb7NNqVHXOXoAL6/zg7tntLz1JInbR89wxEuTdgWqyrEakUqpSJnSESlaFNWLefXjBh256B//yerEO20ePraOyLjtEHWcR5rUbelLdOz02Y1rHIl0SimG116I/seCt7nZ87PWAl3RHIOg4Mzo7hbzxNy8GOjrxSBCZ7r5HyUsjNJDy388KCrf/S5ostcKioOotbdTEul7mi/Xtx1M0C0H8mkM6mdJmDI3XsjkQ08MDZLdOGcFkUWYoTZeZBSXcPHFxDKt1j3F1sVDPEMVewNMap1oCtVpfYn8PjO4ynAUn3c6iB6udKKtpT/AJBHT0H2MVYqqKvX88eScY8j0wQWPJ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7UR32WM24ufd4dvUrUlNaNjGaz2tG8VpmKWH4gsiTvGoqbgtgZTxLCZ65X8+rBr/FuFdwLChfqG+//YWuEtZjegxSnFnntMq6qGDEyAIZY35KU4pRmcd33cadhYlDSuQgppfpV0q277iAe/B1GKWGzk5Ty3SwFzWWve/Pyq4g9i2PEFp28CJZucO02GWyDhxPIq2ZAe0nAfGtjaIRRFaPnkyujGPFJcIYiNKBMWh5TgEynmYovEaURUKGDL4/wzYT9On5XP9LQYQ5taQzch9tNui8hG71QEdzmpFG6WZY9GuGqZlCk10IAG2vklmiWbLGah6a2FxuIDMeoTqy+pRIYbVsYwmPUJ0og/Ik9kfwViZqoAX3bgr+n7SElRo9qUwqPMSOOdpCmpqGkTIcObFAxjOAzjoIssu4H35rb60yRexxka3Gj55PNeI8z+dJuYvXEbeeeAIKJ4MblvGd1itDszEX8eb1nIqnOkOlA3 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3ced59c-cd0f-41e4-536e-08dc9becd79a X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 05:47:51.3031 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR20MB4293 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_224754_871497_84F3CE1F X-CRM114-Status: UNSURE ( 8.89 ) 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 pinctrl node and related pin configuration for CV1800B SoC. Signed-off-by: Inochi Amaoto --- .../boot/dts/sophgo/cv1800b-milkv-duo.dts | 44 +++++++++++++++++++ arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 10 +++++ 2 files changed, 54 insertions(+) -- 2.45.2 diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts index 375ff2661b6e..a099746f95ef 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts @@ -39,7 +39,49 @@ &osc { clock-frequency = <25000000>; }; +&pinctrl { + uart0_cfg: uart0-cfg { + uart0-pins { + pinmux = , + ; + bias-pull-up; + drive-strength = <2>; + }; + }; + + sdhci0_cfg: sdhci0-cfg { + sdhci0-clk-pins { + pinmux = ; + bias-pull-up; + drive-strength = <4>; + }; + + sdhci0-cmd-pins { + pinmux = ; + bias-pull-up; + drive-strength = <2>; + }; + + sdhci0-data-pins { + pinmux = , + , + , + ; + bias-pull-up; + drive-strength = <2>; + }; + + sdhci0-cd-pins { + pinmux = ; + bias-pull-up; + drive-strength = <2>; + }; + }; +}; + &sdhci0 { + pinctrl-0 = <&sdhci0_cfg>; + pinctrl-names = "default"; status = "okay"; bus-width = <4>; no-1-8-v; @@ -49,5 +91,7 @@ &sdhci0 { }; &uart0 { + pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi index ec9530972ae2..6a958b822097 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi @@ -3,6 +3,7 @@ * Copyright (C) 2023 Jisheng Zhang */ +#include #include "cv18xx.dtsi" / { @@ -12,6 +13,15 @@ memory@80000000 { device_type = "memory"; reg = <0x80000000 0x4000000>; }; + + soc { + pinctrl: pinctrl@3008000 { + compatible = "sophgo,cv1800b-pinctrl"; + reg = <0x03001000 0x1000>, + <0x05027000 0x1000>; + reg-names = "sys", "rtc"; + }; + }; }; &plic {