From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on2097.outbound.protection.partner.outlook.cn [139.219.17.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 8937F3F5BD1; Wed, 3 Jun 2026 05:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.17.97 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780466123; cv=fail; b=VBn9awYBT2tiXxuPve5Ba+Wq6RDDMri1k0FbZWMfCNdfutMw6Z9Wdotxc7hbxd4PbnwzaMz8CBxWaVNBvs8cm8J+fbLI/FMl+GWz2r7myV2KpSf2tBre4C4OziiVxopVL5GJhM2jXodek4xHzHN8Is6wYFsEOvVfmBKFFzfbbvk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780466123; c=relaxed/simple; bh=WcaeBVZ+anQdNVRJvzRgJY0Mos+n656WVnBU0YbKTEY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=J+Mu6DKAtbrThIG5rGPiRbDjXN/jvIqX58keksAPODikB0Vmk2rxWDLacGtqLJr7E8mQ1ZqmPjSmFGb3KvuKRTtuBHMukYBu52T4Y2yDyfEYk++zjgotuin4CVZMWycWCOvl4wWfR7YLkK3pfqOhXb4usyypLekcmSXdI/eRx8k= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.17.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ap18XXOlBcNwLRgFBRmlaV31K8xGXb6yPPyXHuDvTi7C9XRCMf/FOOKWwJaMzKNtyclWWvF/eUvk5ZrQsFjQbF28YDSRTMef0+zecxpRLgMnhGBo5Qtb+NaHw02QvdYt0hDIZz8L6YJf8w0AIaFXW2Zef18r88QJUG/4/FsMDzb/Vh+6+YUrfGaDXGnkZlrY3FFRlz7zlDGSfkyKqTL44cDSrKU37VdqWV6OTQ348B7R/HFaW/0q8qMIzljkt3xZoL7PYldbDE2MDm/06fbZ0dHIrd/sflluQSDuZm2nBQoomXwIfrcvcX6qNAe35piJxTvmIT9VpRQyn6fAxCVbeg== 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=P5Vz/tqPBf7eBDlhCEzjV9yQK6baBKgeG2863hMfo14=; b=P/IsSnyWnWCXGMBnw2vpL7LIz0Qb+TYthGzb9hKQvV0+0HSXtmf3eJLn+lL5FYGaeeew8tcEezX65uNyfPFY4S8R02zpAtNlZlfc15X9hEcndVqTly+OuKSaeYsCaJ9pr47t67+yngShSO9y9fPxORPzbdzuB+iQdC5+UYhcU46Ua7+xLkI4YJ5yXPoEZQ6xuWUbLe4C33Lm1Ucn9yRW8IQc7O5Ob/ObelgkEWCjYlC0muLd9pwB8jcl3pIHzkKAKT7M0Pb9xGVXIFHm+ShoKrQhiI0571kKmLk5dYzxVvkCs/gV1LjOMViMB4DCSKCGkDgZYSbLGlr2CQfqp0xhvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:17::6) by ZQ4PR01MB1153.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:13::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.7; Wed, 3 Jun 2026 05:54:09 +0000 Received: from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn ([fe80::e7d4:256c:b066:850d]) by ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn ([fe80::e7d4:256c:b066:850d%5]) with mapi id 15.21.0092.006; Wed, 3 Jun 2026 05:54:09 +0000 From: Changhuang Liang To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Paul Walmsley , Albert Ou , Palmer Dabbelt , Alexandre Ghiti , Philipp Zabel , Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Lianfeng Ouyang , Changhuang Liang Subject: [PATCH v3 07/21] dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl Date: Tue, 2 Jun 2026 22:53:33 -0700 Message-Id: <20260603055347.66845-8-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260603055347.66845-1-changhuang.liang@starfivetech.com> References: <20260603055347.66845-1-changhuang.liang@starfivetech.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SH0PR01CA0002.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:5::14) To ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:17::6) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQ4PR01MB1202:EE_|ZQ4PR01MB1153:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c23c643-1bac-40e8-3546-08dec13487b8 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|3023799007|22082099003|18002099003|6133799003|56012099006|38350700014|921020; X-Microsoft-Antispam-Message-Info: kQ2ri6br/3h/K8+MoP7DksCM7QXNE9QNXQ/A4NVCU7egDKhy1GdvHWvRgQj52nMBUE7C6uIZaguPjeXE0zy5vfVdp9aRqtO2Fb5C8rMA5DhnrVFAvF36MMyZ/AH2B8pgcLlAB6mA4i9oMZUTL88SvSVOfvGkaIo2ibGj26hn5gZazcymGq/bvGQ4R40V3rCrjwwwaTklneuVKo6dEhxIMV6MrrOpXMSH94JXe+PVx5u2HAZBfuqwiGtEYXOrAipZfsPAMmo+34uBApPV0DyVHAkKmzuS5bMMciumL9q7hX65RHXdSVTiPkn7s/jJAevjvlKG9JmhJowUGpxeG/ulDktGg2LTjXx0u+2z/dAifMDSraKTa+UD1gwvQqiT2I5IEuUDdg5pN5AH5FT79Ppbyr1KgvqUSr17gHx6ks+6e5PWuTKjjMQOlChiZLXi2qeNbvyEmW54jcUW6Uv+uguF2tw9UpG6MJpzP5V+qzI+HfnmFmoU8ujVGXXlb55WbuXjJBuwifz9H7cbjLhBHhAUamEbBnZpLEsOyaQISwbI7Mwvtk9QlWUBPjh2eq2hwPpWgubgjiA5Ucb/u36KT/avBg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(52116014)(366016)(3023799007)(22082099003)(18002099003)(6133799003)(56012099006)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9Ue4k4guNG8dEb85fEE7gO0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pskjx8iFG3kg139ma1TBppuYW2?= X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c23c643-1bac-40e8-3546-08dec13487b8 X-MS-Exchange-CrossTenant-AuthSource: ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2026 05:54:09.3534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SLzJor+PhP6zDIBjf9Yk4BMMKN8NGk9kL0Di8Mu1LCGzMx6JTJQzk/F+BYBAucWBEq+ZTc9x8Bt2TLxK8t5JNFVT4DBmfn840B5rhg/7gl7MdP4HOIVWQ+BGMES7u/Kg X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQ4PR01MB1153 Add pinctrl bindings for StarFive JHB100 SoC System-1(sys1) pinctrl controller. Signed-off-by: Changhuang Liang --- .../pinctrl/starfive,jhb100-sys1-pinctrl.yaml | 161 ++++++++++++++++++ .../pinctrl/starfive,jhb100-pinctrl.h | 10 ++ 2 files changed, 171 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml new file mode 100644 index 000000000000..54e7f4b795bc --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml @@ -0,0 +1,161 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-sys1-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 System-1 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "sys1" pinctrl domain. + + The "sys1" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the SYS1 Pin Controller, there are 8 multi-function GPIO_PADs. Each of + them can be multiplexed to different hardware blocks through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function which is generally the GPIO function + (or occasionally, it can be a peripheral signal). + Function 1, 2, and 3 are the alternate functions or peripheral signals that + can be routed to the iopad. The function selection can be carried out by + writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds. + +maintainers: + - Changhuang Liang + +properties: + compatible: + items: + - const: starfive,jhb100-sys1-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 3 + + gpio-controller: true + + '#gpio-cells': + const: 3 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds + and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ espi, espi_reset, gpio, host0_port80, host1_port80 ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 4294967295 + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow (half frequency) + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_sys1: pinctrl@13081000 { + compatible = "starfive,jhb100-sys1-pinctrl"; + reg = <0x0 0x13081000 0x0 0x1000>; + resets = <&sys1crg 2>; + interrupts = <58>; + interrupt-controller; + #interrupt-cells = <3>; + gpio-controller; + #gpio-cells = <3>; + gpio-ranges = <&pinctrl_sys1 0 0 0 8>; + }; + }; diff --git a/include/dt-bindings/pinctrl/starfive,jhb100-pinctrl.h b/include/dt-bindings/pinctrl/starfive,jhb100-pinctrl.h index 38d5a94e92e3..30704a5a3418 100644 --- a/include/dt-bindings/pinctrl/starfive,jhb100-pinctrl.h +++ b/include/dt-bindings/pinctrl/starfive,jhb100-pinctrl.h @@ -28,4 +28,14 @@ #define PADNUM_SYS0H_GPIO_A14 10 #define PADNUM_SYS0H_GPIO_A15 11 +/* sys1 pad numbers */ +#define PADNUM_SYS1_GPIO_A16 0 +#define PADNUM_SYS1_GPIO_A17 1 +#define PADNUM_SYS1_GPIO_A18 2 +#define PADNUM_SYS1_GPIO_A19 3 +#define PADNUM_SYS1_GPIO_A20 4 +#define PADNUM_SYS1_GPIO_A21 5 +#define PADNUM_SYS1_GPIO_A22 6 +#define PADNUM_SYS1_GPIO_A23 7 + #endif -- 2.25.1