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 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 6EEBFC43217 for ; Thu, 20 Oct 2022 12:27:47 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Cc:To :Subject:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PPSAyZZTof9zyQTRfyJyUCAg0mssXaX/WFXn8/2mCno=; b=agY5gxdYfW26M1C29YoFZoxnuN K9v9lkuIUDUIVJ2b3PG28cqZYubflWI3hcuCZdsFIO5l2f766msfz6HP+yNm/kvWZkBqTu50NczVG AagRy4sGK8s6gg6VGtIWdysUe/lr2ivQaimmhvO4sMWd3lEIuS2YiEHaQe5wvtKqUBfJZEClnqlaH Ir+SSMTQE2A33fVjqVaxQILLlk0qGTqiSW9VYaUBO5kvsQFTxfv0fky7TzPuCQUKJS9sr/TZCYW5g sMAzst4uFqtPZBWmETvyL8ibbCjhXHGcVVAUr8vbmBaU1UajJAHBAhbF2Wkr6klcjVu6cKGoHqYvs kCJ0danQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olUcz-00EkCH-R0; Thu, 20 Oct 2022 12:26:26 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olTqk-00E7R0-Vo; Thu, 20 Oct 2022 11:36:36 +0000 Received: by mail-ed1-x530.google.com with SMTP id a67so29419708edf.12; Thu, 20 Oct 2022 04:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:from:to:cc:subject:date:message-id:reply-to; bh=2hBzpuTfcLKm/gHU0j1Rb5iDzN0jpTw27RMtS7S6QiY=; b=LvS7i/tU9BiRY+bnSEBZx2dHBwo+AeR3GLscVXRJPEgvwLRi0gmXL7Y0hcbVsCXxdh GNpDRQjbUKZdTqjAn1gn9SbWj65eppSj30Gm0uUzaE1ijQYGhBN6GOce/D0Jn8SZTaVf zWUxff7rS68KU/SKGxDQnSl5yPYCYsmQ7lYWyl10VS0/qpS+zeEYE0c2UB6H++W3zTTz I4Qo/dlwvqgllRwT46z0hCtGhIT14yM83rpxBBqLAEVyrrx/oHn6Co5q/4xD50a1SZt8 sh785bCyqPAHEDs0ZFGJ1VPgcJ6zK54ZGw8cj78YQNfRm/+AudEZSSjdzONlVTlyRBgP wqcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2hBzpuTfcLKm/gHU0j1Rb5iDzN0jpTw27RMtS7S6QiY=; b=agCxwPK+6h1sjRzRILZX3lF8qSXa7SluXHhDKquBd8rTvvEQiKnCoudaAhE/K2LyBO muyX1laP3cDN8sbcRptLOP7FQKYDX9w9WduMysmUzvVDjbcuv7yChJU+sQgRgr3WvEFl CQfVPB5k0oTu8SlzYi7W4c+koI2PkR98gi5XwdLYfvPWwkPrPppNyB7WlNHAr+zYAuf+ WZOzREpDEDR8BIL6yjKVCX5I4lYeC8YoZ3xj9itOOi1CsOi4MHZ/K4KXDOrgeIbA5Axx MAI9a24u+dLy6SnP2vmEc2ySE62d3VoFBp8omou7wwd3pfvtljamS/NqwurjpC4QGF6t EuDQ== X-Gm-Message-State: ACrzQf0dNsHORAdT2LYRD/Nl3ep96z7yxlDAuStDCky9mjWOEn76Mz+/ i3fT3yfJc9y/LpAfTe4fz2PrUKD3ExTNJg== X-Google-Smtp-Source: AMsMyM642cRbJkWRb0REHkacf8Zt0nE8dOnuVHN/e2FpIG0h/B96y1K0ZYrvtgKxLuw2QF0YLHrl6A== X-Received: by 2002:a17:907:da7:b0:791:8f57:6860 with SMTP id go39-20020a1709070da700b007918f576860mr10947353ejc.509.1666265779656; Thu, 20 Oct 2022 04:36:19 -0700 (PDT) Received: from [10.32.3.204] ([95.183.227.98]) by smtp.gmail.com with ESMTPSA id bd13-20020a056402206d00b004590b29d8afsm12108770edb.84.2022.10.20.04.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 04:36:18 -0700 (PDT) Date: Thu, 20 Oct 2022 14:36:08 +0300 From: Yassine Oudjana Subject: Re: [PATCH v3 06/10] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6795 To: Krzysztof Kozlowski Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Andy Teng , AngeloGioacchino Del Regno , 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 Message-Id: <8WU1KR.065JU8WYUX9C3@gmail.com> In-Reply-To: <0f078a85-056a-c11e-377b-27764a34485d@linaro.org> References: <20221007125904.55371-1-y.oudjana@protonmail.com> <20221007125904.55371-7-y.oudjana@protonmail.com> <0f078a85-056a-c11e-377b-27764a34485d@linaro.org> X-Mailer: geary/40.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_043635_073822_3941E60F X-CRM114-Status: GOOD ( 30.03 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 10 2022 at 07:24:59 -04:00:00, Krzysztof Kozlowski wrote: > On 07/10/2022 08:59, Yassine Oudjana wrote: >> From: Yassine Oudjana >> >> Combine MT6795 pin controller document into MT6779 one. In the >> process, replace the current interrupts property description with >> the one from the MT6795 document since it makes more sense. Also >> amend property descriptions and examples with more detailed >> information that was available in the MT6795 document, and replace >> the current pinmux node name patterns with ones from it since they >> are more common across mediatek pin controller bindings. >> >> Signed-off-by: Yassine Oudjana >> --- >> .../pinctrl/mediatek,mt6779-pinctrl.yaml | 94 ++++++-- >> .../pinctrl/mediatek,pinctrl-mt6795.yaml | 227 >> ------------------ >> 2 files changed, 77 insertions(+), 244 deletions(-) >> delete mode 100644 >> Documentation/devicetree/bindings/pinctrl/mediatek,pinctrl-mt6795.yaml >> >> diff --git >> a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml >> b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml >> index a2141eb0854e..cada3530dd0a 100644 >> --- >> a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml >> +++ >> b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml >> @@ -8,6 +8,7 @@ title: Mediatek MT6779 Pin Controller >> >> maintainers: >> - Andy Teng >> + - AngeloGioacchino Del Regno >> >> - Sean Wang >> >> description: >> @@ -18,6 +19,7 @@ properties: >> compatible: >> enum: >> - mediatek,mt6779-pinctrl >> + - mediatek,mt6795-pinctrl >> - mediatek,mt6797-pinctrl >> >> reg: >> @@ -43,9 +45,10 @@ properties: >> interrupt-controller: true >> >> interrupts: >> - maxItems: 1 >> + minItems: 1 >> + maxItems: 2 >> description: | >> - Specifies the summary IRQ. >> + The interrupt outputs to sysirq. > > I am not sure if description is relevant now for all variants... what > is > the sysirq? You have two interrupts so both go to one sysirq? It's the system interrupt controller and it has several inputs. Both interrupts go to it. > >> >> "#interrupt-cells": >> const: 2 >> @@ -81,6 +84,30 @@ allOf: >> - const: iocfg_lt >> - const: iocfg_tl >> - const: eint >> + >> + interrupts: >> + items: >> + - description: EINT interrupt >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: mediatek,mt6795-pinctrl >> + then: >> + properties: >> + reg: >> + minItems: 2 > > What's the maxItems? You declared reg and reg-names in top-level > properties as accepting anything, therefore you cannot have loose > constraints here. That was an oversight. I'll fix it. > >> + >> + reg-names: >> + items: >> + - const: base >> + - const: eint >> + >> + interrupts: >> + items: >> + - description: EINT interrupt >> + - description: EINT event_b interrupt > > Blank line > >> - if: >> properties: >> compatible: >> @@ -111,32 +138,50 @@ allOf: >> - "#interrupt-cells" >> >> patternProperties: >> - '-[0-9]*$': >> + '-pins$': >> type: object >> additionalProperties: false >> >> 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. >> - $ref: "/schemas/pinctrl/pincfg-node.yaml" >> + configuration, pullups, drive strength, input >> enable/disable and >> + input schmitt. >> + $ref: "pinmux-node.yaml" > > Drop quotes > > Why this one is not pincfg-node anymore? All your properties are not > valid then? You mix here so many changes it is a bit difficult to > understand the concept. Seems like I didn't pay enough attention to that. This node actually takes both pinmux-node (pinmux specifically) and pincfg-node properties, so would it make sense to add ref for both? > >> >> 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 boot/dts/-pinfunc.h directly. >> + 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-disable: true >> >> - bias-pull-up: true >> - >> - bias-pull-down: true >> + bias-pull-up: >> + oneOf: >> + - type: boolean >> + - enum: [100, 101, 102, 103] > > Missing ref > >> + description: Pull up PUPD/R0/R1 type define value. >> + description: | >> + For normal pull up type, it is not necessary to >> specify R1R0 >> + values; When pull up type is PUPD/R0/R1, adding >> R1R0 defines >> + will set different resistance values. >> + >> + bias-pull-down: >> + oneOf: >> + - type: boolean >> + - enum: [100, 101, 102, 103] > > Missing ref > >> + description: Pull down PUPD/R0/R1 type define >> value. >> + description: | >> + For normal pull down type, it is not necessary to >> specify R1R0 >> + values; When pull down type is PUPD/R0/R1, adding >> R1R0 defines >> + will set different resistance values. >> >> input-enable: true >> >> @@ -151,7 +196,7 @@ patternProperties: >> input-schmitt-disable: true >> >> drive-strength: >> - enum: [2, 4, 8, 12, 16] >> + enum: [2, 4, 6, 8, 10, 12, 14, 16] > > Now you are missing ref - you do not have a type now, because you > removed pincfg-node. Split the merging of different pinctrl bindings > and > reorganization. Will do. > > The drive strengths are also not valid for the other variant... Actually the supported drive strengths vary between pins of a single variant, so technically they have never been described completely accurately. The old drive strenghs are a superset of strengths supported by pins on the MT6779 pin controller, and this change expands the superset with values supported by some pins in MT6795. Would it be better to move this to the conditionals to have it defined per variant? >> >> slew-rate: >> enum: [0, 1] >> @@ -218,8 +263,9 @@ examples: >> #interrupt-cells = <2>; >> interrupts = ; >> >> - mmc0_pins_default: mmc0-0 { >> - cmd-dat-pins { >> + /* GPIOs 167-174, 176-178 set as multifunction MSDC0 */ >> + mmc0_pins_default: mmc0-pins { >> + pins-cmd-dat { >> pinmux = , >> , >> , >> @@ -232,15 +278,29 @@ examples: >> input-enable; >> mediatek,pull-up-adv = <1>; >> }; >> - clk-pins { >> + pins-clk { >> pinmux = ; >> mediatek,pull-down-adv = <2>; >> }; >> - rst-pins { >> + pins-rst { >> pinmux = ; >> mediatek,pull-up-adv = <0>; >> }; > > Best regards, > Krzysztof > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel