Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2255642rwb; Wed, 5 Oct 2022 11:17:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GopE3PPSOmmCj0j0lJ5oh3bZ0xQIBPptYG+wtNIwhHbzm6loJbL1PWSeSBDWk8i65GJxO X-Received: by 2002:a17:906:2699:b0:781:a473:9791 with SMTP id t25-20020a170906269900b00781a4739791mr709573ejc.644.1664993866022; Wed, 05 Oct 2022 11:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664993866; cv=none; d=google.com; s=arc-20160816; b=aMHqUnfmzR2CNAXva7s78gk7b8tr/9VjuY9mrHl1IyCBMM7GDbEdrm/NhOJnJr3BTd c2eUIeJPZKsDJCBRbn4A78b88cihqYiZqeeG9bATt/38I70LWo+edZfVAS2+e3OThREE /JLx1jn2xbD4lVbJgnFZPwWa7boCaK1/jCdsAPzEwd2acLmN8MbjZb2H0c0MixIN0YyT SH7FSWz1MdQVvTMvx26h66fe7gc/LcOKhQpDQuuIG0cGl13bUMelbz8D2zxZAz3xODaS 241TFhtml3VD0AmnF/UJdn0y6ru7OKK6aqZDpQ5P/5/MnEtrrhChBFvuWUR9kvVC+C7+ nOEQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lscRy0kqbRlW0b48THWW28owt26qTsMSihJ3fUIxZUY=; b=EcOi33klX6WXvb0Is9URAxPatSy/i6kiFeniOiaZx3+RMmYngz8/KxCmfXaj5KazZo gk3JChMk8KNNFwUJ1rsmvzpX3VORLCKezjYI3f/WDC8uL3voW5OBZejvq2CxfAgqTbA2 Dp5yei5/SlPCXvL2xNyJzxNTLWxTZeF6fS6hYogWRCQqH58/v5x88S07wZm4xz0rglmB 9sBVlnQ9znBxHChQSh3UCNkN9HumWWaTqlJiz7ix7D2s3/r5EPy7UFJ/5P+gIW62U6CJ YwMBZB3OMKmhXqU8mQnKcMHoi2tC4ZYpn9vmgn/J+y2bFxA9mtYCh8AoTnNcvUrW/L2x TJsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dm+FXTm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a50a417000000b00453e1a11542si12387906edb.493.2022.10.05.11.17.19; Wed, 05 Oct 2022 11:17:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dm+FXTm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbiJERpK (ORCPT + 99 others); Wed, 5 Oct 2022 13:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiJERov (ORCPT ); Wed, 5 Oct 2022 13:44:51 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C58413D; Wed, 5 Oct 2022 10:44:33 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id iv17so11240794wmb.4; Wed, 05 Oct 2022 10:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=lscRy0kqbRlW0b48THWW28owt26qTsMSihJ3fUIxZUY=; b=dm+FXTm1drjKBIiUiGynmy74M31d22PsWkd+Eu83ZoPu8ZyT/zo1s7uwX3m53cN6/T h4pmgjD8zha3UMqYnP2xMHsgap7DxXXKFitSNnMkZbb84+8wyBg+j4PiKKGKU8uzMx/d ZJN2luqYskmFZF5Y6qukVlddLUedg5iXfUu5w/WZbsxofJtPRl37EN4aytjN7zfThdsq yiVgzZPbqUZvJfqoerKpXDZ/yIwxvGx5Cd1qqYYO61P4d5jGpA0gqLY3m9YYvZ1vvqH+ 3x0wzDgpsmPnGFS/LwJ/Zo5XzMSp+hD6H4Wsn75m99d3ckIUHItMuDPYBSkQpXXRnnL+ qZFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=lscRy0kqbRlW0b48THWW28owt26qTsMSihJ3fUIxZUY=; b=VEeV6jihy9H/NJY4EVlSG8swYuQtCWxq7edSjD7wD00CiTP7+0Ren6ujrZNSwcZJPU 7B6pXaNDjdbT2rcJNzesS5EatDzvnD3p0dMvjr7MorOSKaJkp2NUbxUFvdptXaH31glp 50Pn7bAe/iNbc8ZKX6O2FqTCzO9TvOJW1LmKA8mEjcxWOZ14msx5yh+qQFpyCr6ML3Wg hgDM9AiDHjMX+g3bBLkuY4RZYotTDK26UY3/4VMxwnbcM02z3tdBLixdY3Lt8K8ccDIf 6c6IUrDTMdOtECP9gV94kagxy0eT5aR1N8vlnfpvsXbBuJ1CRNcRjlfe9Oi3S0+xoiJb RUSQ== X-Gm-Message-State: ACrzQf1qbWzLd8r2rI+diBgWbEubMGUaWpaWExqfvoLq51lQVbwF7gJ2 XoBKyVAYafJPfX77RBTLA7EvZuoudI0hZA== X-Received: by 2002:a05:600c:3d13:b0:3b4:be25:9236 with SMTP id bh19-20020a05600c3d1300b003b4be259236mr452110wmb.65.1664991871613; Wed, 05 Oct 2022 10:44:31 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.98]) by smtp.gmail.com with ESMTPSA id c6-20020a5d4146000000b0022a403954c3sm16075491wrq.42.2022.10.05.10.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 10:44:31 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Andy Teng , AngeloGioacchino Del Regno Cc: Yassine Oudjana , Yassine Oudjana , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/10] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6735 pin controller bindings Date: Wed, 5 Oct 2022 20:43:42 +0300 Message-Id: <20221005174343.24240-10-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221005174343.24240-1-y.oudjana@protonmail.com> References: <20221005174343.24240-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yassine Oudjana Add bindings for the pin controller found on MediaTek MT6735 and MT6735M SoCs, including describing a method to manually specify a pin and function in the pinmux property making defining bindings for each pin/function combination unnecessary. The pin controllers on those SoCs are generally identical, with the only difference being the lack of MSDC2 pins (198-203) on MT6735M. Signed-off-by: Yassine Oudjana --- .../pinctrl/mediatek,mt6779-pinctrl.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml index f10d1d5543cb..66a0178caa8e 100644 --- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml @@ -18,6 +18,8 @@ description: properties: compatible: enum: + - mediatek,mt6735-pinctrl + - mediatek,mt6735m-pinctrl - mediatek,mt6765-pinctrl - mediatek,mt6779-pinctrl - mediatek,mt6795-pinctrl @@ -61,6 +63,29 @@ required: allOf: - $ref: "pinctrl.yaml#" + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt6735-pinctrl + - mediatek,mt6735m-pinctrl + then: + properties: + reg: + minItems: 8 + maxItems: 8 + + reg-names: + items: + - const: gpio + - const: iocfg0 + - const: iocfg1 + - const: iocfg2 + - const: iocfg3 + - const: iocfg4 + - const: iocfg5 + - const: eint - if: properties: compatible: @@ -185,6 +210,22 @@ patternProperties: } }; }; + The MTK_PIN_NO macro can also be used to select a pin and specify + a function index: + pincontroller { + /* Pin 19 set to function 0 (multifunction GPIO) */ + gpio-pins { + pins { + pinmux = <(MTK_PIN_NO(19) | 0)>; + }; + }; + /* Pin 172 set to function 1 (primary function) */ + msdc1-pins { + pins-cmd { + pinmux = <(MTK_PIN_NO(172) | 1)>; + }; + }; + }; $ref: "pinmux-node.yaml" properties: -- 2.38.0