From patchwork Mon Sep 9 22:35:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13797654 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 8BA00ECE589 for ; Mon, 9 Sep 2024 22:37:30 +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=Z8P+aKTSR/gchn/C4tTwLbmEm85NjdGzULG9m6yGUy0=; b=d4jTZD/DIZ3olp iHt6/3pBZgJBzV9CT72HIwTGqHEyK+tuAYA11Qmt8j+K+Jb9PDoQocIAUe1lc/CujP+BBfxn7z+ge LkAKS2UgXX8DbGNz9fsfjxNm6tA7jc29r8jZZnETF2fNLyegSUtylfqWMW5s8qKfx/rpKClIJInCn 6V04u2gWY9Xfm6UqO00jlHhGcuJUQHj/1Ys0MorjmwgBWLd/ik2nz5RRYMd7FRCo2Q1I8/We1Zp5s cvYNv4c7OIcrHHJVG0OQi2lNPM/V69mHiftydZSET7P0r4v9OYmb/erv0hZlqviaTrwK8cJFBvYqM KpCE16lUtuTQfPuOw06g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snn0h-00000003V0D-2IiN; Mon, 09 Sep 2024 22:37:27 +0000 Received: from mail-bn8nam04olkn20803.outbound.protection.outlook.com ([2a01:111:f403:2c08::803] helo=NAM04-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snmzq-00000003UQf-0VY4 for linux-riscv@lists.infradead.org; Mon, 09 Sep 2024 22:36:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VyentPL6NMs9Naoci1RWZU3MlWzkrEm0A1O+0gBX42dga1zWWxAAXngeKpAWgpw7JwgP4HT8pH6ytbui0USMfn+beiwFrii6DxqC7Vf2ewhrwWOKQx+p+b1lGAMQGPzOBZfmI/rjOPOcz2fr5TefKGJb9U4UWG3AV8adjUz0eEzGTuHQIUmYB8oF6Td1ObvSLNdPRJPFMceRq+qJMmHSCAdsjAwM1mvFi0D2iE7SUCQ8zMMaZGBnrEbj2qNbu+Q6GJTv3eQWY8HjqHnNUsxDhnopS2Kf8sFQ7bUZCVVHNNF9k6V9a0f51cA5OGn/H9+ODP6r4KDUa2drlhzI19y9Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=tFX+B6+2JV/lJFkNZJ22XDLTbFXl6jO6eHRtuqk44og=; b=Wc1BuQ+kLE6PaPxJ30+SDDYUP4KKdmRcDh53ipeDmM6l6DHyk1MMF6BSCBT/qrO3NYzNZ9azYRIG0g2CtIS3TyEg+8gagS7RkSkQnJhQ8miVBPo5Pe+E60OXHFsdmi3u0cZ1+0F3q6wjLqswsbn95LbfY4iqE0t8vs1GxQKg4KTdQt1NWoZB1vDfsx3Vny4UR0FETMtmwWnFLQwO8pKMe5LW3pEAc+COYpW6Epb1daeSqIvboUDDpyNX4lqc55unuMRh3b5FpLjvhr1u2+bs2qHMkY5Y8O7oH0AYBTVasFwmMM1Ibk6oARHjYd8W/pYGTDpyFCawoEhrvyA0qubM2w== 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=tFX+B6+2JV/lJFkNZJ22XDLTbFXl6jO6eHRtuqk44og=; b=NY3+yq3pglNdAo2vv7Wn9YRf56JWCfTCM8Ai6GZAjuOwICWsG6HrZEiDOZmqw6L3C3xqibNIzibsKFuFS6q8/x6UpDOgRqpukZ7KvS3bJbBfa2Vxp6yzfQYDuikk0JL74+c/mI1v9VZudM3OI9wRaGPQG3umBGVv9l/iTjT0CVNsh1Bu3jUkLFCPrzdU3wN82u3Lja4+a2zRWa0Tw0mG/x+enLoUT3oxMcaa1VB/fBMMM728q0fmQrPfh+gzwc8vpbeEGroYkeeDKpXk1AWNXUYrbhEI3HWOUpiz2KiF+zdHQc7tOcjsMJ7EfNVmssgfYsW5TXSXMiRDMaRbL0nYaQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH8PR20MB5195.namprd20.prod.outlook.com (2603:10b6:510:1c6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17; Mon, 9 Sep 2024 22:36:28 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%5]) with mapi id 15.20.7939.017; Mon, 9 Sep 2024 22:36:28 +0000 From: Inochi Amaoto To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Haylen Chu Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/2] riscv: dts: sophgo: cv1800b: add pinctrl support Date: Tue, 10 Sep 2024 06:35:10 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [J/2BGSXaf/nDXG1h5VFEoxcCSR0UqpJJlWRiDqcxz9g=] X-ClientProxiedBy: SG2PR02CA0023.apcprd02.prod.outlook.com (2603:1096:3:17::35) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240909223511.33713-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH8PR20MB5195:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f9b5649-5445-475c-b15b-08dcd11fd870 X-Microsoft-Antispam: BCL:0;ARA:14566002|19110799003|8060799006|5072599009|461199028|15080799006|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: rB7PHSeGDiQ2LCIyJ/4Q1ud79Ac4Qv+aKs1UysU+g9BK/RtIbHQVo0Rf3sqVB6CggwMrnS5X5BTtnj0mWpk9Wsw8gCF9CdwYdAV1OH5jwtIzJej+1a7dve/okuC1tZQ+H9daOG5tAIDo4NuH2808JjeOtt7yEZcKvwm+Vz9KY5HTpjNwEGVrCFhj4H0g1CDJKoosKP1P+xWnLqaABRr2Zpc2TSRouQBmPlhKbSy/EPJTu0NCG8s4u8OBu54irbND5Hie6vm/fGLoY5mtTGgeMg8mxsO90uxJCbeUFsFQvI/A3hHQ15xEfCAQstExzZx4bKyindKADA0famnM/w3UXGMaBhu0XUfRfXs3LFXL4WBdQRzY0Q9hFCGKTmYsBQlu7JDHA63EhslbqxRslSBs92oo3xO1WaeZTzew+p/OiRO63MYd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o4G5lj17WYElACCZdrWU16E6821QhLHpFLaxh9TmjC6TVHfFX1NH1H5aUur7unV8NLCLyipUpMdIKtRKykplEVwp9CU9UQfsqnub4+x6tIlvv1UNfb39Y/0hGs+h9Us9K5DlgV5j6wpNA+Q6O5DLnawd0g8JzEgQgMA61YiC1OMpGOTEKDDXgX6ueV7RFCtLLH46pq0kevw7DeUq+gUTLE3+YPTQpwbI3tXmfVgTn2O2T8TXOlTgUZFztXb7GqWVdCuBSpzmd77d0gVU27/mkywmTmgtVwHQ3Y5MaPUuIE1cTUNtSC6IJI/BY0dqMJ2P1GJNdDPScKiY8+zSMkXmmvAZe2CdsPRPlZ1xJ6EdUYHaPcQPIUFcjAT6g0OAoI4TX/a+W8LJP4PZO80V0u3vrU80eRPTa27LT8/dmYFiG+GsZhxMA/zE33+OJl6QDzXTkoKUXwLXD4YFASU/lLeB843949Dt3q+oKYGTOMTJsVJZsmoqTyOH+n6buiLtmaz9Ep/J4C/skT+jIjBDNOGm2m0CDrtAMAEF6WiKD9qOELpxDAo/boSa1QwGYvhzC1qaopQr0ISHpK/ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f9b5649-5445-475c-b15b-08dcd11fd870 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2024 22:36:28.6902 (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: PH8PR20MB5195 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_153634_190793_1A7E0E9F X-CRM114-Status: UNSURE ( 8.41 ) 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 | 49 +++++++++++++++++++ arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 10 ++++ 2 files changed, 59 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts index 375ff2661b6e..9feb520eaec4 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts @@ -39,7 +39,54 @@ &osc { clock-frequency = <25000000>; }; +&pinctrl { + uart0_cfg: uart0-cfg { + uart0-pins { + pinmux = , + ; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; + + sdhci0_cfg: sdhci0-cfg { + sdhci0-clk-pins { + pinmux = ; + bias-pull-up; + drive-strength-microamp = <16100>; + power-source = <3300>; + }; + + sdhci0-cmd-pins { + pinmux = ; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-data-pins { + pinmux = , + , + , + ; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-cd-pins { + pinmux = ; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; +}; + &sdhci0 { + pinctrl-0 = <&sdhci0_cfg>; + pinctrl-names = "default"; status = "okay"; bus-width = <4>; no-1-8-v; @@ -49,5 +96,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..aa1f5df100f0 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@3001000 { + compatible = "sophgo,cv1800b-pinctrl"; + reg = <0x03001000 0x1000>, + <0x05027000 0x1000>; + reg-names = "sys", "rtc"; + }; + }; }; &plic {