From patchwork Fri Aug 2 00:35:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 816659 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2097.outbound.protection.outlook.com [40.92.21.97]) (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 BFB7C127E0D; Fri, 2 Aug 2024 00:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.21.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722558989; cv=fail; b=UwcrydSTopUbMip2CoFRv3DAgMzwFftZnJO45xc4EqoOiSMVjBogV3Yw6gFfYQPwNo/TnpUsFqD4IaN5uhrTnO8KYXyVu8kaOG34feK05gIs06C49LG4yR0V8DHQCC9CjWS1oU7zUlepGfDj8yZvQWC+WIOkdAUq+CjV2WdqL/k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722558989; c=relaxed/simple; bh=6vKkz3dmy+9IV71OpaaLhIgsMoOTeMEs+yBUcfdeYKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=VEf/QawNdGHgnUWB33vH+6T3AAA3GaeVB4zL/E8NgWtYeqmUYKWo7JLnRuIC/5fV9rZjcdmXbIrX/LY7Y/7SqbUtE9PBjAXFten+sGrLH0r2ifFXK/GgZ3LOjxCv8UHbY9vAJF2357RswXMJ4moN0IOr7UO4PmsAmZYqOXYAmRQ= 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=U9/W0mtu; arc=fail smtp.client-ip=40.92.21.97 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="U9/W0mtu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U7/YWGh1p0N4DsnOeljsDkWnaMNByZn1EZCNg4DGgTIuqBnJVFmbbOohVErruX/QWNTsMOh/LLedCXdAw4ZUI/sRDGXEZ0k0NzUehVq7rUSEsUXLMaQ/O8OAyvYXhaVES8fR+FvnBUOTnDXpQQ+La0nz5mab4uUincuU28JbNdtrmp7bfP4IHQKjEiAqfDga8pBm+alM2/nGEeemrZ7LAqRGeuILD9JlrvH51iu8Q804j6zl8lFh3mBxJWMPTf6jGWGky8ukkQpPzqDWqh8Yw1kJqdeSQITGJrYsBAcIT0AhtHF9JAOHLNLwub9LCiHU+ZO3b6HyFhkAQbHU/5ZUvA== 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=5tMdoJKUcFhW9N16PjBtXK4Yy/yKi0NCQNR05/20ius=; b=tAh7XqBWagfIk00ve9WVe1nZ+Fm2cI4tfuRckRsJuZ+XRxiUyxVYDcYPVqAK4IUWQ7S7h0/wslXJ5XCRWTNvlxroJVWSp+Gx39lXwcOlzTCHl3VK03jxzCyXRTmvLjxHg/wAO+4W8u+JHbxpJeRL6CqAeMZDJuiF+b1AjHiWZBt3oa2u8NnjPEacV+gn3q7WI6gys22N/8jTKEvDy8rhaSItKGEWDxL9sURx8r7tk3rRU611aT2tJPFtlPUSq64xm82UcyXc4MWB+Gr8qAhH0rQnx6jG5ZKPng8Xxzst+QHsCUf4Lf1XfSFgcM1x31ks3q+/uZZiZpaS9oww5Y5v7g== 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=5tMdoJKUcFhW9N16PjBtXK4Yy/yKi0NCQNR05/20ius=; b=U9/W0mtuohcr46jpt0ptBc78F0ofCehulCI0F0DbfgxVd4G0e9LUcio3uZcV4dwQExDvdXtGBrFncwXTRiaKT11jB/nLjg6BD5Vp5scQnxW5ABBr92pPOZDvVR6hTy5IEcxPDqXwmVQb+bQh3GX3RJVOqsjHac6j8p7JMRNXsIAp7vVMPP4lyi1MlxoZKITJikhnqOMBtrVRdEge/wcfewKoEYGz7sIDurqmN7fgKlzLmE1yoKca7klMUXKLrXgtdWygRJbCT9h+Lwx3gkCYOFn+swzF54oKzDqrEfKp2us4ibQqAipLh9ixv8vq4dnvuDS5i/kDxq+EzBc2R7ym2w== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH8PR20MB5220.namprd20.prod.outlook.com (2603:10b6:510:1c8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21; Fri, 2 Aug 2024 00:36:23 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%4]) with mapi id 15.20.7828.023; Fri, 2 Aug 2024 00:36:23 +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 , Drew Fustini , Haylen Chu Cc: Liu Gui , Yixun Lan , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 6/7] riscv: dts: sophgo: cv1800b: add pinctrl support Date: Fri, 2 Aug 2024 08:35:21 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [5LCZy/tPPtjqoLvatJOaO87CQnqfrG0S+as1INjabtU=] X-ClientProxiedBy: SI1PR02CA0050.apcprd02.prod.outlook.com (2603:1096:4:1f5::12) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240802003525.260055-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_|PH8PR20MB5220:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c857116-7cf7-4f88-cb72-08dcb28b22b8 X-Microsoft-Antispam: BCL:0; ARA:14566002|8060799006|461199028|5072599009|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: 41XGmoawwWcysPo+VCW16MbmeOV+hz6VV4hIcFGVbYuDx0SK69z6kdZ1kNQf9Ajo5YV70s90GToSB62IcDMWXJ0oiaZWJ9UtcWCSXQ9MrR//r0YaRkRBHrashI7XsHfyazDzHZSNrj62Ff6Da5afKnkytqk/tRjCqESWWobetd+vtDjjGK8YF1Xq9RsESDMXW7vi6CeWcx/rVb4sVMMgmc6ZVcr7JHekaUzJqxWAQpQxJ7LhwRJwB+NjRPag4iF7RUvPidaQRsqJ2zHSziLMi822DEHXtRIF0GBkSxi0PHRTam2y0+W0JaIVnyruCoqCAlhi6AkKyEJz368mqZ14BBiEjKNGgjkObAWMWYPrG+OqvEQezrMgL8rCHAtmOF3hxMYdALX9N6/Vw1BseKrX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CXiuK1PU21qVw5uDtOI631/PtjshMeCkXWRctdS1BS0imjS/Dvp12z1iI6XT7fcui0mGPhEsbo8Mfezte2pnNzBtc/ZFoSGGekbrqRt4DPw7TJ853U9r1i10/+k8yyvv+ViTwXOT5m7smhlZm5k97mi57nr7sbvoqeQO1QBweDgVjmPuCeeYHGnPgkP4kk/rGoNbu3cZ57XiMAzQWErD5/HhA8HnZb3hGhCcCa/hDoIUH+HRv26NzHZwdJ1Ca1jWAK6+3KnTn54zsIzHYgtLmocqllcqY0m9Tu1n3w+XEgePN70mwONaaV6E3O30B2AwAgnns3owyxHVWL0lBykqOUWSz1ubZR7ai31m8sUE6aucPtqvNvNp1VBH+laRzaEvK8+BacEz1QKYh3vPfNs9QNxBUsD88/KSmQxSaaNgiZvu2CPTACIVTrItOfxowwDdsQF6CCG9kw+LhqxS+wJwyzlCqy+pgUxl5dp931vUcuVCDMT9+wiCb0ZKhyfvGsTjiurTpxdVydfqTVDF9zCDs66QKMOCFAyGs1o1Ow8kTcFbpbnumt8YRAmuAEK0J5KrPD X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c857116-7cf7-4f88-cb72-08dcb28b22b8 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2024 00:36:23.4417 (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: PH8PR20MB5220 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.46.0 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 {