[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFqsn6kVjPFUdVyRxNDiOaHO9hq=9c+6eAK4N-v-LVWUPw@mail.gmail.com>
Date: Thu, 24 Aug 2023 11:26:42 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Shenwei Wang <shenwei.wang@....com>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.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: Re: [PATCH 1/2] dt-bindings: power: Add regulator-pd yaml file
On Fri, 18 Aug 2023 at 17:35, Shenwei Wang <shenwei.wang@....com> wrote:
>
> Documenting the regulator power domain properties and usage examples.
As Rob and Krzysztof already pointed out, I agree that this binding
looks a bit questionable.
Rather than adding a new DT binding, why can't we just use the
existing way of describing a platform specific power-domain provider?
This still looks platform specific to me.
Kind regards
Uffe
>
> 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