Documenting the regulator power domain properties and usage examples. Signed-off-by: Shenwei Wang <shenwei.wang@xxxxxxx> --- .../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@xxxxxxx> + +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