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: 13750979 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 E7F81C3DA64 for ; Fri, 2 Aug 2024 00:36:38 +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=WBeIKAZhu89zA1dUCyZc9Nap1xSfRjFXvdIBU6HpHTY=; b=Id2yxBUQXNOitg wyZGAVM0esGnMNlRCiFWuYbRilZehBjI785nAJDld9VmpFndt+d1zUECC10CR6jCnDYKopNBopQjd qXX5QYIR30zc+Zs/w4kPpNzx4d8vV27oFGFdZCXsLHclkCGdaPSldWg4cIQnaZE9YPBQLgSpRZwk+ 0Xct5BfRZcfdBp4sIgXtNUKAgUqjX+2RkleMdXhIp37lKCRFg40eWDKoi0RZK1qcc7j8eLx0wo4l7 SZ7xuiBvWXkn1l/NWlce90IREBHqL069yo+jP7CmzmcXapdNiCOCih4LtsfAfSlBh1BBQK9apHn/j RHhoQR8Z/crbQrxHkIKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZgHb-00000007B43-3Pax; Fri, 02 Aug 2024 00:36:35 +0000 Received: from mail-mw2nam12olkn20816.outbound.protection.outlook.com ([2a01:111:f403:2805::816] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZgHX-00000007B0m-1oQj for linux-riscv@lists.infradead.org; Fri, 02 Aug 2024 00:36:33 +0000 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> 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/Vw1BseKrXwHi44TITeI4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qVw5uDtOI631/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240801_173631_526989_A08BA6C5 X-CRM114-Status: UNSURE ( 8.68 ) 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(+) -- 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 {