From patchwork Tue Dec 13 13:04:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 13072052 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 53C4EC4332F for ; Tue, 13 Dec 2022 13:07:07 +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=Oy/oeoDGnrL7heOpY2Fa9WF7/sViMG39tnNc+H9Wjw8=; b=h2qyiG6XMWClGc eWuMGf8E1mz0yqi964QHT5Ut+ch0/VLiYMySbFJ3zz4+tOLlTcHjBZ+HO3WM2qSdTwcZJt7cx79yc bK/uYEbZ0xLwvaox0bSdKP8eizlEQoK6J/7q9vbcHCHjEHm2Xt/zImUuIjg6SAxrUNJ3XU6oJveJc FhGaXAcORrYLRvff2jCyNdU76hOW6c4kOrbVtUEVKTG7g3GS4d5MenexCXk/JYLKD++h21NzTo10/ w9O+sRN/2V6PvUhYdiir2122BbIp66H1Umn6opDIKfCX3tdWSbwa/FC0Zu6HPEQItAUiN+MVoM1/O /qIgL5W1xR/pvMURQLQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p54yq-0002wV-UU; Tue, 13 Dec 2022 13:05:57 +0000 Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p54y4-00024p-SD; Tue, 13 Dec 2022 13:05:10 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1670936705; cv=none; d=zohomail.com; s=zohoarc; b=Gq3vGNatkGEU0LcJRvYYrhMd+fJNmtUX2WK2ZKHpF2UqGUsL1c+ucqBvuet8MJjZ5sZ5aIeLb1l09hKrfLOh9BMkkpEObUzY/chIv5yLAHEqXF18Rh9jx/otvimMwqWg9sWrD3WOqbaOt/4Ll85Ni4z08r+Szo7ihAv1ZiTa3ec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670936705; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=LMCqtNkCDMAALe0laloGdZppysjerVyp2JF3K0Vafs8=; b=eJwAdiYN2gVDh0zrdskCJBh3GOoOowl5oXh6d1+S4AqOs3UCwFcx6AHlHJxZO55hmVsZps4a2iZT6lmP8iZzuIdTB+3WUFGoQ8oJsPevkKXILnnb5mHFDXuAT25Kt3muDKGdoOEewkEGprdjHOT5vljKT1zOswp7CWqg+kMudCo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670936705; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Reply-To; bh=LMCqtNkCDMAALe0laloGdZppysjerVyp2JF3K0Vafs8=; b=MX6vTGhoKIYOt/3NHqTXWqm/bUVHKvJolJZuByz8VK8iiKyn3themwhGTjF+iUMI eMt2MnF17Mbw0ML/n+fo8lI53Mrr7jr2gsJm7roCc2zRIVBripBH/cW/LsUtiLJkQjy RNR/Q07pibNQpIc8LmmmWhYfFufqbAvG60d8IHmY= Received: from arinc9-PC.lan (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1670936703464863.0120202888908; Tue, 13 Dec 2022 05:05:03 -0800 (PST) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sergio Paracuellos , Luiz Angelo Daros de Luca Cc: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH 4/6] dt-bindings: pinctrl: rt2880: add proper function muxing binding Date: Tue, 13 Dec 2022 16:04:28 +0300 Message-Id: <20221213130430.172876-5-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221213130430.172876-1-arinc.unal@arinc9.com> References: <20221213130430.172876-1-arinc.unal@arinc9.com> MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221213_050508_961029_F485BD0D X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. 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 Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL --- .../pinctrl/ralink,rt2880-pinctrl.yaml | 85 +++++++++++++++++-- 1 file changed, 79 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml index 56e5becabcfd..f59ddd5e6c2b 100644 --- a/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml @@ -29,18 +29,92 @@ patternProperties: $ref: pinmux-node.yaml# properties: - groups: - description: The pin group to select. - enum: [i2c, spi, uartlite, jtag, mdio, sdram, pci] - function: - description: The mux function to select. + description: + A string containing the name of the function to mux to the group. enum: [gpio, i2c, spi, uartlite, jtag, mdio, sdram, pci] + groups: + description: + An array of strings. Each string contains the name of a group. + required: - groups - function + allOf: + - if: + properties: + function: + const: gpio + then: + properties: + groups: + enum: [i2c, spi, uartlite, jtag, mdio, sdram, pci] + + - if: + properties: + function: + const: i2c + then: + properties: + groups: + enum: [i2c] + + - if: + properties: + function: + const: spi + then: + properties: + groups: + enum: [spi] + + - if: + properties: + function: + const: uartlite + then: + properties: + groups: + enum: [uartlite] + + - if: + properties: + function: + const: jtag + then: + properties: + groups: + enum: [jtag] + + - if: + properties: + function: + const: mdio + then: + properties: + groups: + enum: [mdio] + + - if: + properties: + function: + const: sdram + then: + properties: + groups: + enum: [sdram] + + - if: + properties: + function: + const: pci + then: + properties: + groups: + enum: [pci] + additionalProperties: false additionalProperties: false @@ -54,7 +128,6 @@ required: additionalProperties: false examples: - # Pinmux controller node - | pinctrl { compatible = "ralink,rt2880-pinctrl";