From: Yassine Oudjana <yassine.oudjana@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Sean Wang <sean.wang@kernel.org>,
Andy Teng <andy.teng@mediatek.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Yassine Oudjana <y.oudjana@protonmail.com>,
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
Subject: Re: [PATCH v4 09/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6795
Date: Sun, 30 Oct 2022 13:05:59 +0300 [thread overview]
Message-ID: <ZD9KKR.M2TT1QFA4FT92@gmail.com> (raw)
In-Reply-To: <e34b35f4-4197-3973-0947-14ee577494e9@linaro.org>
On Fri, Oct 28 2022 at 16:01:58 -04:00:00, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> On 28/10/2022 11:35, Yassine Oudjana wrote:
>> From: Yassine Oudjana <y.oudjana@protonmail.com>
>>
>> Combine MT6795 pin controller document into MT6779 one. In the
>> process, amend the example with comments and additional pinctrl
>> nodes from the MT6795 example, replace the current interrupts
>> property description with the one from the MT6795 document since
>> it makes more sense and define its items using conditionals
>> as they now vary between variants. Also use conditionals to define
>> valid values for the drive-strength property for each variant.
>>
>> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
>> ---
>> .../pinctrl/mediatek,mt6779-pinctrl.yaml | 189 ++++++++++-----
>> .../pinctrl/mediatek,pinctrl-mt6795.yaml | 227
>> ------------------
>> 2 files changed, 127 insertions(+), 289 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 70e4ffa2d897..6f2cffe50b11 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 <andy.teng@mediatek.com>
>> + - AngeloGioacchino Del Regno
>> <angelogioacchino.delregno@collabora.com>
>> - Sean Wang <sean.wang@kernel.org>
>>
>> description:
>> @@ -18,6 +19,7 @@ properties:
>> compatible:
>> enum:
>> - mediatek,mt6779-pinctrl
>> + - mediatek,mt6795-pinctrl
>> - mediatek,mt6797-pinctrl
>>
>> reg:
>> @@ -43,9 +45,7 @@ properties:
>> interrupt-controller: true
>>
>> interrupts:
>> - maxItems: 1
>
> Leave the constraints.
>
> Why? Because now you dropped it for mt6797... You bring here some
> random
> changes and it is difficult to review it.
Fair point. I'll undo this.
I was thinking that MT6797 doesn't take any interrupts at the moment,
but I'm certain the hardware does in fact have interrupts, so leaving
the constraint should both keep the bindings more accurate and reduce
the DT compatibility breakage when someone implements interrupts later.
>
>> - description: |
>> - Specifies the summary IRQ.
>> + description: Interrupt outputs to the system interrupt
>> controller (sysirq).
>>
>> "#interrupt-cells":
>> const: 2
>> @@ -57,59 +57,6 @@ required:
>> - gpio-controller
>> - "#gpio-cells"
>>
>> -allOf:
>> - - $ref: "pinctrl.yaml#"
>> - - if:
>> - properties:
>
> Make the move of this hunk in your description cleanup patch. Don't
> mix
> functional changes and some cleanups.
The idea was that drive-strength was to be defined first then have its
constraints set in the conditionals, so I moved this below the
patternProperties block to accomplish that. Now I'm thinking of putting
it here to begin with so that I wouldn't need to move it in this patch.
What do you think?
>> - compatible:
>> - contains:
>> - const: mediatek,mt6779-pinctrl
>> - then:
>> - properties:
>> - reg:
>> - minItems: 9
>> - maxItems: 9
>> -
>> - reg-names:
>> - items:
>> - - const: gpio
>> - - const: iocfg_rm
>> - - const: iocfg_br
>> - - const: iocfg_lm
>> - - const: iocfg_lb
>> - - const: iocfg_rt
>> - - const: iocfg_lt
>> - - const: iocfg_tl
>> - - const: eint
>> - - if:
>> - properties:
>> - compatible:
>> - contains:
>> - const: mediatek,mt6797-pinctrl
>> - then:
>> - properties:
>> - reg:
>> - minItems: 5
>> - maxItems: 5
>> -
>> - reg-names:
>> - items:
>> - - const: gpio
>> - - const: iocfgl
>> - - const: iocfgb
>> - - const: iocfgr
>> - - const: iocfgt
>> - - if:
>> - properties:
>> - reg-names:
>> - contains:
>> - const: eint
>> - then:
>> - required:
>> - - interrupts
>> - - interrupt-controller
>> - - "#interrupt-cells"
>> -
>> patternProperties:
>> '-pins$':
>> type: object
>> @@ -169,8 +116,7 @@ patternProperties:
>>
>> input-schmitt-disable: true
>>
>> - drive-strength:
>> - enum: [2, 4, 8, 12, 16]
>> + drive-strength: true
>>
>> slew-rate:
>> enum: [0, 1]
>> @@ -202,6 +148,110 @@ patternProperties:
>>
>> additionalProperties: false
>>
>> +allOf:
>> + - $ref: "pinctrl.yaml#"
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: mediatek,mt6779-pinctrl
>> + then:
>> + properties:
>> + reg:
>> + minItems: 9
>> + maxItems: 9
>> +
>> + reg-names:
>> + items:
>> + - const: gpio
>> + - const: iocfg_rm
>> + - const: iocfg_br
>> + - const: iocfg_lm
>> + - const: iocfg_lb
>> + - const: iocfg_rt
>> + - const: iocfg_lt
>> + - const: iocfg_tl
>> + - const: eint
>> +
>> + interrupts:
>> + items:
>> + - description: EINT interrupt
>> +
>> + patternProperties:
>> + '-pins$':
>> + patternProperties:
>> + '^pins':
>> + properties:
>> + drive-strength:
>> + enum: [2, 4, 8, 12, 16]
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: mediatek,mt6795-pinctrl
>> + then:
>> + properties:
>> + reg:
>> + minItems: 2
>> + maxItems: 2
>> +
>> + reg-names:
>> + items:
>> + - const: base
>> + - const: eint
>> +
>> + interrupts:
>> + items:
>> + - description: EINT interrupt
>> + - description: EINT event_b interrupt
>> +
>> + patternProperties:
>> + '-pins$':
>> + patternProperties:
>> + '^pins':
>> + properties:
>> + drive-strength:
>> + enum: [2, 4, 6, 8, 10, 12, 14, 16]
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: mediatek,mt6797-pinctrl
>> + then:
>> + properties:
>> + reg:
>> + minItems: 5
>> + maxItems: 5
>> +
>> + reg-names:
>> + items:
>> + - const: gpio
>> + - const: iocfgl
>> + - const: iocfgb
>> + - const: iocfgr
>> + - const: iocfgt
>> +
>> + patternProperties:
>> + '-pins$':
>> + patternProperties:
>> + '^pins':
>> + properties:
>> + drive-strength:
>> + enum: [2, 4, 8, 12, 16]
>> +
>> + - if:
>> + properties:
>> + reg-names:
>> + contains:
>> + const: eint
>> + then:
>> + required:
>> + - interrupts
>> + - interrupt-controller
>> + - "#interrupt-cells"
>> +
>> additionalProperties: false
>>
>> examples:
>> @@ -237,8 +287,9 @@ examples:
>> #interrupt-cells = <2>;
>> interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
>>
>> - mmc0_pins_default: mmc0-0 {
>> - cmd-dat-pins {
>
> How this is related to the patch?
>
> Organize the patches so they are easy for review.
Sorry, this was meant to be in the previous patch that changed the
subnode name patterns. I'll move it there for the next revision.
Thanks,
Yassine
next prev parent reply other threads:[~2022-10-30 10:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 15:34 [PATCH v4 00/13] MediaTek pinctrl DT binding cleanup and MT6735 pinctrl support Yassine Oudjana
2022-10-28 15:34 ` [PATCH v4 01/13] arm64: dts: mediatek: mt6779: Remove syscon compatible from pin controller Yassine Oudjana
2022-11-08 12:18 ` Linus Walleij
2022-11-08 16:50 ` Matthias Brugger
2022-10-28 15:34 ` [PATCH v4 02/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Improve description Yassine Oudjana
2022-11-08 12:20 ` Linus Walleij
2022-10-28 15:34 ` [PATCH v4 03/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Make gpio-ranges optional Yassine Oudjana
2022-11-08 12:21 ` Linus Walleij
2022-10-28 15:34 ` [PATCH v4 04/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6797 Yassine Oudjana
2022-11-08 12:21 ` Linus Walleij
2022-10-28 15:34 ` [PATCH v4 05/13] dt-bindings: pinctrl: mediatek,pinctrl-mt6795: Fix interrupt count Yassine Oudjana
2022-10-28 19:55 ` Krzysztof Kozlowski
2022-11-08 12:22 ` Linus Walleij
2022-10-28 15:34 ` [PATCH v4 06/13] dt-bindings: pinctrl: mediatek,pinctrl-mt6795: Improve interrupts description Yassine Oudjana
2022-10-28 19:55 ` Krzysztof Kozlowski
2022-11-08 12:23 ` Linus Walleij
2022-10-28 15:34 ` [PATCH v4 07/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Pull pinctrl node changes from MT6795 document Yassine Oudjana
2022-10-28 19:04 ` Rob Herring
2022-10-28 15:35 ` [PATCH v4 08/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Improve pinctrl subnode and property descriptions Yassine Oudjana
2022-10-28 19:58 ` Krzysztof Kozlowski
2022-10-30 9:49 ` Yassine Oudjana
2022-10-28 15:35 ` [PATCH v4 09/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6795 Yassine Oudjana
2022-10-28 20:01 ` Krzysztof Kozlowski
2022-10-30 10:05 ` Yassine Oudjana [this message]
2022-10-28 15:35 ` [PATCH v4 10/13] arm64: dts: mediatek: mt6797: Make pin configuration nodes follow DT bindings Yassine Oudjana
2022-10-28 15:35 ` [PATCH v4 11/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller Yassine Oudjana
2022-10-28 15:35 ` [PATCH v4 12/13] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6735 " Yassine Oudjana
2022-10-28 15:35 ` [PATCH v4 13/13] pinctrl: mediatek: Add MT6735 pinctrl driver Yassine Oudjana
2022-11-08 12:26 ` [PATCH v4 00/13] MediaTek pinctrl DT binding cleanup and MT6735 pinctrl support Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZD9KKR.M2TT1QFA4FT92@gmail.com \
--to=yassine.oudjana@gmail.com \
--cc=andy.teng@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@kernel.org \
--cc=y.oudjana@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).