devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file
@ 2023-08-18 15:34 Shenwei Wang
  2023-08-18 15:34 ` [PATCH 2/2] genpd: regulator-pd: add regulator-pd driver Shenwei Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Shenwei Wang @ 2023-08-18 15:34 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Shenwei Wang, Ulf Hansson, Liam Girdwood, Mark Brown, imx,
	devicetree, linux-kernel, linux-imx

Documenting the regulator power domain properties and usage examples.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.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@nxp.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 = <&reg1>;
+        regulator-1-supply = <&reg2>;
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2023-08-29 13:22 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 15:34 [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file Shenwei Wang
2023-08-18 15:34 ` [PATCH 2/2] genpd: regulator-pd: add regulator-pd driver Shenwei Wang
2023-08-18 20:51 ` [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file Rob Herring
2023-08-18 21:06   ` Shenwei Wang
2023-08-19  8:04     ` Krzysztof Kozlowski
2023-08-21 13:22       ` Shenwei Wang
2023-08-21 18:49         ` Rob Herring
2023-08-22 15:18           ` Shenwei Wang
2023-08-22 15:25             ` Krzysztof Kozlowski
2023-08-22 15:50               ` [EXT] " Shenwei Wang
2023-08-22 15:57                 ` Krzysztof Kozlowski
2023-08-22 16:14                   ` Shenwei Wang
2023-08-24  9:26 ` Ulf Hansson
2023-08-24 16:35   ` Shenwei Wang
2023-08-25 12:24     ` Ulf Hansson
2023-08-25 15:44       ` Shenwei Wang
2023-08-26 17:31         ` Krzysztof Kozlowski
2023-08-28  9:59           ` Ulf Hansson
2023-08-28 10:45             ` Krzysztof Kozlowski
2023-08-28 14:14             ` Shenwei Wang
2023-08-28 14:04           ` Shenwei Wang
2023-08-28 17:10             ` Krzysztof Kozlowski
2023-08-28 18:39               ` Shenwei Wang
2023-08-28 18:42                 ` Krzysztof Kozlowski
2023-08-28 18:50                   ` Shenwei Wang
2023-08-28 18:52                     ` Krzysztof Kozlowski
2023-08-28 19:09                       ` Shenwei Wang
2023-08-28 19:11                         ` Krzysztof Kozlowski
2023-08-28 19:23                           ` [EXT] " Shenwei Wang
2023-08-28 19:30                             ` Krzysztof Kozlowski
2023-08-28 19:49                               ` Shenwei Wang
2023-08-28 21:13                                 ` Rob Herring
2023-08-29 13:21                                   ` Shenwei Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).