This series adds the wrapping node for pinmux nodes that was missing in
the mt8192-pinctrl dt-binding as well as a couple other missing
properties.
Nícolas F. R. A. Prado (4):
dt-bindings: pinctrl: mt8192: Add wrapping node for pin configurations
dt-bindings: pinctrl: mt8192: Add mediatek,drive-strength-adv property
dt-bindings: pinctrl: mt8192: Add mediatek,pull-up-adv property
dt-bindings: pinctrl: mt8192: Add gpio-line-names property
.../bindings/pinctrl/pinctrl-mt8192.yaml | 155 +++++++++++-------
1 file changed, 98 insertions(+), 57 deletions(-)
--
2.35.1
Il 15/03/22 22:19, Nícolas F. R. A. Prado ha scritto:
>
> This series adds the wrapping node for pinmux nodes that was missing in
> the mt8192-pinctrl dt-binding as well as a couple other missing
> properties.
>
>
> Nícolas F. R. A. Prado (4):
> dt-bindings: pinctrl: mt8192: Add wrapping node for pin configurations
> dt-bindings: pinctrl: mt8192: Add mediatek,drive-strength-adv property
> dt-bindings: pinctrl: mt8192: Add mediatek,pull-up-adv property
> dt-bindings: pinctrl: mt8192: Add gpio-line-names property
>
> .../bindings/pinctrl/pinctrl-mt8192.yaml | 155 +++++++++++-------
> 1 file changed, 98 insertions(+), 57 deletions(-)
>
Hello maintainers,
adding context to this series.
We are in the process of upstreaming mt8192-asurada device trees and during
the cleanup process and internal peer-review of those, we have found and fixed
those issues on the dt-bindings for pinctrl-mt8192 with this patch series.
Before submitting the series that introduces the device-trees for those machines
we need some more things in mt8192.dtsi, which are in the process of being
upstreamed by MediaTek (currently at v3 [1] - that needs small changes, but we
expect v4 to be finally ok).
For this reason, we are submitting dt-bindings fixes now, as to have a ready
ground before submitting the aforementioned device-trees (for which, we anyway
need to wait a little, as just mentioned).
[1]: https://lore.kernel.org/all/[email protected]/
Cheers,
Angelo
Add the mediatek,drive-strength-adv property to the pinctrl-mt8192
dt-binding to allow further drive current adjustments for I2C nodes on
MT8192. It is the same as in mt8183-pinctrl.
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
.../bindings/pinctrl/pinctrl-mt8192.yaml | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
index d63e23d9ed16..b52d8d0eb2d0 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
@@ -78,6 +78,32 @@ patternProperties:
dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192.
enum: [2, 4, 6, 8, 10, 12, 14, 16]
+ mediatek,drive-strength-adv:
+ description: |
+ 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
+ can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
+ driving setup, the existing generic setup will be disabled.
+ The specific driving setup is controlled by E1E0EN.
+ When E1=0/E0=0, the strength is 0.125mA.
+ When E1=0/E0=1, the strength is 0.25mA.
+ When E1=1/E0=0, the strength is 0.5mA.
+ When E1=1/E0=1, the strength is 1mA.
+ EN is used to enable or disable the specific driving setup.
+ Valid arguments are described as below:
+ 0: (E1, E0, EN) = (0, 0, 0)
+ 1: (E1, E0, EN) = (0, 0, 1)
+ 2: (E1, E0, EN) = (0, 1, 0)
+ 3: (E1, E0, EN) = (0, 1, 1)
+ 4: (E1, E0, EN) = (1, 0, 0)
+ 5: (E1, E0, EN) = (1, 0, 1)
+ 6: (E1, E0, EN) = (1, 1, 0)
+ 7: (E1, E0, EN) = (1, 1, 1)
+ So the valid arguments are from 0 to 7.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
bias-pull-down: true
bias-pull-up: true
--
2.35.1
Add the gpio-line-names optional property to the pinctrl-mt8192 binding
to prevent dt_binding_check warnings when it is present in the pinctrl
node in the Devicetree.
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
index e27cbcc6e8f9..c90a132fbc79 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
@@ -29,6 +29,8 @@ properties:
description: gpio valid number range.
maxItems: 1
+ gpio-line-names: true
+
reg:
description: |
Physical address base for gpio base registers. There are 11 GPIO
--
2.35.1
Il 15/03/22 22:19, Nícolas F. R. A. Prado ha scritto:
> Add the mediatek,drive-strength-adv property to the pinctrl-mt8192
> dt-binding to allow further drive current adjustments for I2C nodes on
> MT8192. It is the same as in mt8183-pinctrl.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
On mt8192, the pinctrl node has pinctrl groups to group pin
configurations. Each pinctrl group contains one or more pinmux subnodes
to list needed pins and their configurations. By supporting multiple
subnodes, we can configure different pin characteristics
(driving/pull-up/pull-down/etc.) in a pinctrl group.
Update the mt8192 pinctrl dt-binding to add the missing pinctrl group
node that wraps the pinmux subnodes and update the example at the end.
While at it, also remove the example embedded in the description since
it is redundant to the already supplied example at the end.
This same change was done for mt8195 in commit 79dcd4e840cc ("dt-bindings:
pinctrl: mt8195: add wrapping node of pin configurations").
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
.../bindings/pinctrl/pinctrl-mt8192.yaml | 92 ++++++++++---------
1 file changed, 47 insertions(+), 45 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
index 3c84676a167d..d63e23d9ed16 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
@@ -51,62 +51,55 @@ properties:
#PIN CONFIGURATION NODES
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.
- An example of using macro:
- pincontroller {
- /* GPIO0 set as multifunction GPIO0 */
- state_0_node_a {
- pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
- };
- /* GPIO1 set as multifunction PWM */
- state_0_node_b {
- pinmux = <PINMUX_GPIO1__FUNC_PWM_1>;
- };
- };
- $ref: "pinmux-node.yaml"
-
- properties:
- pinmux:
+ additionalProperties: false
+ patternProperties:
+ '^pins':
+ type: object
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 dt-bindings/pinctrl/<soc>-pinfunc.h directly.
+ 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: "pinmux-node.yaml"
- drive-strength:
- description: |
- It can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See
- dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192.
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
+ 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 dt-bindings/pinctrl/<soc>-pinfunc.h directly.
- bias-pull-down: true
+ drive-strength:
+ description: |
+ It can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See
+ dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192.
+ enum: [2, 4, 6, 8, 10, 12, 14, 16]
- bias-pull-up: true
+ bias-pull-down: true
- bias-disable: true
+ bias-pull-up: true
- output-high: true
+ bias-disable: true
- output-low: true
+ output-high: true
- input-enable: true
+ output-low: true
- input-disable: true
+ input-enable: true
- input-schmitt-enable: true
+ input-disable: true
- input-schmitt-disable: true
+ input-schmitt-enable: true
- required:
- - pinmux
+ input-schmitt-disable: true
- additionalProperties: false
+ required:
+ - pinmux
+
+ additionalProperties: false
allOf:
- $ref: "pinctrl.yaml#"
@@ -151,8 +144,17 @@ examples:
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH 0>;
#interrupt-cells = <2>;
- pins {
- pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
- output-low;
+ spi1-default-pins {
+ pins-cs-mosi-clk {
+ pinmux = <PINMUX_GPIO157__FUNC_SPI1_A_CSB>,
+ <PINMUX_GPIO159__FUNC_SPI1_A_MO>,
+ <PINMUX_GPIO156__FUNC_SPI1_A_CLK>;
+ bias-disable;
+ };
+
+ pins-miso {
+ pinmux = <PINMUX_GPIO158__FUNC_SPI1_A_MI>;
+ bias-pull-down;
+ };
};
};
--
2.35.1
On Tue, 15 Mar 2022 17:19:34 -0400, N?colas F. R. A. Prado wrote:
> Add the mediatek,drive-strength-adv property to the pinctrl-mt8192
> dt-binding to allow further drive current adjustments for I2C nodes on
> MT8192. It is the same as in mt8183-pinctrl.
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> ---
>
> .../bindings/pinctrl/pinctrl-mt8192.yaml | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
Reviewed-by: Rob Herring <[email protected]>
On Tue, 15 Mar 2022 17:19:33 -0400, N?colas F. R. A. Prado wrote:
> On mt8192, the pinctrl node has pinctrl groups to group pin
> configurations. Each pinctrl group contains one or more pinmux subnodes
> to list needed pins and their configurations. By supporting multiple
> subnodes, we can configure different pin characteristics
> (driving/pull-up/pull-down/etc.) in a pinctrl group.
>
> Update the mt8192 pinctrl dt-binding to add the missing pinctrl group
> node that wraps the pinmux subnodes and update the example at the end.
> While at it, also remove the example embedded in the description since
> it is redundant to the already supplied example at the end.
>
> This same change was done for mt8195 in commit 79dcd4e840cc ("dt-bindings:
> pinctrl: mt8195: add wrapping node of pin configurations").
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
>
> ---
>
> .../bindings/pinctrl/pinctrl-mt8192.yaml | 92 ++++++++++---------
> 1 file changed, 47 insertions(+), 45 deletions(-)
>
Reviewed-by: Rob Herring <[email protected]>
On Tue, 15 Mar 2022 17:19:36 -0400, N?colas F. R. A. Prado wrote:
> Add the gpio-line-names optional property to the pinctrl-mt8192 binding
> to prevent dt_binding_check warnings when it is present in the pinctrl
> node in the Devicetree.
>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> ---
>
> Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
Acked-by: Rob Herring <[email protected]>
Hi Matthias,
If you could please also pick this series through your tree that would be great
:).
This would preemptively fix warnings for my mt8192-asurada.dtsi series [1].
[1] https://lore.kernel.org/all/[email protected]/
Thanks,
N?colas
On Tue, Mar 15, 2022 at 05:19:32PM -0400, N?colas F. R. A. Prado wrote:
>
> This series adds the wrapping node for pinmux nodes that was missing in
> the mt8192-pinctrl dt-binding as well as a couple other missing
> properties.
>
>
> N?colas F. R. A. Prado (4):
> dt-bindings: pinctrl: mt8192: Add wrapping node for pin configurations
> dt-bindings: pinctrl: mt8192: Add mediatek,drive-strength-adv property
> dt-bindings: pinctrl: mt8192: Add mediatek,pull-up-adv property
> dt-bindings: pinctrl: mt8192: Add gpio-line-names property
>
> .../bindings/pinctrl/pinctrl-mt8192.yaml | 155 +++++++++++-------
> 1 file changed, 98 insertions(+), 57 deletions(-)
>
> --
> 2.35.1
>
>
> --
> To unsubscribe, send mail to [email protected].
On Tue, Mar 15, 2022 at 10:20 PM Nícolas F. R. A. Prado
<[email protected]> wrote:
> Add the gpio-line-names optional property to the pinctrl-mt8192 binding
> to prevent dt_binding_check warnings when it is present in the pinctrl
> node in the Devicetree.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Tue, Mar 15, 2022 at 10:20 PM Nícolas F. R. A. Prado
<[email protected]> wrote:
> On mt8192, the pinctrl node has pinctrl groups to group pin
> configurations. Each pinctrl group contains one or more pinmux subnodes
> to list needed pins and their configurations. By supporting multiple
> subnodes, we can configure different pin characteristics
> (driving/pull-up/pull-down/etc.) in a pinctrl group.
>
> Update the mt8192 pinctrl dt-binding to add the missing pinctrl group
> node that wraps the pinmux subnodes and update the example at the end.
> While at it, also remove the example embedded in the description since
> it is redundant to the already supplied example at the end.
>
> This same change was done for mt8195 in commit 79dcd4e840cc ("dt-bindings:
> pinctrl: mt8195: add wrapping node of pin configurations").
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
This patch 1/4 applied to the pinctrl tree.
Yours,
Linus Walleij
On Tue, Mar 15, 2022 at 10:20 PM Nícolas F. R. A. Prado
<[email protected]> wrote:
> Add the mediatek,drive-strength-adv property to the pinctrl-mt8192
> dt-binding to allow further drive current adjustments for I2C nodes on
> MT8192. It is the same as in mt8183-pinctrl.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Patch applied!
Yours,
Linus Walleij