2022-11-05 09:08:10

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support

From: Sam Shih <[email protected]>

Since the bias-pull-{up,down} attribute already defines in pinctrl driver
of mediatek MT7986 SoC, this patch updates bindings to support mediatek
common bias-pull* function.

Signed-off-by: Sam Shih <[email protected]>
Signed-off-by: Frank Wunderlich <[email protected]>
---
.../pinctrl/mediatek,mt7986-pinctrl.yaml | 50 +++++++++++++++++--
1 file changed, 47 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
index b2b9c01efd70..216b356cd519 100644
--- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
@@ -292,9 +292,23 @@ patternProperties:

bias-disable: true

- bias-pull-up: true
-
- bias-pull-down: true
+ bias-pull-up:
+ oneOf:
+ - type: boolean
+ description: normal pull up.
+ - enum: [100, 101, 102, 103]
+ description: |
+ PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
+ dt-bindings/pinctrl/mt65xx.h.
+
+ bias-pull-down:
+ oneOf:
+ - type: boolean
+ description: normal pull down.
+ - enum: [100, 101, 102, 103]
+ description: |
+ PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
+ dt-bindings/pinctrl/mt65xx.h.

input-enable: true

@@ -346,6 +360,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/pinctrl/mt65xx.h>

soc {
#address-cells = <2>;
@@ -412,5 +427,34 @@ examples:
};
};

+ mmc0_pins_default: mmc0-pins {
+ mux {
+ function = "emmc";
+ groups = "emmc_51";
+ };
+ conf-cmd-dat {
+ pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
+ "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
+ "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
+ input-enable;
+ drive-strength = <4>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
+ };
+ conf-clk {
+ pins = "EMMC_CK";
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
+ };
+ conf-ds {
+ pins = "EMMC_DSL";
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
+ };
+ conf-rst {
+ pins = "EMMC_RSTB";
+ drive-strength = <4>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
+ };
+ };
+
};
};
--
2.34.1



2022-11-05 15:03:36

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support


On Sat, 05 Nov 2022 09:49:02 +0100, Frank Wunderlich wrote:
> From: Sam Shih <[email protected]>
>
> Since the bias-pull-{up,down} attribute already defines in pinctrl driver
> of mediatek MT7986 SoC, this patch updates bindings to support mediatek
> common bias-pull* function.
>
> Signed-off-by: Sam Shih <[email protected]>
> Signed-off-by: Frank Wunderlich <[email protected]>
> ---
> .../pinctrl/mediatek,mt7986-pinctrl.yaml | 50 +++++++++++++++++--
> 1 file changed, 47 insertions(+), 3 deletions(-)
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.example.dtb: pinctrl@1001f000: mmc0-pins:mux:groups:0: 'emmc_51' is not one of ['emmc', 'emmc_rst']
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


2022-11-05 16:02:11

by Frank Wunderlich

[permalink] [raw]
Subject: Aw: Re: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support

Hi

> Gesendet: Samstag, 05. November 2022 um 15:52 Uhr
> Von: "Rob Herring" <[email protected]>

> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.example.dtb: pinctrl@1001f000: mmc0-pins:mux:groups:0: 'emmc_51' is not one of ['emmc', 'emmc_rst']
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml

this is already solved by this Patch:

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

i decided to send a v3 or if instead of including it into this series

regards Frank

2022-11-09 08:59:47

by Linus Walleij

[permalink] [raw]
Subject: Re: Re: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support

On Wed, Nov 9, 2022 at 9:46 AM Frank Wunderlich <[email protected]> wrote:
> Am 9. November 2022 09:38:03 MEZ schrieb Linus Walleij <[email protected]>:
> >On Sat, Nov 5, 2022 at 4:06 PM Frank Wunderlich <[email protected]> wrote:
> >
>
> >That patch in turn says it needs another patch first.
> >
> >Now I am utterly confused, it is really hard to follow these trains
> >of patches depending on and breaking each other left and right...
> >
> >Can you please tell me which patches I need to apply and
> >in which order?
>
> Sorry, picked the wrong link. Put all pinctrl patches together into this series to make it easier to follow (but v2 because v1 was for changing only mmc pinctrl and to have no conflicts or "broken" commits):
>
> https://patchwork.kernel.org/project/linux-mediatek/list/?series=692462

Thanks I figured it out I think, even managed to apply it now!

Yours,
Linus Walleij

2022-11-09 09:12:55

by Frank Wunderlich

[permalink] [raw]
Subject: Re: Re: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support

Am 9. November 2022 09:38:03 MEZ schrieb Linus Walleij <[email protected]>:
>On Sat, Nov 5, 2022 at 4:06 PM Frank Wunderlich <[email protected]> wrote:
>

>That patch in turn says it needs another patch first.
>
>Now I am utterly confused, it is really hard to follow these trains
>of patches depending on and breaking each other left and right...
>
>Can you please tell me which patches I need to apply and
>in which order?

Sorry, picked the wrong link. Put all pinctrl patches together into this series to make it easier to follow (but v2 because v1 was for changing only mmc pinctrl and to have no conflicts or "broken" commits):

https://patchwork.kernel.org/project/linux-mediatek/list/?series=692462

>Yours,
>Linus Walleij


regards Frank

2022-11-09 09:39:42

by Linus Walleij

[permalink] [raw]
Subject: Re: Re: [PATCH v1 1/4] dt-bindings: pinctrl: mt7986: add generic bias-pull* support

On Sat, Nov 5, 2022 at 4:06 PM Frank Wunderlich <[email protected]> wrote:

> > Gesendet: Samstag, 05. November 2022 um 15:52 Uhr
> > Von: "Rob Herring" <[email protected]>
>
> > yamllint warnings/errors:
> >
> > dtschema/dtc warnings/errors:
> > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.example.dtb: pinctrl@1001f000: mmc0-pins:mux:groups:0: 'emmc_51' is not one of ['emmc', 'emmc_rst']
> > From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
>
> this is already solved by this Patch:
>
> https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
>
> i decided to send a v3 or if instead of including it into this series

That patch in turn says it needs another patch first.

Now I am utterly confused, it is really hard to follow these trains
of patches depending on and breaking each other left and right...

Can you please tell me which patches I need to apply and
in which order?

Yours,
Linus Walleij