From mboxrd@z Thu Jan 1 00:00:00 1970 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 1A968C001B2 for ; Wed, 14 Dec 2022 11:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238198AbiLNLz0 (ORCPT ); Wed, 14 Dec 2022 06:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238172AbiLNLzZ (ORCPT ); Wed, 14 Dec 2022 06:55:25 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CA471A81F for ; Wed, 14 Dec 2022 03:55:24 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id p36so9996213lfa.12 for ; Wed, 14 Dec 2022 03:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cPBqPNWuQqd8iPzh14Et+rK9vcZ1LSXVV8dYdeOHZ6c=; b=d9Opn6CX+6jaux+E3iVm2NyBgLI8PREjwy5MeY1Lrro99hlHyyMusWfNulvNGBmlT+ sWGQZ8OgTIhBrmsKlFqcXkwlkcrtloR7cpiU8rWGJJXCR60EMB+ZWdogtIDrWTIoU08A kvlc23GJjhTezCWJOd8SAR0kl60znuGEnDz+GE2J+2TbHR2xW2/UVpC25uSeLT6QkS9e 05VuKn+ani6pbjqRZC4uomXn8MA10l49E8Vsxi8w64EubWJyHX63wzGr3xKLbrtW8pec yWihcri1LwJFp2Ct6weofdnrfX95O39+t5SsoM899CKrAstmzP2KIvFoFEPW1SligMk1 110g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cPBqPNWuQqd8iPzh14Et+rK9vcZ1LSXVV8dYdeOHZ6c=; b=FwHUBEvTViAi5vvjlvf6vFyBq8xQly4sIPzzSYIEKJqfwze5kFlk8Q+nPcgojF7jYU boWH5dd7TnCuALwVeiYdwhLGPdnDi8HdtgOOwCtwvf0XdZHOo6jkjMqGu5IwkcBEp8Gs E+6DYEeKUfDnhaAmo1RHXPnyWfWSF8Nd90Zi2k4TCMij4fH/T2KQIzc7WE1CkpqRLHBO JCl3Bn0lo4ExqspJIjGnnBqhopggc2Ixua21NsD9DDTZJkyacWDkmxXho+mCIgyafB8h VrvQ4IDpFBFtbfUfQzXjy4qjn6yN7PLXoISZU6d3CXeadu6WSDtY9M9Z56KUbxNNdHyt 6yWQ== X-Gm-Message-State: ANoB5pnVIjqIO8ZF9oavyV9Tm3E9OnOOb9h80YRc9QKQKRkwBv0c7ybh KHvo7/2FBRtQRAcT4eA9XuTt8w== X-Google-Smtp-Source: AA0mqf77t8fHCzNIhykIbYiHIQrxYCkQ2IPp64vlW2pWDRXhqprSlUO5qUJL1uv9aHCthTDOMZGKsw== X-Received: by 2002:a05:6512:acd:b0:4b6:f0ac:7af8 with SMTP id n13-20020a0565120acd00b004b6f0ac7af8mr3783419lfu.67.1671018922448; Wed, 14 Dec 2022 03:55:22 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id o16-20020ac24e90000000b004b551cdfe13sm771276lfr.279.2022.12.14.03.55.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 03:55:22 -0800 (PST) Message-ID: <4ffd94b2-e72c-a081-4326-5bc254603ddf@linaro.org> Date: Wed, 14 Dec 2022 12:55:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 2/6] dt-bindings: pinctrl: mt7620: add proper function muxing binding Content-Language: en-US To: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sergio Paracuellos , Luiz Angelo Daros de Luca Cc: 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 References: <20221213130430.172876-1-arinc.unal@arinc9.com> <20221213130430.172876-3-arinc.unal@arinc9.com> From: Krzysztof Kozlowski In-Reply-To: <20221213130430.172876-3-arinc.unal@arinc9.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 13/12/2022 14:04, Arınç ÜNAL wrote: > 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,mt7620-pinctrl.yaml | 632 +++++++++++++++++- > 1 file changed, 596 insertions(+), 36 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml > index 6f17f3991640..06880c80ba80 100644 > --- a/Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml > @@ -29,47 +29,608 @@ patternProperties: > $ref: pinmux-node.yaml# > > properties: > - groups: > - description: The pin group to select. > - enum: [ > - # common > - i2c, spi, wdt, > - > - # For MT7620 SoC > - ephy, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi refclk, > - uartf, uartlite, wled, > - > - # For MT7628 and MT7688 SoCs > - gpio, i2s, p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an, > - p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn, perst, pwm0, > - pwm1, refclk, sdmode, spi cs1, spis, uart0, uart1, uart2, > - wled_an, wled_kn, > - ] > - > function: > - description: The mux function to select. > - enum: [ > - # common > - gpio, i2c, refclk, spi, > - > - # For MT7620 SoC > - ephy, gpio i2s, gpio uartf, i2s uartf, mdio, nand, pa, > - pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, > - rgmii1, rgmii2, sd, spi refclk, uartf, uartlite, wdt refclk, > - wdt rst, wled, > - > - # For MT7628 and MT7688 SoCs > - antenna, debug, i2s, jtag, p0led_an, p0led_kn, > - p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn, > - p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2, > - rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi cs1, > - spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -, > - ] > + description: > + A string containing the name of the function to mux to the group. > + anyOf: > + - description: For MT7620 SoC > + enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, pa, > + pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, refclk, > + rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, wdt refclk, > + wdt rst, wled] > + > + - description: For MT7628 and MT7688 SoCs > + enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn, > + p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn, > + p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2, > + refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi, spi cs1, > + spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -] > + > + groups: > + description: > + An array of strings. Each string contains the name of a group. > > required: > - groups > - function > > + allOf: > + - if: > + properties: > + function: > + const: antenna > + then: > + properties: > + groups: > + enum: [i2s] I have doubts such setup is maintainable and readable. I would suggest to leave just few - maybe for gpio, jtag, refclk, utif. Best regards, Krzysztof