Skip to contentSkip to conversation

dt-bindings: regulator: Convert TPS62360 binding to json-schema

PATCH Superseded Georgi Vlaev 4 participants 6 messages Mar 3, 2022 – Mar 7, 2022

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: regulator: Convert TPS62360 binding to json-schema

Convert the TPS62360 regulator binding to DT schema format using json-schema.

---
 .../bindings/regulator/ti,tps62360.yaml       | 99 +++++++++++++++++++
 .../bindings/regulator/tps62360-regulator.txt | 44 ---------
 2 files changed, 99 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps62360.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +99 -0
new file mode 100644
index 000000000000..73674ef4d903
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,tps62360.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS6236x Voltage Regulators
+
+maintainers:
+  - Laxman Dewangan <[email protected]>
+
+description: |
+  The TPS6236x are a family of step down dc-dc converter with
+  an input voltage range of 2.5V to 5.5V. The devices provide
+  up to 3A peak load current, and an output voltage range of
+  0.77V to 1.4V (TPS62360/62) and 0.5V to 1.77V (TPS62361B/63).
+
+  Datasheet is available at:
+  https://www.ti.com/lit/gpn/tps62360
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - ti,tps62360
+      - ti,tps62361
+      - ti,tps62362
+      - ti,tps62363
+
+  reg:
+    maxItems: 1
+
+  ti,vsel0-gpio:
+    description: |
+      GPIO for controlling VSEL0 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL0 control.
+    maxItems: 1
+
+  ti,vsel1-gpio:
+    description: |
+      GPIO for controlling VSEL1 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL1 control.
+    maxItems: 1
+
+  ti,enable-vout-discharge:
+    description: Enable output discharge.
+    type: boolean
+
+  ti,enable-pull-down:
+    description: Enable pull down.
+    type: boolean
+
+  ti,vsel0-state-high:
+    description: |
+      Initial state of VSEL0 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+  ti,vsel1-state-high:
+    description: |
+      Initial state of VSEL1 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        regulator@60 {
+          compatible = "ti,tps62361";
+          reg =  <0x60>;
+          regulator-name = "tps62361-vout";
+          regulator-min-microvolt = <500000>;
+          regulator-max-microvolt = <1500000>;
+          regulator-boot-on;
+          ti,vsel0-gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+          ti,vsel1-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+          ti,vsel0-state-high;
+          ti,vsel1-state-high;
+          ti,enable-pull-down;
+          ti,enable-force-pwm;
+          ti,enable-vout-discharge;
+        };
+    };
+
+...
Documentation/devicetree/bindings/regulator/tps62360-regulator.txt deleted +0 -44

44 lines not on this page · raw message

Signature · 1 line
2.30.2
#1 lore raw
Quoted 90 lines · Georgi Vlaev

Convert the TPS62360 regulator binding to DT schema format using json-schema.

---
 .../bindings/regulator/ti,tps62360.yaml       | 99 +++++++++++++++++++
 .../bindings/regulator/tps62360-regulator.txt | 44 ---------
 2 files changed, 99 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps62360.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +73 -0
new file mode 100644
index 000000000000..73674ef4d903
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,tps62360.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS6236x Voltage Regulators
+
+maintainers:
+  - Laxman Dewangan <[email protected]>
+
+description: |
+  The TPS6236x are a family of step down dc-dc converter with
+  an input voltage range of 2.5V to 5.5V. The devices provide
+  up to 3A peak load current, and an output voltage range of
+  0.77V to 1.4V (TPS62360/62) and 0.5V to 1.77V (TPS62361B/63).
+
+  Datasheet is available at:
+  https://www.ti.com/lit/gpn/tps62360
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - ti,tps62360
+      - ti,tps62361
+      - ti,tps62362
+      - ti,tps62363
+
+  reg:
+    maxItems: 1
+
+  ti,vsel0-gpio:
+    description: |
+      GPIO for controlling VSEL0 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL0 control.
+    maxItems: 1
+
+  ti,vsel1-gpio:
+    description: |
+      GPIO for controlling VSEL1 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL1 control.
+    maxItems: 1
+
+  ti,enable-vout-discharge:
+    description: Enable output discharge.
+    type: boolean
+
+  ti,enable-pull-down:
+    description: Enable pull down.
+    type: boolean
+
+  ti,vsel0-state-high:
+    description: |
+      Initial state of VSEL0 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+  ti,vsel1-state-high:
+    description: |
+      Initial state of VSEL1 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false

Documentation/devicetree/bindings/regulator/ti,tps62360.yaml line 83

