* [PATCH v3 1/3] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property
2023-04-04 16:29 [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
@ 2023-04-04 16:29 ` Alexandre Mergnat
2023-04-05 9:31 ` AngeloGioacchino Del Regno
2023-04-04 16:29 ` [PATCH v3 2/3] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 Alexandre Mergnat
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Alexandre Mergnat @ 2023-04-04 16:29 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 bf67d4672455..ff24cf29eea7 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
@@ -217,7 +222,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>;
};
};
@@ -226,7 +231,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 5aa8ba4cb547..dce9fd1a6a72 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
@@ -191,7 +196,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] 7+ messages in thread* Re: [PATCH v3 1/3] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property
2023-04-04 16:29 ` [PATCH v3 1/3] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Alexandre Mergnat
@ 2023-04-05 9:31 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-05 9:31 UTC (permalink / raw)
To: Alexandre Mergnat, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Matthias Brugger, Zhiyong Tao,
Bernhard Rosenkränzer
Cc: linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Il 04/04/23 18:29, Alexandre Mergnat ha scritto:
> 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>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365
2023-04-04 16:29 [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
2023-04-04 16:29 ` [PATCH v3 1/3] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Alexandre Mergnat
@ 2023-04-04 16:29 ` Alexandre Mergnat
2023-04-05 9:31 ` AngeloGioacchino Del Regno
2023-04-04 16:29 ` [PATCH v3 3/3] dt-bindings: pinctrl: mediatek,mt8365-pinctrl: add drive strength property Alexandre Mergnat
2023-04-10 22:20 ` [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Linus Walleij
3 siblings, 1 reply; 7+ messages in thread
From: Alexandre Mergnat @ 2023-04-04 16:29 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 | 36 ++++++++++++++++++----
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
index dce9fd1a6a72..75d74b92c767 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:
- 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.
-
- bias-pull-down: true
+ oneOf:
+ - type: boolean
+ - enum: [100, 101, 102, 103]
+ description: Pull up R1/R0 type define value.
+ description: |
+ 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:
+ 100: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
+ 101: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
+ 102: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
+ 103: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
+
+ 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:
+ 100: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
+ 101: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
+ 102: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
+ 103: (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:
@@ -135,7 +157,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:
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 2/3] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365
2023-04-04 16:29 ` [PATCH v3 2/3] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 Alexandre Mergnat
@ 2023-04-05 9:31 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-05 9:31 UTC (permalink / raw)
To: Alexandre Mergnat, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Matthias Brugger, Zhiyong Tao,
Bernhard Rosenkränzer
Cc: linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Il 04/04/23 18:29, Alexandre Mergnat ha scritto:
> 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>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 3/3] dt-bindings: pinctrl: mediatek,mt8365-pinctrl: add drive strength property
2023-04-04 16:29 [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
2023-04-04 16:29 ` [PATCH v3 1/3] dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Alexandre Mergnat
2023-04-04 16:29 ` [PATCH v3 2/3] dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 Alexandre Mergnat
@ 2023-04-04 16:29 ` Alexandre Mergnat
2023-04-10 22:20 ` [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Linus Walleij
3 siblings, 0 replies; 7+ messages in thread
From: Alexandre Mergnat @ 2023-04-04 16:29 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
This SoC is able to drive the following output current:
- 2 mA
- 4 mA
- 6 mA
- 8 mA
- 10 mA
- 12 mA
- 14 mA
- 16 mA
Then drive-strength property is set with enum to reflect its HW capability.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
index 75d74b92c767..61b33b5416f5 100644
--- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
@@ -99,6 +99,9 @@ patternProperties:
102: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
103: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
+ drive-strength:
+ enum: [2, 4, 6, 8, 10, 12, 14, 16]
+
input-enable: true
input-disable: true
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding
2023-04-04 16:29 [PATCH v3 0/3] Cleanup Mediatek pinctrl device tree binding Alexandre Mergnat
` (2 preceding siblings ...)
2023-04-04 16:29 ` [PATCH v3 3/3] dt-bindings: pinctrl: mediatek,mt8365-pinctrl: add drive strength property Alexandre Mergnat
@ 2023-04-10 22:20 ` Linus Walleij
3 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2023-04-10 22:20 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 Tue, Apr 4, 2023 at 6:30 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
>
> Another commit has been added in v3 to make it easier to merge. [2]
>
> Thanks AngeloGioacchino Del Regno to reported it. [1]
>
> [1]: https://lore.kernel.org/all/6e08d78f-ef4c-b228-f7d2-d63767ea87b8@collabora.com/
> [2]: https://lore.kernel.org/all/20230203-evk-board-support-v4-2-5cffe66a38c0@baylibre.com/
> [3]: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Patches applied!
Thanks for you excellent attention to detail!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread