Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1477884lql; Tue, 12 Mar 2024 20:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdnPO/7lDf6UbHvA3tOCTzyw4GydoMacinJz4Bd12Hc6N38ebzjPK9q8t+V2Wy05Whw5GIx95DTslgMEo0DfZhEZVcq5uKJ0VKW1t5dQ== X-Google-Smtp-Source: AGHT+IGYgUYPHJUdPYfcLJnoPsJGLzOuhSmLKTrIHIBkRdjA7viS9Ris9ASkoOQxNMO6TizK5k19 X-Received: by 2002:a05:6a00:4f8c:b0:6e6:9c97:a90e with SMTP id ld12-20020a056a004f8c00b006e69c97a90emr1511768pfb.18.1710302287646; Tue, 12 Mar 2024 20:58:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710302287; cv=pass; d=google.com; s=arc-20160816; b=Ad6NzKmMnpltPRXK1jAbqP52CmmwZdNo/BqzqFD7u9AqzcbxSBtHyYql9Ei6230YXc baptWKkMUUsNsDVcv5hhj6Hx49GzxKbcRf2brA+OTpulLBexvb3Sqg7OKftyus4WX0io uEyvdA3MYnjGKY0zxqOuhddDd46KuVnwNMpesaP1mZoJRa4X6N9UyBIk5L85R2ZHQcme /xyGO6txkDdOXlLthhapdbM9xB4zxIXgg3YMu4/evqZEkMiYQ9jYzEtlHTRLylCRE9d1 2oSDqRXZ2DYORabTx+T7fiLijuTlYkJX1xUvIs6b8AtocdNDcqOTFjwy3cupPstEKqkP N0dg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bBNT1NwAXcdBlViFBBFgJVd26xGIToLjTiUG+Kqd4r4=; fh=626FYegm2bX/NAfBEr4VtwmRxsUZqZ7UAF3wMj8z5GA=; b=OwWe/Q+5BIpd+tfeHlHkdeuAZawhHfwjWt1c1dYAAoLBB2o6lNGb33zwFpvY4TcCwC UHGj8QPUeyHm0dq3OWHNU8N1R2BpKATl67fVXuH27zf2OSW9Lq5jXWecskgMLOXxdApx 6pvda4yv1HfzepLj5JXLXMjX7F0lDSkx3ZNr65Yb2t8O/Tdk2uEUSLcEU2dqhTZKZNkR T6reX6yb1fA6jUoyyyEaT8E5l7ItlUYwCANl5Q6QCbRUrh2PHxmKnLtaPEQSHpje6oE4 tJ/TYHI5ihnj6vFyLPfsdODCp6pQwf4H0uYVTWZKw/zpnf4+8mLkYkINgUWOYlgunJ6L Qq1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MZ0jq3ZY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-101086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y16-20020a056a00191000b006e56acad6ccsi8269077pfi.193.2024.03.12.20.58.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 20:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MZ0jq3ZY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-101086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8CF1B283471 for ; Wed, 13 Mar 2024 03:58:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F9EB1642C; Wed, 13 Mar 2024 03:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MZ0jq3ZY" Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B980134BE; Wed, 13 Mar 2024 03:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710302254; cv=none; b=Skq+RLWKbn9JD34ESVvsL9BRcnc/Vg6Any/bZBSDfLUQhySTXpQ/LdNzunhcxxZ+M14RRLR8RMaX9m2z4WoaGwGuGZiTZNxkS48dWDobiYKzCXpjDo9sIKV4Xlybip9QVPaY2C2KyOAn1MPvEV61HtfWK9OAZDATTs94C93aCsQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710302254; c=relaxed/simple; bh=wvsDcCz4V8ckm6Y5cmx24jz4vCItdVXP3OrMJQUAD+A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KYjDiMNCQPoyYBK/Ud6TTX9mnhJjexEY8vw9LXLFccW8wZ5Tn7Ah4AsLGBav73YFEWAc4fC2nlR0P51ug9gBelru3lITlEgaF3/HEhiyVSpZ34fT7DDZCDKIYw13obyfPRsf8TLSMcihncr6XIoXg4wq0p7kdKIRnK9PPbL3YnY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MZ0jq3ZY; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-60a057b6601so42645377b3.2; Tue, 12 Mar 2024 20:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710302252; x=1710907052; darn=vger.kernel.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=bBNT1NwAXcdBlViFBBFgJVd26xGIToLjTiUG+Kqd4r4=; b=MZ0jq3ZYaB7fx49bQ242mG353zU8JKh8VsbzorwkhKwuyoLKaEK14dtPhVD4nTEbSS XoP1c5bvetXqN1m1/X5sEzn5HJ/8Gm1aRUFbJtUVuXpxAEfywM8aCEXe1fxElOHVlvES /RUR8u+qeagEHXLo/+DhN+80tvKazfEQSfwjwp+gDd8WfcBOWZdv6Jmoqg2IX/eosJGL 8noTDiTrVHoc99xffvt2JgAtwbLxrmvhvuueHIqZHn2latx27OGPIQ+UGIldqmXgtFUI /qsE+gEz/N2Tmijf+dxGAGcg+VpaemJQhoI6s61l5uFFvWMzzthjCZ4nk9r9tXiKfxIT iYhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710302252; x=1710907052; 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=bBNT1NwAXcdBlViFBBFgJVd26xGIToLjTiUG+Kqd4r4=; b=U7QnpNlqnZd++9947pceOpmCxHdaOM8KxZ7n9duM4Imu8z1Nx6MKoURM6DcpaTEvRV MeaxYSW5PZ27ZZlnOKSjMhXBxPx2OyQ9PMlRMC5VRtkJgzPBmPAP/lXCp7BEu5ZYYvbb Sf7bKi/ydWsasuVkVRHOmW51AlErNoMjGg2+QA+NmFzZUgIPy+6c/FEtXpCzTTFPsuaR 4CasvCktFwLBISH9Ds5etbPe7ACSl/FztqeI20CNJ8l+exqzBWnstLHjTI7IY6CSoKuS ewA/98INSKOurVHOqocfuvi4LKJDSVoAPuzkdzODSrSUbnL5WYeAiAtpzztvbCANk5CH V5+Q== X-Forwarded-Encrypted: i=1; AJvYcCXT4Bv/nl4oGHvktZ5cPArsxtpfCvXnQneD7fP3k/ovL81NIsM+23qGn63Qm/pnZHpUxuPO5HKAyL9OHBSJ3fZtMaKZLRabpngUPv3PJKycYdL2YWerpok0IZ3pLaH174PNulehUlTENXTWT1e2A9xWxad0QhwF42acHXJiSSMlOLEtR44= X-Gm-Message-State: AOJu0YwTQqhkr4V5xk0z8k5w9zl2IFytfoWE7Ef74gNIjWrLNamir8qG 7UQufM+CQZ5JsRZ9gC4Sxok/sNUnUlHSqoeX0IiMwi3JG3NadPlkzYl1VaEX X-Received: by 2002:a81:770a:0:b0:60a:1b1:5f61 with SMTP id s10-20020a81770a000000b0060a01b15f61mr1465017ywc.35.1710302251945; Tue, 12 Mar 2024 20:57:31 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id o17-20020a63fb11000000b005cd835182c5sm6721605pgh.79.2024.03.12.20.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 20:57:31 -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 v6 2/3] dt-bindings: pinctrl: Document nuvoton ma35d1 pin control Date: Wed, 13 Mar 2024 03:57:18 +0000 Message-Id: <20240313035719.768469-3-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240313035719.768469-1-ychuang570808@gmail.com> References: <20240313035719.768469-1-ychuang570808@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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>; + }; + }; + }; -- 2.34.1