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: 810116 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn2060.outbound.protection.outlook.com [40.92.42.60]) (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 9BAB91A08DE; Thu, 4 Jul 2024 05:47:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.42.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720072075; cv=fail; b=EwVQ56UPH9d8nyHv1puZEMRD08xSTO3VowfnpYHYb/Ms79usJZ5zDiISs33cnhNpt3/gyu+/O9EHwtggKygE2eJYVgvytO+N9ksC2fF4D2ji2C12iPro8sXiKWTkV0goNtw1wvCSLQEUvuoKH3m2O2w8grryynAmI8ftge7MdWA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720072075; c=relaxed/simple; bh=7EXkwChZ63UJqzoRGabKR2gbVGn7fwypkUHSPKVsM9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=TvA/57jTGtFNNRMUJbxTC9PIBdzNYkWcL5AD8y8SlW36W6EXBy3cKk611fL7L7GCMBfdrC018aBIdZ1K1Vl9q6nJgWpRYMzcVTwN8DjXjsU3CFxNG+Cn6GHzGxYgw7SmKVv4p/TQnWdM0jc8PQ1NFbVB1KZ1MMFfzKCgue7tsvc= 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=HQ9n8h1E; arc=fail smtp.client-ip=40.92.42.60 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="HQ9n8h1E" 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> 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_|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/AJBHT0H2MVYqqKvX88eScY8j0wQWPJbfK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32WM24ufd4dvUrUlNaNjGaz2tG8VpmKWH4gsiTvGoqbgtgZTxLCZ65X8+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 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 {