From: Thierry Reding <thierry.reding@gmail.com>
To: Lee Jones <lee.jones@linaro.org>, Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/6] dt-bindings: regulator: tps65090: Convert to json-schema
Date: Fri, 17 Dec 2021 18:05:07 +0100 [thread overview]
Message-ID: <20211217170507.2843568-6-thierry.reding@gmail.com> (raw)
In-Reply-To: <20211217170507.2843568-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Convert the Texas Instruments TPS65090 bindings from the free-form text
format to json-schema.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
.../bindings/regulator/ti,tps65090.yaml | 199 ++++++++++++++++++
.../bindings/regulator/tps65090.txt | 126 -----------
2 files changed, 199 insertions(+), 126 deletions(-)
create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps65090.yaml
delete mode 100644 Documentation/devicetree/bindings/regulator/tps65090.txt
diff --git a/Documentation/devicetree/bindings/regulator/ti,tps65090.yaml b/Documentation/devicetree/bindings/regulator/ti,tps65090.yaml
new file mode 100644
index 000000000000..9743746475a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/ti,tps65090.yaml
@@ -0,0 +1,199 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,tps65090.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS65090 voltage regulator
+
+maintainers:
+ - Mark Brown <broonie@kernel.org>
+
+properties:
+ compatible:
+ const: ti,tps65090
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vsys1-supply:
+ description: input supply for DCDC1
+
+ vsys2-supply:
+ description: input supply for DCDC2
+
+ vsys3-supply:
+ description: input supply for DCDC3
+
+ infet1-supply:
+ description: input supply for FET1
+
+ infet2-supply:
+ description: input supply for FET2
+
+ infet3-supply:
+ description: input supply for FET3
+
+ infet4-supply:
+ description: input supply for FET4
+
+ infet5-supply:
+ description: input supply for FET5
+
+ infet6-supply:
+ description: input supply for FET6
+
+ infet7-supply:
+ description: input supply for FET7
+
+ vsys-l1-supply:
+ description: input supply for LDO1
+
+ vsys-l2-supply:
+ description: input supply for LDO2
+
+ charger:
+ $ref: ../power/supply/tps65090-charger.yaml
+
+ regulators:
+ type: object
+ description: A node that houses a sub-node for each regulator within the device. Each sub-node
+ is identified using the node's name, with valid values listed below. The content of each
+ sub-node is defined by the standard binding for regulators; see regulator.txt.
+
+ patternProperties:
+ "^dcdc[1-3]|fet[1-7]|ldo[1-2]$":
+ $ref: regulator.yaml
+ properties:
+ ti,enable-ext-control:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: This is applicable for DCDC1, DCDC2 and DCDC3. If DCDCs are externally
+ controlled then this property should be there.
+
+ dcdc-ext-control-gpios:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description: This is applicable for DCDC1, DCDC2 and DCDC3. If DCDCs are externally
+ controlled and if it is from GPIO then GPIO number should be provided. If it is
+ externally controlled and no GPIO entry then driver will just configure this rails
+ as external control and will not provide any enable/disable APIs.
+
+ ti,overcurrent-wait:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: This is applicable to FET registers, which have a poorly defined
+ "overcurrent wait" field. If this property is present it should be between 0 - 3.
+ If this property isn't present we won't touch the "overcurrent wait" field and we'll
+ leave it to the BIOS/EC to deal with.
+ enum: [ 0, 1, 2, 3 ]
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - regulators
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@48 {
+ compatible = "ti,tps65090";
+ reg = <0x48>;
+ interrupts = <0 88 0x4>;
+
+ vsys1-supply = <&some_reg>;
+ vsys2-supply = <&some_reg>;
+ vsys3-supply = <&some_reg>;
+ infet1-supply = <&some_reg>;
+ infet2-supply = <&some_reg>;
+ infet3-supply = <&some_reg>;
+ infet4-supply = <&some_reg>;
+ infet5-supply = <&some_reg>;
+ infet6-supply = <&some_reg>;
+ infet7-supply = <&some_reg>;
+ vsys-l1-supply = <&some_reg>;
+ vsys-l2-supply = <&some_reg>;
+
+ regulators {
+ dcdc1 {
+ regulator-name = "dcdc1";
+ regulator-boot-on;
+ regulator-always-on;
+ ti,enable-ext-control;
+ dcdc-ext-control-gpios = <&gpio 10 0>;
+ };
+
+ dcdc2 {
+ regulator-name = "dcdc2";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ dcdc3 {
+ regulator-name = "dcdc3";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet1 {
+ regulator-name = "fet1";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet2 {
+ regulator-name = "fet2";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet3 {
+ regulator-name = "fet3";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet4 {
+ regulator-name = "fet4";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet5 {
+ regulator-name = "fet5";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet6 {
+ regulator-name = "fet6";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ fet7 {
+ regulator-name = "fet7";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo1 {
+ regulator-name = "ldo1";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo2 {
+ regulator-name = "ldo2";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/regulator/tps65090.txt b/Documentation/devicetree/bindings/regulator/tps65090.txt
deleted file mode 100644
index ae326f263597..000000000000
--- a/Documentation/devicetree/bindings/regulator/tps65090.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-TPS65090 regulators
-
-Required properties:
-- compatible: "ti,tps65090"
-- reg: I2C slave address
-- interrupts: the interrupt outputs of the controller
-- regulators: A node that houses a sub-node for each regulator within the
- device. Each sub-node is identified using the node's name, with valid
- values listed below. The content of each sub-node is defined by the
- standard binding for regulators; see regulator.txt.
- dcdc[1-3], fet[1-7] and ldo[1-2] respectively.
-- vsys[1-3]-supply: The input supply for DCDC[1-3] respectively.
-- infet[1-7]-supply: The input supply for FET[1-7] respectively.
-- vsys-l[1-2]-supply: The input supply for LDO[1-2] respectively.
-
-Optional properties:
-- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
- If DCDCs are externally controlled then this property should be there.
-- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
- If DCDCs are externally controlled and if it is from GPIO then GPIO
- number should be provided. If it is externally controlled and no GPIO
- entry then driver will just configure this rails as external control
- and will not provide any enable/disable APIs.
-- ti,overcurrent-wait: This is applicable to FET registers, which have a
- poorly defined "overcurrent wait" field. If this property is present it
- should be between 0 - 3. If this property isn't present we won't touch the
- "overcurrent wait" field and we'll leave it to the BIOS/EC to deal with.
-
-Each regulator is defined using the standard binding for regulators.
-
-Example:
-
- tps65090@48 {
- compatible = "ti,tps65090";
- reg = <0x48>;
- interrupts = <0 88 0x4>;
-
- vsys1-supply = <&some_reg>;
- vsys2-supply = <&some_reg>;
- vsys3-supply = <&some_reg>;
- infet1-supply = <&some_reg>;
- infet2-supply = <&some_reg>;
- infet3-supply = <&some_reg>;
- infet4-supply = <&some_reg>;
- infet5-supply = <&some_reg>;
- infet6-supply = <&some_reg>;
- infet7-supply = <&some_reg>;
- vsys-l1-supply = <&some_reg>;
- vsys-l2-supply = <&some_reg>;
-
- regulators {
- dcdc1 {
- regulator-name = "dcdc1";
- regulator-boot-on;
- regulator-always-on;
- ti,enable-ext-control;
- dcdc-ext-control-gpios = <&gpio 10 0>;
- };
-
- dcdc2 {
- regulator-name = "dcdc2";
- regulator-boot-on;
- regulator-always-on;
- };
-
- dcdc3 {
- regulator-name = "dcdc3";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet1 {
- regulator-name = "fet1";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet2 {
- regulator-name = "fet2";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet3 {
- regulator-name = "fet3";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet4 {
- regulator-name = "fet4";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet5 {
- regulator-name = "fet5";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet6 {
- regulator-name = "fet6";
- regulator-boot-on;
- regulator-always-on;
- };
-
- fet7 {
- regulator-name = "fet7";
- regulator-boot-on;
- regulator-always-on;
- };
-
- ldo1 {
- regulator-name = "ldo1";
- regulator-boot-on;
- regulator-always-on;
- };
-
- ldo2 {
- regulator-name = "ldo2";
- regulator-boot-on;
- regulator-always-on;
- };
- };
- };
--
2.34.1
next prev parent reply other threads:[~2021-12-17 17:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 17:05 [PATCH 1/6] dt-bindings: regulator: palmas: Convert to json-schema Thierry Reding
2021-12-17 17:05 ` [PATCH 2/6] dt-bindings: regulator: pwm: " Thierry Reding
2021-12-18 18:08 ` Rob Herring
2021-12-21 18:49 ` Rob Herring
2021-12-17 17:05 ` [PATCH 3/6] dt-bindings: regulator: tps51632: " Thierry Reding
2021-12-21 18:51 ` Rob Herring
2021-12-17 17:05 ` [PATCH 4/6] dt-bindings: regulator: tps62360: " Thierry Reding
2021-12-21 18:52 ` Rob Herring
2021-12-17 17:05 ` [PATCH 5/6] dt-bindings: regulator: tps6586x: " Thierry Reding
2021-12-18 18:08 ` Rob Herring
2021-12-21 18:59 ` Rob Herring
2021-12-17 17:05 ` Thierry Reding [this message]
2021-12-21 19:00 ` [PATCH 6/6] dt-bindings: regulator: tps65090: " Rob Herring
2021-12-18 18:08 ` [PATCH 1/6] dt-bindings: regulator: palmas: " Rob Herring
2021-12-21 14:15 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211217170507.2843568-6-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox