From patchwork Mon Jul 22 01:39:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 814052 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2055.outbound.protection.outlook.com [40.92.20.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8646C1642B; Mon, 22 Jul 2024 01:40:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.20.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721612426; cv=fail; b=Dr4qaNWTAE0bxcqMyPtciUbt6zr267n0LtOXZg3JPGZQ5Cpj4GcqNqSgDmbrG6eDjNwd5ziwhFsvoIV8zZZQpsOb8jUdGtX5NCMAmTBvyrEwXrSrNE8UPQ+kkoKJP4QIIlOZ44NSpstqT5H94iAWiRiTXu6MIdlTvHkqXt7WX04= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721612426; c=relaxed/simple; bh=mKNcFXjZyHeRfsdDnmc48uVYaNn/fbMjnBMMJCNRw0g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Zho0k2CSwJkVHNII7cx3+Dex0QFwwI6GGb7VSgxkTA901oI6d4QNku8mca+iPCDTrpbl+Dn10baN+IvizC3nKM76sxcT3xlNfPUD4hqeTuQ/vQlFUvfBNc/8F49XOPzISeXYh2ehOotC1C/DAvvo/DMhcUWXwjA9knah6VJT9nA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=ElkXCvWv; arc=fail smtp.client-ip=40.92.20.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="ElkXCvWv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tmXPziGi20g6Nkmr1t/DRYdQBbhKocPjnmadALZZmzwp1QikLw4jHV70lUeicsKwqABJ2jvS5h5T22PCqcatmRsJagIDd7fglxNLgE9GvXQwXhZTSJKhF5nqx1wI4Q8x2+l1h6pogcVkJnsn7RYqv9Nx0WmTfw4W5INCSFdPdeUtuStbuy+ieAgUhoB9L+wWtTdy2FvDV5IJhzucZbAWFi44ybSx2Oaa6wcwLe5gmCptZEDoSqGykjLF7+g6vehCnnK+mrTfWmP1Kl0QpqMsw0+nbD3lwfPO+OdntJmhsrdEY9DnS4l/IA/I9cEFouLybZelFDXsNsbmi4+LhJhN7Q== 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=KADSTErtuwAYNLfw2e+mQTldxzCTuY0RDEhxiO/qFbA=; b=jRyrw2hpriAF/jPYPNsvf2USBhWMyLdD28hZkikeI1+4hP9pOnFjn3E9I6U9RjM3I5VunPLKIhLhkjo7ruMX/kqooUi3bXFcxJ/Lc0lTDZZ6hro74f0kcGQ8tG7/ECSSrjTnfgGAJLrm5RwEC3zIBRO90JbW7Z8/4bScT6wuabn0GZO6NEBd2Utmhr+Fn5M0bu80wbGE8nXAYcuAO0+oYnIN43Nl2BVIZZovN92BITj49+coAsjA8bpC2HfuxuchC+lOCaZlcy7Q3ZYkzW3SxUcPJ1WiYiBUgvJsV4r0MdVx+eazdPex7G1N51kRszRJ6ZGLqhUf7QcsazsF98IuHg== 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=KADSTErtuwAYNLfw2e+mQTldxzCTuY0RDEhxiO/qFbA=; b=ElkXCvWvjd9s1NiIDkpTG2B6R1Iq938n7PxcuWvgufm7g5PBCLqInFhc+1HvUR24qZ69e82tiL1bsD/S5swFFlIWJsldK/BM+opgAXFzxqIe4ASv8tBKovhoFMsw1iQlp8sdmZS35LijhDVaV9o/EDILJhRex7yIzr9iTbGaVvQtnMfsXIqSD25HN3WpxhWEBAZim5JmkydV8M50r4AsV1KgmjfJ2EULTckMnGuBPGSgzZE1YCQVw/3SMC+w9M+7TrCjGosN9q2AlmolADtgqjlrgp2rl/iIK7MlwHXc6LtS/hL65xKuDPvPiplkRcjIjA0oKd3hScgYZstfLLRCIA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by CY8PR20MB5403.namprd20.prod.outlook.com (2603:10b6:930:5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23; Mon, 22 Jul 2024 01:40:22 +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.7784.016; Mon, 22 Jul 2024 01:40:22 +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: Yixun Lan , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 6/7] riscv: dts: sophgo: cv1800b: add pinctrl support Date: Mon, 22 Jul 2024 09:39:25 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [VEhrLQ3W+WaV88UXVBLS1h1vTAnsImLCZLk4UEqTL4M=] X-ClientProxiedBy: TYBP286CA0027.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:10a::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240722013937.623685-6-inochiama@outlook.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|CY8PR20MB5403:EE_ X-MS-Office365-Filtering-Correlation-Id: bb8714c9-5bec-4b22-8c11-08dca9ef402e X-Microsoft-Antispam: BCL:0; ARA:14566002|8060799006|461199028|19110799003|440099028|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: oDGVg0+SKGZbRD0z2aX1Eafabm4yPdAGeWO7It6GWL5GoAsmaFRD7lZHWWIqfwH1Mz95KspmelYYFolaNliKZWlDIBX62eEj6h+oIJ2RDmEsAYgkedrTfl5oh6xjAu2eUNV/FpwwTs2/6fVQABYBLj5u/FnUsfvOGrZtMsTPZXIbMB15dKzKyTVRYN8lqRVZfvhWaN/VjAIUn0OEi2ZHJoIdbsea1ATW3pPI2FxFkeDSCxT6e6DTGegddOsxvoNCXBcoeaL8VrMDv31OA4TiFs7UZBmCA8awtbHmQQkleYp+oQUdnkxdezLUsN5rnLVQEejM1Qyvv79u6358J8YGYPg4Py/J/mNFRenGyStQz1h5O/Bq5Gs9f4SDE3H5Adlh2m5Giu+q7e7vbxoF+Yy1AVajT7HQ/pv/PS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Bbn4Dj6CX8r5v4T/fyf19OWeHaL8CGEIOgCGl3v5G5roycYmbKSe/AnhqhyYKDIWyK0V8hRyh7wM/cVGPmsb0EpiwQwYf0hQrjvyzlZGFbuU9LDJi3GMt0OB3O6VIlshL0r3Gj35l1hpklEqS40obmc3jUTCQiTkziJGnYh7N/5T7aPQQRqJIVTqy7/94ySc6W69fgqL4XbiCvmDi3L8kfo7G4vzIJ7d7abpA+lV0HMLpHn1b3DeaIankUDNilIG2xoxz+eL8rTUYMx4N7Z2F5fb0BFPNB+qzNeUOEhI+5K7fQrBna66a7SDU8hK3CHgeMkUG9QzY7Oq4+Yw67CuSaYGggkVNZPo95mYaSFdNDSOcpZoBF9mQ9n/0Ns1Sok33F2y92GCL5hiQTLlWEKDGmh6k6tbTx3k6q7IRcTgSJQkeNl/75s5lBIgIgGg7v5q0OXn85Rz0Hf91WOZYApAz6Nj/KIWb1j7j24Aj38iNUYCPfycrsnrW9OMcMXaSwUZ55CE5JK0geAfJCAvpbfTSMUQM+duyeIvqHInBFH X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb8714c9-5bec-4b22-8c11-08dca9ef402e X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 01:40:22.0384 (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: CY8PR20MB5403 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(+) -- 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..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..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 {