diff mbox series

[v1,1/5] dt-bindings: power: Add bindings for a power domain controlled by a regulator

Message ID 20220609150851.23084-2-max.oss.09@gmail.com
State New
Headers show
Series [v1,1/5] dt-bindings: power: Add bindings for a power domain controlled by a regulator | expand

Commit Message

Max Krummenacher June 9, 2022, 3:08 p.m. UTC
From: Max Krummenacher <max.krummenacher@toradex.com>

Adds binding for a power domain provider which uses a regulator to control
the power domain.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---

 .../power/regulator-power-domain.yaml         | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/regulator-power-domain.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/regulator-power-domain.yaml b/Documentation/devicetree/bindings/power/regulator-power-domain.yaml
new file mode 100644
index 000000000000..2b49c4f2f866
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/regulator-power-domain.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/regulator-power-domain.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Power domain controlled by a regulator
+
+maintainers:
+  - Max Krummenacher <max.krummenacher@toradex.com>
+
+description: |+
+  Power domain provider which uses a regulator to control
+  the power domain.
+
+allOf:
+  - $ref: "power-domain.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - regulator-pm-pd
+
+  power-supply:
+    description: The regulator used to control the power domain.
+
+  label:
+    description: Human readable string defining the domain.
+
+  "#power-domain-cells":
+    const: 0
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - "#power-domain-cells"
+  - power-supply
+
+additionalProperties: true
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    reg_pd_sleep_moci: regulator-sleep-moci {
+        compatible = "regulator-fixed";
+        enable-active-high;
+        gpio = <&gpio5 1 GPIO_ACTIVE_HIGH>;
+        regulator-name = "CTRL_SLEEP_MOCI";
+    };
+
+    pd_sleep_moci: power-sleep-moci {
+        compatible = "regulator-pm-pd";
+        power-supply = <&reg_pd_sleep_moci>;
+        label = "pd_sleep_moci";
+        #power-domain-cells = <0>;
+    };