* [PATCH v2 1/2] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property
2023-03-31 17:38 [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
@ 2023-03-31 17:38 ` Alexandre Mergnat
2023-03-31 17:39 ` [PATCH v2 2/2] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 Alexandre Mergnat
2023-04-04 13:56 ` [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Alexandre Mergnat @ 2023-03-31 17:38 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
AngeloGioacchino Del Regno, Zhiyong Tao,
Bernhard Rosenkränzer
Cc: linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Alexandre Mergnat, Krzysztof Kozlowski
Deprecate mediatek,drive-strength-adv which shall not exist, that was an
unnecessary property that leaked upstream from downstream kernels and
there's no reason to use it.
The generic property drive-strength-microamp should be used instead.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
.../devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml | 8 ++++++--
.../devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
index c30cd0d010dd..b82a066b91ec 100644
--- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
@@ -110,8 +110,13 @@ patternProperties:
drive-strength:
enum: [2, 4, 6, 8, 10, 12, 14, 16]
+ drive-strength-microamp:
+ enum: [125, 250, 500, 1000]
+
mediatek,drive-strength-adv:
+ deprecated: true
description: |
+ DEPRECATED: Please use drive-strength-microamp instead.
Describe the specific driving setup property.
For I2C pins, the existing generic driving setup can only support
2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
@@ -215,7 +220,7 @@ examples:
pinmux = <PINMUX_GPIO48__FUNC_SCL5>,
<PINMUX_GPIO49__FUNC_SDA5>;
mediatek,pull-up-adv = <3>;
- mediatek,drive-strength-adv = <7>;
+ drive-strength-microamp = <1000>;
};
};
@@ -224,7 +229,6 @@ examples:
pinmux = <PINMUX_GPIO50__FUNC_SCL3>,
<PINMUX_GPIO51__FUNC_SDA3>;
mediatek,pull-down-adv = <2>;
- mediatek,drive-strength-adv = <4>;
};
};
};
diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
index 4b96884a1afc..347f533776ba 100644
--- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
@@ -91,8 +91,13 @@ patternProperties:
input-schmitt-disable: true
+ drive-strength-microamp:
+ enum: [125, 250, 500, 1000]
+
mediatek,drive-strength-adv:
+ deprecated: true
description: |
+ DEPRECATED: Please use drive-strength-microamp instead.
Describe the specific driving setup property.
For I2C pins, the existing generic driving setup can only support
2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
@@ -189,7 +194,6 @@ examples:
pins {
pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>, <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
mediatek,pull-up-adv = <3>;
- mediatek,drive-strength-adv = <00>;
bias-pull-up;
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/2] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365
2023-03-31 17:38 [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
2023-03-31 17:38 ` [PATCH v2 1/2] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Alexandre Mergnat
@ 2023-03-31 17:39 ` Alexandre Mergnat
2023-04-04 13:56 ` [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Alexandre Mergnat @ 2023-03-31 17:39 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
AngeloGioacchino Del Regno, Zhiyong Tao,
Bernhard Rosenkränzer
Cc: linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Alexandre Mergnat, Krzysztof Kozlowski
In order to be more generic, "mediatek,pull-up-adv" and
"mediatek,pull-down-adv" should be deprecated. Use "bias-pull-up" and
"bias-pull-down" instead.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
.../bindings/pinctrl/mediatek,mt8365-pinctrl.yaml | 32 +++++++++++++++++++---
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
index 347f533776ba..2ce6a69b0bf9 100644
--- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
@@ -72,12 +72,32 @@ patternProperties:
bias-disable: true
bias-pull-up:
+ oneOf:
+ - type: boolean
+ - enum: [100, 101, 102, 103]
+ description: Pull up R1/R0 type define value.
description: |
- Besides generic pinconfig options, it can be used as the pull up
- settings for 2 pull resistors, R0 and R1. User can configure those
- special pins.
+ For pull up type is normal, it don't need add R1/R0 define.
+ For pull up type is R1/R0 type, it can add value to set different
+ resistance. Valid arguments are described as below:
+ 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
+ 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
+ 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
+ 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
- bias-pull-down: true
+ bias-pull-down:
+ oneOf:
+ - type: boolean
+ - enum: [100, 101, 102, 103]
+ description: Pull down R1/R0 type define value.
+ description: |
+ For pull down type is normal, it don't need add R1/R0 define.
+ For pull down type is R1/R0 type, it can add value to set
+ different resistance. Valid arguments are described as below:
+ 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
+ 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
+ 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
+ 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
input-enable: true
@@ -123,7 +143,9 @@ patternProperties:
enum: [0, 1, 2, 3, 4, 5, 6, 7]
mediatek,pull-up-adv:
+ deprecated: true
description: |
+ DEPRECATED: Please use bias-pull-up instead.
Pull up setings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
@@ -134,7 +156,9 @@ patternProperties:
enum: [0, 1, 2, 3]
mediatek,pull-down-adv:
+ deprecated: true
description: |
+ DEPRECATED: Please use bias-pull-down instead.
Pull down settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding
2023-03-31 17:38 [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
2023-03-31 17:38 ` [PATCH v2 1/2] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Alexandre Mergnat
2023-03-31 17:39 ` [PATCH v2 2/2] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 Alexandre Mergnat
@ 2023-04-04 13:56 ` Linus Walleij
2023-04-04 16:47 ` Alexandre Mergnat
2 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2023-04-04 13:56 UTC (permalink / raw)
To: Alexandre Mergnat
Cc: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
AngeloGioacchino Del Regno, Zhiyong Tao,
Bernhard Rosenkränzer, linux-gpio, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Krzysztof Kozlowski
On Fri, Mar 31, 2023 at 7:39 PM Alexandre Mergnat <amergnat@baylibre.com> wrote:
> Deprecate properties which shall not exist, leaked upstream from downstream
> kernels, there's no reason to use them. Here the deprecated properties and
> the generic properties which will replace them:
>
> - mediatek,drive-strength-adv => drive-strength-microamp
> - mediatek,pull-up-adv => bias-pull-up
> - mediatek,pull-down-adv => bias-pull-down
>
> Thanks AngeloGioacchino Del Regno to reported it. [1]
>
> [1]: https://lore.kernel.org/all/6e08d78f-ef4c-b228-f7d2-d63767ea87b8@collabora.com/
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
> ---
> Changes in v2:
> - Change the bias-pull enum values to match with other Mediatek SoC.
> That allows to use MTK generic define and be compliant with the MTK
> common pinctrl driver.
> - Link to v1: https://lore.kernel.org/r/20230327-cleanup-pinctrl-binding-v1-0-b695e32e4f2e@baylibre.com
These patches does not apply to my devel branch:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel
Can you please rebase and resend?
If you have several conflicting patches that need to be applied to the
pinctrl tree, then collect them all in a series so I can apply them all
at once. Thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding
2023-04-04 13:56 ` [PATCH v2 0/2] Cleanup Mediatek pinctrl device tree binding Linus Walleij
@ 2023-04-04 16:47 ` Alexandre Mergnat
0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Mergnat @ 2023-04-04 16:47 UTC (permalink / raw)
To: Linus Walleij
Cc: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
AngeloGioacchino Del Regno, Zhiyong Tao,
Bernhard Rosenkränzer, linux-gpio, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Krzysztof Kozlowski
Hi Linus,
On 04/04/2023 15:56, Linus Walleij wrote:
> On Fri, Mar 31, 2023 at 7:39 PM Alexandre Mergnat <amergnat@baylibre.com> wrote:
>
>> Deprecate properties which shall not exist, leaked upstream from downstream
>> kernels, there's no reason to use them. Here the deprecated properties and
>> the generic properties which will replace them:
>>
>> - mediatek,drive-strength-adv => drive-strength-microamp
>> - mediatek,pull-up-adv => bias-pull-up
>> - mediatek,pull-down-adv => bias-pull-down
>>
>> Thanks AngeloGioacchino Del Regno to reported it. [1]
>>
>> [1]: https://lore.kernel.org/all/6e08d78f-ef4c-b228-f7d2-d63767ea87b8@collabora.com/
>>
>> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
>> ---
>> Changes in v2:
>> - Change the bias-pull enum values to match with other Mediatek SoC.
>> That allows to use MTK generic define and be compliant with the MTK
>> common pinctrl driver.
>> - Link to v1: https://lore.kernel.org/r/20230327-cleanup-pinctrl-binding-v1-0-b695e32e4f2e@baylibre.com
> These patches does not apply to my devel branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel
>
> Can you please rebase and resend?
>
> If you have several conflicting patches that need to be applied to the
> pinctrl tree, then collect them all in a series so I can apply them all
> at once. Thanks!
It's done here:
https://lore.kernel.org/all/20230327-cleanup-pinctrl-binding-v3-0-6f56d5c7a8de@baylibre.com/
I also added the patch which modify the pinctrl from the other serie:
https://lore.kernel.org/all/CACRpkdYSpMD-V0QNGwtiKCA4KAedYfmFpvdCHWhjST9uTricTg@mail.gmail.com/
Regards,
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread