From patchwork Tue Jan 23 08:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Huang X-Patchwork-Id: 13526935 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 04AD2C47DDB for ; Tue, 23 Jan 2024 08:07:29 +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=i7ukFo+bmrIvcufeEX14hjKoPa6Y3wqDKKUKuTs6Iuo=; b=KqGUOmGzbSL9gO X2XozT3vg9zlEjQLVB+bqcl6e1qlzhexS/6xlwCZYP0w9+XIK67ixccto6kYBJCepc0fABPsaNiOQ Q2Gp6/WPdFtqc3aiGhxH1YkmFcs9/gyaqEJPuho8zaUVc5yzo8PZvfCheArxkSW1ItDgqs5G6QAov Uze1qYOuItYQyavdWvfrjtAXdA57ouCe0U44qmY58AGQYFXOnh4BWgkC1C6pSf3AMuETli2nu1jXo FyMDCInP6VSMbcxnElsEQRuUYzlzVY8yOoStglNBN9Bqli/N6t4sA94AEUBULEkNcvPjd5aTOgL20 6asuC9pPrqabEVwINRyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSBoB-00FTmr-2R; Tue, 23 Jan 2024 08:06:59 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSBo5-00FTi9-2K for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 08:06:55 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1d75ea3a9b6so12547895ad.2 for ; Tue, 23 Jan 2024 00:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705997210; x=1706602010; 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=vi+Ee4Ra75GhWDNWvzS2HrP3/rPXxeeFPkLpeIHFmOs=; b=Mv4DxP7aPYzX0LBW5+sNITnc0ua9IKYsG6zcRIShVjPY6UfN/2quiO4pBK8wuPcz4x ricanXZE6pJ76dy8YxJpxDtKDuKjbmoFUlfIbDtDqj3oJWa7MElC30j3ZXcugZC5UYhU OhKwa7FN4516wDpurLb2W880ubQuBOa5FHcZHyypAfB2hFPUV0LAkFK4/6qYAwscxYw2 vVkp74VEvJJECtxuSee1KbkcC/kdd2IFdeoLtKaWCAo+m/uiZXaDdsST7PvJln8XQ4CM 6t4+3z4KARME6BnB20Lj3D8+GYGpvxBuQV2tYg5fmQYPxV+SmatSYfZDS2SzaUTl08R+ zfDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705997210; x=1706602010; 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=vi+Ee4Ra75GhWDNWvzS2HrP3/rPXxeeFPkLpeIHFmOs=; b=iJRqnUHRSDK0CxZ5dmrHIGZTd/dKfaLYaHZqn7i/MVmo0sWjxCW1T5wzpfDRbjaauR b2A+35GUpAya6pZ5FxlbRm/ZzubDyiWcihOgoHEePpXoNzA+d4KMVJj6j56ZpW5deCPq A+kfq8Nidwvnjjw4AaOYaIlTWvhS9xaBDfDRBTlKEsVOv8Ks2LlPxZ0N5fzb5IiMkeTg gUtjDzF8FhCNwq8dK3GRNi0Je3XSmbg0HUfdO83Dxnt8XiRaZ52cYdXAoBr14d4YJHqf CxYNS0tTD9e7j5xEwm12rY+D5nDNZ2k60Z5dFQIG58RwVGAIGceHcCegWiHq5ZZAefDP +gew== X-Gm-Message-State: AOJu0Ywsisg2TVwawHQv0T3WGyTIWB7LzMoib+h3M3eUQsugkq3TMZjX Luv5Nj2ea2xZFqDT91QeK+Bq+ZP/YZBS+ILMO4JxrFvs+WWs8iEl9bYLSz// X-Google-Smtp-Source: AGHT+IFErPq6uFCZtDpyn596RQZuTBtMTjk1QHyBDKK2gRehaIXlTLm33J3d8lPxw/fr+4EUIMq1nQ== X-Received: by 2002:a17:902:c409:b0:1d4:c313:8081 with SMTP id k9-20020a170902c40900b001d4c3138081mr7671458plk.129.1705997209814; Tue, 23 Jan 2024 00:06:49 -0800 (PST) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id h10-20020a170902704a00b001d4816958c2sm8277113plt.166.2024.01.23.00.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 00:06:49 -0800 (PST) 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 Subject: [PATCH v3 2/4] dt-bindings: pinctrl: Document nuvoton ma35d1 pin control Date: Tue, 23 Jan 2024 08:06:35 +0000 Message-Id: <20240123080637.1902578-3-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240123080637.1902578-1-ychuang570808@gmail.com> References: <20240123080637.1902578-1-ychuang570808@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_000653_756144_63FE575C X-CRM114-Status: GOOD ( 15.11 ) 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 | 163 ++++++++++++++++++ 1 file changed, 163 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..8b9ec263213f --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nuvoton,ma35d1-pinctrl.yaml @@ -0,0 +1,163 @@ +# 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 + + '#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 + additionalProperties: false + 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 + + "^pin-[a-z0-9]+$": + 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: pincfg-node.yaml# + + properties: + 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 + + unevaluatedProperties: false + + "-grp$": + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties. + 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. + +required: + - compatible + - nuvoton,sys + +additionalProperties: false + +examples: + - | + #include + #include + #include + + pinctrl@40040000 { + compatible = "nuvoton,ma35d1-pinctrl"; + #address-cells = <1>; + #size-cells = <1>; + nuvoton,sys = <&sys>; + ranges = <0 0x40040000 0xc00>; + + 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>; + bias-disable; + power-source = <1>; + }; + }; + };