Skip to contentSkip to conversation

dt-bindings: pinctrl: mt8192: Add mediatek,pull-down-adv property

PATCH In review Nícolas F. R. A. Prado 2 participants 3 messages Apr 29, 2022 – May 17, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: mt8192: Add mediatek,pull-down-adv property

Add the mediatek,pull-down-adv property to the pinctrl-mt8192 dt-binding to allow configuring pull-down resistors on the pins of MT8192. It is the same as in mt8183-pinctrl.

---

 .../devicetree/bindings/pinctrl/pinctrl-mt8192.yaml   | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +11 -0
index c90a132fbc79..e462f49eae6f 100644
@@ -117,6 +117,17 @@ patternProperties:
             $ref: /schemas/types.yaml#/definitions/uint32
             enum: [0, 1, 2, 3]
 
+          mediatek,pull-down-adv:
+            description: |
+              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.
+              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.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3]
+
           bias-pull-down: true
 
           bias-pull-up: true
Signature · 1 line
2.36.0
#1 lore raw
Quoted 16 lines · Nícolas F. R. A. Prado

Add the mediatek,pull-down-adv property to the pinctrl-mt8192 dt-binding to allow configuring pull-down resistors on the pins of MT8192. It is the same as in mt8183-pinctrl.

---

 .../devicetree/bindings/pinctrl/pinctrl-mt8192.yaml   | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +0 -0
index c90a132fbc79..e462f49eae6f 100644

Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml patternProperties: · line 123

Quoted 7 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +4 -0
@@ -117,6 +117,17 @@ patternProperties:
             $ref: /schemas/types.yaml#/definitions/uint32
             enum: [0, 1, 2, 3]
 
+          mediatek,pull-down-adv:
+            description: |
+              Pull down settings for 2 pull resistors, R0 and R1. User can
+              configure those special pins. Valid arguments are described as below:

Trailing ':' should be escaped, so '::'

Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml patternProperties: · line 129

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +6 -0
+              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.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3]

It's okay, but for all these and other values (you have few such in the binding), you should maybe add header and defines. It's much more readable for humans...

Is the property valid without bias-pull-down?

Best regards,
Krzysztof

#2 lore raw
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Nícolas F. R. A. Prado

Add the mediatek,pull-down-adv property to the pinctrl-mt8192 dt-binding to allow configuring pull-down resistors on the pins of MT8192. It is the same as in mt8183-pinctrl.

---

 .../devicetree/bindings/pinctrl/pinctrl-mt8192.yaml   | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +0 -0
index c90a132fbc79..e462f49eae6f 100644
@@ -117,6 +117,17 @@ patternProperties:
             $ref: /schemas/types.yaml#/definitions/uint32
             enum: [0, 1, 2, 3]
 
Quoted 6 lines

Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml patternProperties: · line 123

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +4 -0
+          mediatek,pull-down-adv:
+            description: |
+              Pull down settings for 2 pull resistors, R0 and R1. User can
+              configure those special pins. Valid arguments are described as below:

Trailing ':' should be escaped, so '::'

OK.

Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml patternProperties: · line 129

Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +6 -0
+              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.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3]
Quoted 3 lines

It's okay, but for all these and other values (you have few such in the binding), you should maybe add header and defines. It's much more readable for humans...

OK. I'll look into adding defines for these.

Quoted 2 lines

Is the property valid without bias-pull-down?

Actually it doesn't really make sense to set this property together with bias-pull-down, as they set conflicting register settings for the pin bias... I'll add a condition to avoid both being present.

Thanks,
Nícolas

Quoted 3 lines

Best regards,
Krzysztof