From patchwork Tue Mar 15 21:19:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 551496 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B64C9C433FE for ; Tue, 15 Mar 2022 21:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351933AbiCOVWD (ORCPT ); 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?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Linus Walleij , Rob Herring Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 Reviewed-by: AngeloGioacchino Del Regno --- .../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; + }; }; };