Skip to contentSkip to conversation

dt-bindings: pinctrl: cy8x95x0: Minor fix & update

PATCH In review Naresh Solanki 2 participants 3 messages Jan 30, 2024 – Feb 2, 2024

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

PATCH v3 1/1 dt-bindings: pinctrl: cy8x95x0: Minor fix & update

Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio reserved ranges.
Add input-enable property to allow configuring a pin as input. Update example & fix alignment.

---
 .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 38 ++++++++++++++-----
 1 file changed, 28 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +28 -10
index 7f30ec2f1e54..90dda5d3cc55 100644
@@ -45,7 +45,8 @@ properties:
     maxItems: 1
 
   gpio-reserved-ranges:
-    maxItems: 1
+    minItems: 1
+    maxItems: 60
 
   vdd-supply:
     description:
@@ -85,6 +86,8 @@ patternProperties:
 
       bias-disable: true
 
+      input-enable: true
+
       output-high: true
 
       output-low: true
@@ -125,14 +128,29 @@ examples:
       #size-cells = <0>;
 
       pinctrl@20 {
-        compatible = "cypress,cy8c9520";
-        reg = <0x20>;
-        gpio-controller;
-        #gpio-cells = <2>;
-        #interrupt-cells = <2>;
-        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
-        interrupt-controller;
-        vdd-supply = <&p3v3>;
-        gpio-reserved-ranges = <5 1>;
+          compatible = "cypress,cy8c9520";
+          reg = <0x20>;
+          gpio-controller;
+          #gpio-cells = <2>;
+          #interrupt-cells = <2>;
+          interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+          interrupt-controller;
+          vdd-supply = <&p3v3>;
+          gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
+
+          pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
+          pinctrl-names = "default";
+          U62160_pins: cfg-pins {
+              pins = "gp03", "gp16", "gp20", "gp50", "gp51";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };
+          U62160_ipins: icfg-pins {
+              pins = "gp04", "gp17", "gp21", "gp52", "gp53";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };
       };
     };

base-commit: 861c0981648f5b64c86fd028ee622096eb7af05a

Signature · 1 line
2.42.0
#1 lore raw
Quoted 1 line · Naresh Solanki

Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio

Subject: everything can be a fix and everything is update. Write something useful.

Quoted 36 lines

reserved ranges.
Add input-enable property to allow configuring a pin as input. Update example & fix alignment.

---
 .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 38 ++++++++++++++-----
 1 file changed, 28 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +4 -1
index 7f30ec2f1e54..90dda5d3cc55 100644
@@ -45,7 +45,8 @@ properties:
     maxItems: 1
 
   gpio-reserved-ranges:
-    maxItems: 1
+    minItems: 1
+    maxItems: 60
 
   vdd-supply:
     description:
@@ -85,6 +86,8 @@ patternProperties:
 
       bias-disable: true
 
+      input-enable: true
+
       output-high: true
 
       output-low: true
@@ -125,14 +128,29 @@ examples:
       #size-cells = <0>;
 
       pinctrl@20 {

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 131

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +1 -9
-        compatible = "cypress,cy8c9520";
-        reg = <0x20>;
-        gpio-controller;
-        #gpio-cells = <2>;
-        #interrupt-cells = <2>;
-        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
-        interrupt-controller;
-        vdd-supply = <&p3v3>;
-        gpio-reserved-ranges = <5 1>;
+          compatible = "cypress,cy8c9520";

I don't understand why you change from correct indentation to mixed one (2 and 4 spaces). It does not make sense.

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 142

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +11 -0
+          reg = <0x20>;
+          gpio-controller;
+          #gpio-cells = <2>;
+          #interrupt-cells = <2>;
+          interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+          interrupt-controller;
+          vdd-supply = <&p3v3>;
+          gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
+
+          pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
+          pinctrl-names = "default";

Missing blank line.

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 148

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +6 -0
+          U62160_pins: cfg-pins {
+              pins = "gp03", "gp16", "gp20", "gp50", "gp51";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };

Missing blank line.

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 156

Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +6 -0
+          U62160_ipins: icfg-pins {
+              pins = "gp04", "gp17", "gp21", "gp52", "gp53";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };
       };
     };

Best regards,
Krzysztof

#2 lore raw

Hi Krzysztof,

Quoted 6 lines · Krzysztof Kozlowski
Quoted 1 line · Naresh Solanki

Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio

Subject: everything can be a fix and everything is update. Write something useful.

Sure. Will update as:
dt-bindings: pinctrl: cy8x95x0: Update gpio-reserved-ranges

Quoted 36 lines
Quoted 36 lines

reserved ranges.
Add input-enable property to allow configuring a pin as input. Update example & fix alignment.

---
 .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 38 ++++++++++++++-----
 1 file changed, 28 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +4 -1
index 7f30ec2f1e54..90dda5d3cc55 100644
@@ -45,7 +45,8 @@ properties:
     maxItems: 1
 
   gpio-reserved-ranges:
-    maxItems: 1
+    minItems: 1
+    maxItems: 60
 
   vdd-supply:
     description:
@@ -85,6 +86,8 @@ patternProperties:
 
       bias-disable: true
 
+      input-enable: true
+
       output-high: true
 
       output-low: true
@@ -125,14 +128,29 @@ examples:
       #size-cells = <0>;
 
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 131

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +1 -9
       pinctrl@20 {
-        compatible = "cypress,cy8c9520";
-        reg = <0x20>;
-        gpio-controller;
-        #gpio-cells = <2>;
-        #interrupt-cells = <2>;
-        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
-        interrupt-controller;
-        vdd-supply = <&p3v3>;
-        gpio-reserved-ranges = <5 1>;
+          compatible = "cypress,cy8c9520";

I don't understand why you change from correct indentation to mixed one (2 and 4 spaces). It does not make sense.

Yes indentation is missed. I'll correct to 2 space in next patch revision

Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 142

Quoted 13 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +11 -0
+          reg = <0x20>;
+          gpio-controller;
+          #gpio-cells = <2>;
+          #interrupt-cells = <2>;
+          interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+          interrupt-controller;
+          vdd-supply = <&p3v3>;
+          gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
+
+          pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
+          pinctrl-names = "default";
Quoted 1 line

Missing blank line.

Will fix in next revision.

Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 148

Quoted 7 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +6 -0
+          U62160_pins: cfg-pins {
+              pins = "gp03", "gp16", "gp20", "gp50", "gp51";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };

Missing blank line.

Will fix in next revision.

Regards,
Naresh

Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml examples: · line 156

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml +6 -0
+          U62160_ipins: icfg-pins {
+              pins = "gp04", "gp17", "gp21", "gp52", "gp53";
+              function = "gpio";
+              input-enable;
+              bias-pull-up;
+          };
       };
     };

Best regards,
Krzysztof