[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230818153446.1076027-1-shenwei.wang@nxp.com>
Date: Fri, 18 Aug 2023 10:34:45 -0500
From: Shenwei Wang <shenwei.wang@....com>
To: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Shenwei Wang <shenwei.wang@....com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, imx@...ts.linux.dev,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-imx@....com
Subject: [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file
Documenting the regulator power domain properties and usage examples.
Signed-off-by: Shenwei Wang <shenwei.wang@....com>
---
.../bindings/power/regulator-pd.yaml | 71 +++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/regulator-pd.yaml
diff --git a/Documentation/devicetree/bindings/power/regulator-pd.yaml b/Documentation/devicetree/bindings/power/regulator-pd.yaml
new file mode 100644
index 000000000000..181d2fa83f8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/regulator-pd.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/regulator-pd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Regulator Power Domain
+
+maintainers:
+ - Shenwei Wang <shenwei.wang@....com>
+
+description: |
+ This describes a power domain which manages a group of regulators.
+
+allOf:
+ - $ref: power-domain.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: regulator-power-domain
+
+ '#power-domain-cells':
+ const: 1
+
+ regulator-number:
+ minimum: 1
+ maximum: 100
+ description: The count of regulator to be managed by this power domain
+
+patternProperties:
+ "regulator-[0-99]-supply$":
+ description: The regulator supply phandle to be managed by this power domain
+
+required:
+ - compatible
+ - '#power-domain-cells'
+ - regulator-number
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ reg1: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "REG1";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg2: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "REG2";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ gpio = <&lsio_gpio4 20 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ power-controller {
+ compatible = "regulator-power-domain";
+ #power-domain-cells = <1>;
+
+ regulator-number = <2>;
+ regulator-0-supply = <®1>;
+ regulator-1-supply = <®2>;
+ };
--
2.34.1
Powered by blists - more mailing lists