Message ID | 20231011090510.114476-1-ychuang570808@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp397061vqb; Wed, 11 Oct 2023 02:05:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8saLdv8TsoQtoejIGSl2mwiWpYAetKzeKapbAbtLaQwzx8qV9qaa7PjNypPmdi+ydVH1t X-Received: by 2002:a92:dcce:0:b0:351:54db:c1bb with SMTP id b14-20020a92dcce000000b0035154dbc1bbmr19934602ilr.0.1697015136911; Wed, 11 Oct 2023 02:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697015136; cv=none; d=google.com; s=arc-20160816; b=b495fCqZDRaYpjepHifJz1hHBo89WbBJHCuFYSx1Da9fpwpWPJm8eOs+tDCYBsxpuR QfrRNYpFm8z4AVJgNyjJSvUAMj0ab+R/fPhVe0m9Io76oIkDl0S2Z6XIUK4OrBN1wHT4 63Ut/Hmj2DIf4TmMq/YMSKyLbyZyKHZ0u2yF4nPqO+BuWY8OejlyDJOINw6cW/l6WgOa VDO9iSE6XEpMID5P2QDm9epJZUV2/A2ypfVXldxEwi7XF0devNdQRKSj4tyHD2RHPT3+ 31PqcDDe67m2eezanEaGjFWQQxSdTOdP1z8AESh71JYGJlyujM+qhHGQhAFfKJj3ObaX wM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bosxL+8et3E8ZP6PazhMinI/ihrJEatAni1oUF+fH1M=; fh=RXcrNhDULZEFnfui821EQfgSlaEVBcyXlNtZpbKsIMI=; b=QzwpkW8nsWywbhAx25rvfGJ7Fbcb6S3aZxnxZT9C9nVjdugR+qwqn9Zod3KdKDrb1p DkCB3ZOw2liDGALhSacekqPo2Fybo+LlSD9a3dZYBaEeLJ4dzy6+1gKrAfl2Y40Ds63K zEdsgUJZ0qNzbM2pnYdohGpC2ez/H26RwshbYOf46F1E5HG2QD4ANuu+PHwRYE3JrcPW EmMMZfXUHWxWRsuzrsd9rKuThFmZZ9D8NKHdwRSPhQv6BHBv68reOLeiyaxVYOE8SfRo Yn3OSZA/OYNpa2ZN0tn1VaTBV9rKDe/MffIDg6TPmPT1aY61MF48sR1PQ18bKtTNH1NG JJDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BUSPYfck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l125-20020a633e83000000b00578b8016c40si14821688pga.93.2023.10.11.02.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 02:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BUSPYfck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E4C0A8113EE7; Wed, 11 Oct 2023 02:05:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjJKJFS (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Wed, 11 Oct 2023 05:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbjJKJFR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Oct 2023 05:05:17 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E831F9C; Wed, 11 Oct 2023 02:05:15 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1c9b70b9656so11441385ad.1; Wed, 11 Oct 2023 02:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697015115; x=1697619915; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bosxL+8et3E8ZP6PazhMinI/ihrJEatAni1oUF+fH1M=; b=BUSPYfcknw6g+HNqoRxtLfV3bXxrgwSPpW0rDeSfMHpUM2mDAGtFEXDDYoBfylmq5I Gv86MjILpst/+/FXOZP4GdgZY/NbjYApqoS8w6O1PVFzLdZScWRi437GNBzAQXLt/erz 8/WeUGCRlpBQovRrbZIVld/FqLFlYgRzn+R6ow3qa3Pwlhu8VW9NQX9wflwr3wvJ4Acc 5D6pi7gJWAGZtywB9iME5CvcX/iinmV37kOajQwQCLb0bFJbYViqwJKcFShG3luoekHE 2Bg+8C6jAum3upUGo54I3KaakhInjuHkZM1iL0JFKuJgRuWihRYBm0Ml/duHzFpP2BKj e7vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697015115; x=1697619915; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bosxL+8et3E8ZP6PazhMinI/ihrJEatAni1oUF+fH1M=; b=QPcua4p0l8yZd+kVyKj8F5lp+dfOSAipGH8Ov2h5VP/0Qs0yhfkNEKSWkcQEXesDxf ppQSX6PxnFJr8RHAhBVQoaF1p8w+/zA9QONnerT+LSWokvZ1xjhz6j/p8a+ujM0pJbTt Zp6MBts9YOwHBVWpcAed2zoIgMUIfFjLp+g4evNA0cERVoSincorja/hGkFXTEkJsMlX gYdGlMbpwsTjtn7DV+Ams2qJvz4locl2wngcBRpDBxlHVcMplcXaQFerwbHdNuDNnS7H gY3gYmhrWGdfoLAtY/TrEdQCq4W4lK2heR+98DbwaO2Mld93c3XAdPoa8mlsGoF75Gww gdXA== X-Gm-Message-State: AOJu0YwyYpNvlxik6HDrYN3q2zHqb4FPcfYjAfi8O+2gfTqUTbA4TCpn M1lQXsb7VfEY1xlL3/xDd0o= X-Received: by 2002:a17:902:e743:b0:1c8:a132:a00f with SMTP id p3-20020a170902e74300b001c8a132a00fmr10865378plf.12.1697015115383; Wed, 11 Oct 2023 02:05:15 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id z18-20020a170903019200b001c61df93afdsm13346699plg.59.2023.10.11.02.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 02:05:15 -0700 (PDT) From: Jacky Huang <ychuang570808@gmail.com> To: linus.walleij@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, j.neuschaefer@gmx.net Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, schung@nuvoton.com, Jacky Huang <ychuang3@nuvoton.com> Subject: [PATCH 0/4] Add support for nuvoton ma35d1 pin control Date: Wed, 11 Oct 2023 09:05:06 +0000 Message-Id: <20231011090510.114476-1-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 02:05:34 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779449344459844155 X-GMAIL-MSGID: 1779449344459844155 |
Series |
Add support for nuvoton ma35d1 pin control
|
|
Message
Jacky Huang
Oct. 11, 2023, 9:05 a.m. UTC
From: Jacky Huang <ychuang3@nuvoton.com>
This patch series adds the pin control and GPIO driver for the nuvoton ma35d1
ARMv8 SoC. It includes DT binding documentation, the ma35d1 pin control driver,
and device tree updates.
This pin control driver has been tested on the ma35d1 som board with Linux 6.6.
Jacky Huang (4):
dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management
node
dt-bindings: pinctrl: Document nuvoton ma35d1 pin control
arm64: dts: nuvoton: Add pinctrl support for ma35d1
pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver
.../pinctrl/nuvoton,ma35d1-pinctrl.yaml | 180 ++
.../bindings/reset/nuvoton,ma35d1-reset.yaml | 3 +-
.../boot/dts/nuvoton/ma35d1-iot-512m.dts | 83 +-
.../boot/dts/nuvoton/ma35d1-som-256m.dts | 86 +-
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 175 +-
drivers/pinctrl/nuvoton/Kconfig | 22 +
drivers/pinctrl/nuvoton/Makefile | 2 +
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 1239 ++++++++++++
drivers/pinctrl/nuvoton/pinctrl-ma35.h | 50 +
drivers/pinctrl/nuvoton/pinctrl-ma35d1.c | 1797 +++++++++++++++++
include/dt-bindings/pinctrl/ma35d1-pinfunc.h | 38 +
11 files changed, 3665 insertions(+), 10 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml
create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35.c
create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35.h
create mode 100644 drivers/pinctrl/nuvoton/pinctrl-ma35d1.c
create mode 100644 include/dt-bindings/pinctrl/ma35d1-pinfunc.h
Comments
On 11/10/2023 11:05, Jacky Huang wrote: > From: Jacky Huang <ychuang3@nuvoton.com> > > Add 'pinctrl' node and 'gpioa' ~ 'gpion' nodes to the dtsi of ma35d1 > SoC and describe default pin configurations. > > Enable all UART nodes presented on som and iot boards, and add pinctrl > function settings to these nodes. > > Signed-off-by: Jacky Huang <ychuang3@nuvoton.com> > --- > .../boot/dts/nuvoton/ma35d1-iot-512m.dts | 83 ++++++++- > .../boot/dts/nuvoton/ma35d1-som-256m.dts | 86 ++++++++- > arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 175 +++++++++++++++++- > 3 files changed, 335 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts b/arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts > index b89e2be6abae..ff0d2bf8f5bf 100644 > --- a/arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts > +++ b/arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts > @@ -14,6 +14,10 @@ / { > > aliases { > serial0 = &uart0; > + serial10 = &uart10; > + serial12 = &uart12; > + serial13 = &uart13; > + serial14 = &uart14; > }; > > chosen { > @@ -33,10 +37,6 @@ clk_hxt: clock-hxt { > }; > }; > > -&uart0 { > - status = "okay"; > -}; > - > &clk { > assigned-clocks = <&clk CAPLL>, > <&clk DDRPLL>, > @@ -54,3 +54,78 @@ &clk { > "integer", > "integer"; > }; > + > +&pinctrl { > + uart0 { > + pinctrl_uart0: uart0grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPE_H 24 1 &pcfg_default>, > + <MA35_SYS_REG_GPE_H 28 1 &pcfg_default>; > + }; > + }; > + > + uart10 { > + pinctrl_uart10: uart10grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPH_L 16 2 &pcfg_default>, > + <MA35_SYS_REG_GPH_L 20 2 &pcfg_default>, > + <MA35_SYS_REG_GPH_L 24 2 &pcfg_default>, > + <MA35_SYS_REG_GPH_L 28 2 &pcfg_default>; > + }; > + }; > + > + uart12 { > + pinctrl_uart12: uart12grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPC_H 20 2 &pcfg_default>, > + <MA35_SYS_REG_GPC_H 24 2 &pcfg_default>, > + <MA35_SYS_REG_GPC_H 28 2 &pcfg_default>; > + }; > + }; > + > + uart13 { > + pinctrl_uart13: uart13grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPH_H 16 3 &pcfg_default>, > + <MA35_SYS_REG_GPH_H 20 3 &pcfg_default>; > + }; > + }; > + > + uart14 { > + pinctrl_uart14: uart14grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPH_H 24 2 &pcfg_default>, > + <MA35_SYS_REG_GPH_H 28 2 &pcfg_default>; > + }; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart0>; > + status = "okay"; > +}; > + > +&uart10 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart10>; > + status = "okay"; > +}; > + > +&uart12 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart12>; > + status = "okay"; > +}; > + > +&uart13 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart13>; > + status = "okay"; > +}; > + > +&uart14 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart14>; > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts b/arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts > index a1ebddecb7f8..c8c26f37116b 100644 > --- a/arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts > +++ b/arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts > @@ -14,6 +14,10 @@ / { > > aliases { > serial0 = &uart0; > + serial11 = &uart11; > + serial12 = &uart12; > + serial14 = &uart14; > + serial16 = &uart16; > }; > > chosen { > @@ -33,10 +37,6 @@ clk_hxt: clock-hxt { > }; > }; > > -&uart0 { > - status = "okay"; > -}; > - > &clk { > assigned-clocks = <&clk CAPLL>, > <&clk DDRPLL>, > @@ -54,3 +54,81 @@ &clk { > "integer", > "integer"; > }; > + > +&pinctrl { > + uart0 { > + pinctrl_uart0: uart0grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPE_H 24 1 &pcfg_default>, > + <MA35_SYS_REG_GPE_H 28 1 &pcfg_default>; This does not look like generic pinctrl bindings. Looks over-complicated. From where did you get it? Which recent bindings and drivers where used as an example? Register addresses should be in the driver. Bit offsets as well. "multi-pin-function-value" confuses me. All this is not really suitable for DTS. > + }; > + }; > + > + uart11 { > + pinctrl_uart11: uart11grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPL_L 0 2 &pcfg_default>, > + <MA35_SYS_REG_GPL_L 4 2 &pcfg_default>, > + <MA35_SYS_REG_GPL_L 8 2 &pcfg_default>, > + <MA35_SYS_REG_GPL_L 12 2 &pcfg_default>; > + }; > + }; > + > + uart12 { > + pinctrl_uart12: uart12grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPI_L 4 2 &pcfg_default>, > + <MA35_SYS_REG_GPI_L 8 2 &pcfg_default>, > + <MA35_SYS_REG_GPI_L 12 2 &pcfg_default>; > + }; > + }; > + > + uart14 { > + pinctrl_uart14: uart14grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPI_L 20 2 &pcfg_default>, > + <MA35_SYS_REG_GPI_L 24 2 &pcfg_default>, > + <MA35_SYS_REG_GPI_L 28 2 &pcfg_default>; > + }; > + }; > + > + uart16 { > + pinctrl_uart16: uart16grp { > + nuvoton,pins = > + <MA35_SYS_REG_GPK_L 0 2 &pcfg_default>, > + <MA35_SYS_REG_GPK_L 4 2 &pcfg_default>, > + <MA35_SYS_REG_GPK_L 8 2 &pcfg_default>, > + <MA35_SYS_REG_GPK_L 12 2 &pcfg_default>; > + }; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart0>; > + status = "okay"; > +}; > + > +&uart11 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart11>; > + status = "okay"; > +}; > + > +&uart12 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart12>; > + status = "okay"; > +}; > + > +&uart14 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart14>; > + status = "okay"; > +}; > + > +&uart16 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_uart16>; > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi > index 781cdae566a0..85431a074ab2 100644 > --- a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi > +++ b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi > @@ -10,6 +10,7 @@ > #include <dt-bindings/gpio/gpio.h> > #include <dt-bindings/clock/nuvoton,ma35d1-clk.h> > #include <dt-bindings/reset/nuvoton,ma35d1-reset.h> > +#include <dt-bindings/pinctrl/ma35d1-pinfunc.h> > > / { > compatible = "nuvoton,ma35d1"; > @@ -83,7 +84,7 @@ soc { > ranges; > > sys: system-management@40460000 { > - compatible = "nuvoton,ma35d1-reset"; > + compatible = "nuvoton,ma35d1-reset", "syscon"; > reg = <0x0 0x40460000 0x0 0x200>; > #reset-cells = <1>; > }; > @@ -95,6 +96,178 @@ clk: clock-controller@40460200 { > clocks = <&clk_hxt>; > }; > > + pinctrl: pinctrl@40040000 { > + compatible = "nuvoton,ma35d1-pinctrl"; > + #address-cells = <1>; > + #size-cells = <1>; > + nuvoton,sys = <&sys>; > + ranges = <0x0 0x0 0x40040000 0xc00>; > + > + gpioa: gpioa@40040000 { > + reg = <0x0 0x40>; > + interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPA_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiob: gpiob@40040040 { > + reg = <0x40 0x40>; > + interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPB_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioc: gpioc@40040080 { > + reg = <0x80 0x40>; > + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPC_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiod: gpiod@400400c0 { > + reg = <0xc0 0x40>; > + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPD_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioe: gpioe@40040100 { > + reg = <0x100 0x40>; > + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPE_GATE>; > + #gpio-cells = <2>; > + gpio-controller; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiof: gpiof@40040140 { > + reg = <0x140 0x40>; > + interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPF_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiog: gpiog@40040180 { > + reg = <0x180 0x40>; > + interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPG_GATE>; > + #gpio-cells = <2>; > + gpio-controller; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioh: gpioh@400401c0 { > + reg = <0x1c0 0x40>; > + interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPH_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioi: gpioi@40040200 { > + reg = <0x200 0x40>; > + interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPI_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioj: gpioj@40040240 { > + reg = <0x240 0x40>; > + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPJ_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiok: gpiok@40040280 { > + reg = <0x280 0x40>; > + interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPK_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiol: gpiol@400402c0 { > + reg = <0x2c0 0x40>; > + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPL_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiom: gpiom@40040300 { > + reg = <0x300 0x40>; > + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPM_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpion: gpion@40040340 { > + reg = <0x340 0x40>; > + interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk GPN_GATE>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + pcfg_default: pcfg-default { > + slew-rate = <0>; > + input-schmitt-disable; > + bias-disable; > + power-source = <3300>; > + drive-strength = <0>; > + }; > + > + pcfg_emac_3_3v: pcfg-emac-3.3v { Drop, unused. > + slew-rate = <0>; > + input-schmitt-enable; > + bias-disable; > + power-source = <3300>; > + drive-strength = <1>; > + }; > + > + pcfg_emac_1_8v: pcfg-emac-1.8v { Drop, unused. > + slew-rate = <0>; > + input-schmitt-enable; > + bias-disable; > + power-source = <1800>; > + drive-strength = <1>; > + }; > + }; > + > uart0: serial@40700000 { > compatible = "nuvoton,ma35d1-uart"; > reg = <0x0 0x40700000 0x0 0x100>; Best regards, Krzysztof
On 13/10/2023 08:52, Jacky Huang wrote: >>> + >>> +&pinctrl { >>> + uart0 { >>> + pinctrl_uart0: uart0grp { >>> + nuvoton,pins = >>> + <MA35_SYS_REG_GPE_H 24 1 &pcfg_default>, >>> + <MA35_SYS_REG_GPE_H 28 1 &pcfg_default>; >> This does not look like generic pinctrl bindings. Looks >> over-complicated. From where did you get it? Which recent bindings and >> drivers where used as an example? Register addresses should be in the >> driver. Bit offsets as well. "multi-pin-function-value" confuses me. All >> this is not really suitable for DTS. > > Okay, I will update the first and second items to 'pin bank' and 'pin > bank index, > just as others have done, and leave the driver to handle the conversion into > registers and offsets. Instead use existing common properties, like "pins" and "groups" (or pinmux). > > The term "multi-pin-function-value" is used to specify the device function. > I will use the name "device function" instead of "multi-pin-function-value. Use existing common properties, like "function". Do not reinvent the bindings. Best regards, Krzysztof