Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp941164pxp; Wed, 16 Mar 2022 22:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIzzGaLWwkDMF0fRywWo2XHBgOrKmfK9SgvIMhWSyee7A6di7oxa6fVXh45PTrHrt+WF19 X-Received: by 2002:a17:903:32d2:b0:153:9c6a:5750 with SMTP id i18-20020a17090332d200b001539c6a5750mr3384992plr.34.1647493450801; Wed, 16 Mar 2022 22:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493450; cv=none; d=google.com; s=arc-20160816; b=OEUqq1ZUAFUjKt41z5DlTTUED7P1YBH1Z5mBF9yJgBrvTwYkhsNLmGnBtGLTz7dCVU 2pP72cZo1TXEb5w9s7sF1Pgyqp8B0a4ht5zMx1j6dEgaesE0kkK9ghZQ7ScPeWpoDpJA 7QltrWgiSEFRJGkan6VYgI7tic/gJvDdi9aiyDhAx9Y6vuZWmIPnykBiTl2/8HCrx/0m AmEKMU/FJiJJxkN/rhMurs7H5fPo2UD66pVzJ50sKaNaw88D1ryFrq2BuKHqBgr8jhUW hbK0+wfxDerzcz3cfwu42BhYTdle/0d9Tq5qpF3lKv0VKgAh+xj4IAu9tdOhXZ/IpM2K k5Mw== 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=LMT26yRLgRW4Za01Mjen4t5H6BWMo7syS1T5qKZC8vU=; b=Qo0yg3dUy6B8/7+MrIiZ1JYZnh+h7wxGDX86Sz7PgGbiD1c1OhWcfn0TxYHNeoCW18 Jgnma2PU+3x0OY88oLG2eTY85Dk3bPJyK0fvmFXrjyTKpnM9GS9BUCRNdqF0R+uBxQBr ax9cu4HkeZ33n5v2Pan3fax6phSAT6UH/mBsZYZNJaCW3yjPoVMU878HVQE688RXIuGv DTy7EeQpePXycXzadsQFiiKEQttgq4qQytU48sKYCR8uMICsBn7B4S66JuYLMW2W6F+A X7/g4uIqMZjUI57vw45DLRKaj24CTo/XKEyLxk8mhX8/uMp/kOHFZija5Hjw7LXKGvvc yk9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hBQpOiLZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m15-20020a056a00164f00b004e10645ab1csi3728704pfc.264.2022.03.16.22.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:04:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hBQpOiLZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1DDD31A12AE; Wed, 16 Mar 2022 21:17:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351937AbiCOVWD (ORCPT + 99 others); Tue, 15 Mar 2022 17:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239608AbiCOVWC (ORCPT ); Tue, 15 Mar 2022 17:22:02 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B86F5B3F3; Tue, 15 Mar 2022 14:20:49 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 0FC1B1F42BBB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647379248; bh=tQqfNRntYK0gQYFiWjGgyBq66FzjlHnza9MyAlo7SoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hBQpOiLZ7B6v9RyVoB7nXjXGpkZ25gXuYbYIgCqlkpm+xRAMCF6EfeLPONjrYSBF6 3BPu2Y5f6SdfnPt0+7opbJv0GCM404MYieMopv/UJW3wmll+MTLbUAppDR1sxw9bhS r7loE7VPvhDZscgTbBdVii6WyV0natSXJ9UJRDkI98IvKP3kPIbFL7r8s5q86rL1qC dNZU2vOiIEcNWUtohsZ3pnRnX/AvAPj9NXGBqrF+ssRixJLjMV7ZmNq4qiuKA2YMN3 ccHfr8ADDwySkzeFUtE4C54Ovk7FP03d7N/hFawan7LYrhHRDMlC1rzQe1x/xEIFlR DC8Ktt8DI239w== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Linus Walleij , Rob Herring Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Matthias Brugger , Sean Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v1 1/4] dt-bindings: pinctrl: mt8192: Add wrapping node for pin configurations Date: Tue, 15 Mar 2022 17:19:33 -0400 Message-Id: <20220315211936.442708-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220315211936.442708-1-nfraprado@collabora.com> References: <20220315211936.442708-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 On mt8192, the pinctrl node has pinctrl groups to group pin configurations. Each pinctrl group contains one or more pinmux subnodes to list needed pins and their configurations. By supporting multiple subnodes, we can configure different pin characteristics (driving/pull-up/pull-down/etc.) in a pinctrl group. Update the mt8192 pinctrl dt-binding to add the missing pinctrl group node that wraps the pinmux subnodes and update the example at the end. While at it, also remove the example embedded in the description since it is redundant to the already supplied example at the end. This same change was done for mt8195 in commit 79dcd4e840cc ("dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations"). Signed-off-by: NĂ­colas F. R. A. Prado --- .../bindings/pinctrl/pinctrl-mt8192.yaml | 92 ++++++++++--------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml index 3c84676a167d..d63e23d9ed16 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml @@ -51,62 +51,55 @@ properties: #PIN CONFIGURATION NODES patternProperties: - '^pins': + '-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. - An example of using macro: - pincontroller { - /* GPIO0 set as multifunction GPIO0 */ - state_0_node_a { - pinmux = ; - }; - /* GPIO1 set as multifunction PWM */ - state_0_node_b { - pinmux = ; - }; - }; - $ref: "pinmux-node.yaml" - - properties: - pinmux: + additionalProperties: false + patternProperties: + '^pins': + type: object description: | - Integer array, represents gpio pin number and mux setting. - Supported pin number and mux varies for different SoCs, and are defined - as macros in dt-bindings/pinctrl/-pinfunc.h directly. + 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: "pinmux-node.yaml" - drive-strength: - description: | - It can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See - dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192. - enum: [2, 4, 6, 8, 10, 12, 14, 16] + properties: + pinmux: + description: | + Integer array, represents gpio pin number and mux setting. + Supported pin number and mux varies for different SoCs, and are defined + as macros in dt-bindings/pinctrl/-pinfunc.h directly. - bias-pull-down: true + drive-strength: + description: | + It can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See + dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192. + enum: [2, 4, 6, 8, 10, 12, 14, 16] - bias-pull-up: true + bias-pull-down: true - bias-disable: true + bias-pull-up: true - output-high: true + bias-disable: true - output-low: true + output-high: true - input-enable: true + output-low: true - input-disable: true + input-enable: true - input-schmitt-enable: true + input-disable: true - input-schmitt-disable: true + input-schmitt-enable: true - required: - - pinmux + input-schmitt-disable: true - additionalProperties: false + required: + - pinmux + + additionalProperties: false allOf: - $ref: "pinctrl.yaml#" @@ -151,8 +144,17 @@ examples: interrupts = ; #interrupt-cells = <2>; - pins { - pinmux = ; - output-low; + spi1-default-pins { + pins-cs-mosi-clk { + pinmux = , + , + ; + bias-disable; + }; + + pins-miso { + pinmux = ; + bias-pull-down; + }; }; }; -- 2.35.1