From patchwork Wed May 8 06:51:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Huang X-Patchwork-Id: 13658146 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 C623DC04FFE for ; Wed, 8 May 2024 06:52:26 +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=FeIo4h4zCuqFtkR48g9lIKmFIEXZnQJiUHvqqaNShJQ=; b=xGTQI+e+lfhnR+ uoWt5JyWhkgFDJ/huWwViEhnq7fEsi0ybVryf5M6FujcCNPeem3+5vl9utz06hUyMFKgTe+MotEzS nMCbLUxcDzGhjTySye4IO567QUcxJEo2XOIVIcXY/NXL1bQEdW1NbB5z9cNqZr8M0XP0vmJN4OpYv FZO7sIu9zJ6hTfNPrKSuQznRGhAk1gt3udO0Nq7p/V8KQZIDDrnDbMHAuuueSys2LdRMj8a/5UDwy dDGs55CMHHhprP2qqGpOo6yVhie3HX9J8tJPGv9IpuMh+QnvEORDLX1aqx/2SzIwONN9uKI88lzse e4DxhaIro672xwAHdJHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b9v-0000000EJ5z-1ycW; Wed, 08 May 2024 06:52:11 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b9n-0000000EJ31-40oQ for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2024 06:52:07 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1edf506b216so21293035ad.2 for ; Tue, 07 May 2024 23:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715151123; x=1715755923; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VdRAuvJPzDOFmcmDaL4P+X32ok4kuqJZRpeCq1BZFBg=; b=eMh18oYbdCNqQ7GE3Tv8zOETbMNGR/+aHOEOaiR5MByefSRi+yW6U0+s+DPhcR7WVX 2d3lCWA03zUHxHltfgoPLmthpxI/KLsuDxh7DB5y2ERb6ZEiamUj2V2pBmGYJgRRVyb6 7Wl5LgbesImtyjAcJ79SuqpdAX30kz8MHiYChwAkdV4u1A4cGp76p3VdwpgBJ8D2w2/9 5Wzi0zacS+BQkfH1Oqmxj0M3cPCWpR/GyVlM5ikx70ALeNd2oaGkAPwqOtZP92Y5z8EI 09B0NJ8bIfT0+fPzTc5P486dLbI+nRm44yiY9yUHOZgFvuPkPu4dBG4OHdT4R+e7U2Yj FhuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715151123; x=1715755923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VdRAuvJPzDOFmcmDaL4P+X32ok4kuqJZRpeCq1BZFBg=; b=ZeJIi1+tye+awSQNv/e4TAadvUXjkhUIKQj+atADdyb2tEpS1YFP6Cj0s1G4Pr35oV rA9ZvFaTag8/q0Y+lpgUMIeEQ/30opJbolPwGSejQBN6+ZscfJDgoKWG5assXVT6LVCx n/alaQ08w4Ec4Jwziz49xDGXm43TgkzndpKEiIvsvNaBMoV/fuWBnlxuLU4SpGesydFr BWho7lSyxJY+sfGLBhx+8d40J9o3SRk8pH3sOrA/IYGzQOcBSolh5fAv7BjD+1/sgO3u Lx1xZvCkXegZZJM8SuOG63EBQnV5eL7FLvd6lhz3I8Q8vnWYKe6UDnwKU1lnUuXJ/Lno IHOQ== X-Gm-Message-State: AOJu0YxgGVesYus3HCc1kOLSP6hkoOb6K+I1DKIRjRYz4BTCH/oOi+bw j89rT+WmJceRQ5nMMsmPWLl9vAhV77GtbyeNnGmkfIUw2HoTrnk3 X-Google-Smtp-Source: AGHT+IGAVtV8ZnJrfN5Xapafhwe+xWGeO3Vjd3KeQG3/4kSZLDwhcKTVkMUXYytsvJ/vGTMmELGz3Q== X-Received: by 2002:a17:902:b7c1:b0:1e4:9ad5:7522 with SMTP id d9443c01a7336-1eeb0592106mr17717015ad.21.1715151123418; Tue, 07 May 2024 23:52:03 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id c12-20020a170902d48c00b001e434923462sm11136267plg.50.2024.05.07.23.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 23:52:03 -0700 (PDT) From: Jacky Huang 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, ychuang3@nuvoton.com, schung@nuvoton.com, Krzysztof Kozlowski Subject: [PATCH v8 2/3] dt-bindings: pinctrl: Document nuvoton ma35d1 pin control Date: Wed, 8 May 2024 06:51:40 +0000 Message-Id: <20240508065141.565848-3-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240508065141.565848-1-ychuang570808@gmail.com> References: <20240508065141.565848-1-ychuang570808@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_235204_026067_01862C3A X-CRM114-Status: GOOD ( 15.32 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jacky Huang Add documentation to describe nuvoton ma35d1 pin control and GPIO. Signed-off-by: Jacky Huang Reviewed-by: Krzysztof Kozlowski --- .../pinctrl/nuvoton,ma35d1-pinctrl.yaml | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml new file mode 100644 index 000000000000..763a49bd07dc --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml @@ -0,0 +1,178 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/nuvoton,ma35d1-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 pin control and GPIO + +maintainers: + - Shan-Chun Hung + - Jacky Huang + +allOf: + - $ref: pinctrl.yaml# + +properties: + compatible: + enum: + - nuvoton,ma35d1-pinctrl + + reg: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + + nuvoton,sys: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle of the system-management node. + + ranges: true + +patternProperties: + "^gpio@[0-9a-f]+$": + type: object + properties: + gpio-controller: true + + '#gpio-cells': + const: 2 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + interrupts: + description: + The interrupt outputs to sysirq. + maxItems: 1 + + required: + - gpio-controller + - '#gpio-cells' + - reg + - clocks + - interrupt-controller + - '#interrupt-cells' + - interrupts + + additionalProperties: false + + "-grp$": + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties. + patternProperties: + "-pins$": + type: object + description: + A pinctrl node should contain at least one subnodes representing the + pinctrl groups available on the machine. Each subnode will list the + pins it needs, and how they should be configured, with regard to muxer + configuration, pullups, drive strength, input enable/disable and input + schmitt. + $ref: /schemas/pinctrl/pincfg-node.yaml + + properties: + nuvoton,pins: + description: + Each entry consists of 4 parameters and represents the mux and config + setting for one pin. + $ref: /schemas/types.yaml#/definitions/uint32-matrix + minItems: 1 + items: + items: + - minimum: 0 + maximum: 13 + description: + Pin bank. + - minimum: 0 + maximum: 15 + description: + Pin bank index. + - minimum: 0 + maximum: 15 + description: + Mux 0 means GPIO and mux 1 to 15 means the specific device function. + + power-source: + description: | + Valid arguments are described as below: + 0: power supply of 1.8V + 1: power supply of 3.3V + enum: [0, 1] + + drive-strength-microamp: + oneOf: + - enum: [ 2900, 4400, 5800, 7300, 8600, 10100, 11500, 13000 ] + description: 1.8V I/O driving strength + - enum: [ 17100, 25600, 34100, 42800, 48000, 56000, 77000, 82000 ] + description: 3.3V I/O driving strength + + bias-disable: true + + bias-pull-up: true + + bias-pull-down: true + + input-schmitt-disable: true + + additionalProperties: false + + additionalProperties: false + +required: + - compatible + - reg + - nuvoton,sys + +additionalProperties: false + +examples: + - | + #include + #include + #include + + pinctrl@40040000 { + compatible = "nuvoton,ma35d1-pinctrl"; + reg = <0x40040000 0xc00>; + #address-cells = <1>; + #size-cells = <1>; + nuvoton,sys = <&sys>; + ranges = <0x0 0x40040000 0x400>; + + gpio@0 { + reg = <0x0 0x40>; + interrupts = ; + clocks = <&clk GPA_GATE>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + uart-grp { + uart11-pins { + nuvoton,pins = <11 0 2>, + <11 1 2>, + <11 2 2>, + <11 3 2>; + power-source = <1>; + bias-disable; + }; + }; + };