Quoted 10 lines
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +10 -0
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        regulator@60 {
+          compatible = "ti,tps62361";

In-consisting indentation. Use 4 spaces for entire DT example.

Rest looks good.

Best regards,
Krzysztof

#2 lore raw

PATCH v2 1/1 dt-bindings: regulator: Convert TPS62360 binding to json-schema

Convert the TPS62360 regulator binding to DT schema format using json-schema.

---
V1 -> V2: Make the example indentation consistent.

 .../bindings/regulator/ti,tps62360.yaml       | 99 +++++++++++++++++++
 .../bindings/regulator/tps62360-regulator.txt | 44 ---------
 2 files changed, 99 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps62360.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +99 -0
new file mode 100644
index 000000000000..525e9a46ce1b
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,tps62360.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS6236x Voltage Regulators
+
+maintainers:
+  - Laxman Dewangan <[email protected]>
+
+description: |
+  The TPS6236x are a family of step down dc-dc converter with
+  an input voltage range of 2.5V to 5.5V. The devices provide
+  up to 3A peak load current, and an output voltage range of
+  0.77V to 1.4V (TPS62360/62) and 0.5V to 1.77V (TPS62361B/63).
+
+  Datasheet is available at:
+  https://www.ti.com/lit/gpn/tps62360
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - ti,tps62360
+      - ti,tps62361
+      - ti,tps62362
+      - ti,tps62363
+
+  reg:
+    maxItems: 1
+
+  ti,vsel0-gpio:
+    description: |
+      GPIO for controlling VSEL0 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL0 control.
+    maxItems: 1
+
+  ti,vsel1-gpio:
+    description: |
+      GPIO for controlling VSEL1 line. If this property
+      is missing, then assume that there is no GPIO for
+      VSEL1 control.
+    maxItems: 1
+
+  ti,enable-vout-discharge:
+    description: Enable output discharge.
+    type: boolean
+
+  ti,enable-pull-down:
+    description: Enable pull down.
+    type: boolean
+
+  ti,vsel0-state-high:
+    description: |
+      Initial state of VSEL0 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+  ti,vsel1-state-high:
+    description: |
+      Initial state of VSEL1 input is high. If this property
+      is missing, then assume the state as low.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        regulator@60 {
+            compatible = "ti,tps62361";
+            reg = <0x60>;
+            regulator-name = "tps62361-vout";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1500000>;
+            regulator-boot-on;
+            ti,vsel0-gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+            ti,vsel1-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+            ti,vsel0-state-high;
+            ti,vsel1-state-high;
+            ti,enable-pull-down;
+            ti,enable-force-pwm;
+            ti,enable-vout-discharge;
+        };
+    };
+
+...
Documentation/devicetree/bindings/regulator/tps62360-regulator.txt deleted +0 -44

44 lines not on this page · raw message

Signature · 1 line
2.30.2
Reviewed-by on v2 1/1
#3 lore raw
Quoted 19 lines · Georgi Vlaev

Convert the TPS62360 regulator binding to DT schema format using json-schema.

---
V1 -> V2: Make the example indentation consistent.

 .../bindings/regulator/ti,tps62360.yaml       | 99 +++++++++++++++++++
 .../bindings/regulator/tps62360-regulator.txt | 44 ---------
 2 files changed, 99 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps62360.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +0 -0
new file mode 100644
index 000000000000..525e9a46ce1b

Documentation/devicetree/bindings/regulator/ti,tps62360.yaml line 10

Quoted 10 lines
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +10 -0
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,tps62360.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS6236x Voltage Regulators
+
+maintainers:
+  - Laxman Dewangan <[email protected]>

It would be good if Laxman acks this, but from my side:

Best regards,
Krzysztof

Reviewed-by
#4 lore raw

From: Krzysztof Kozlowski <[email protected]>

Documentation/devicetree/bindings/regulator/ti,tps62360.yaml line 10

Quoted 4 lines
Documentation/devicetree/bindings/regulator/ti,tps62360.yaml new file +4 -0
+title: Texas Instruments TPS6236x Voltage Regulators
+
+maintainers:
+  - Laxman Dewangan <[email protected]>

LGTM,

[Apologizing if mail get messed up due to outlook]

maintainer
#5 lore raw
In reply to Georgi Vlaev
Quoted 2 lines · Georgi Vlaev

Convert the TPS62360 regulator binding to DT schema format using json-schema.

Please don't send new patches in reply to old patches or serieses, this makes it harder for both people and tools to understand what is going on - it can bury things in mailboxes and make it difficult to keep track of what current patches are, both for the new patches and the old ones.