[PATCH v3 2/3] Documentation: DT: binding documentation for regulator-poweroff
Maxime Ripard
maxime at cerno.tech
Tue Dec 8 05:13:58 EST 2020
On Mon, Dec 07, 2020 at 03:27:55PM +0100, Michael Klein wrote:
> Add devicetree binding documentation for regulator-poweroff driver.
>
> Signed-off-by: Michael Klein <michael at fossekall.de>
> ---
> .../power/reset/regulator-poweroff.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml
>
> diff --git a/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml
> new file mode 100644
> index 000000000000..8c8ce6bb031a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/regulator-poweroff.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/regulator-poweroff.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Force-disable power regulators to turn the power off.
> +
> +maintainers:
> + - Michael Klein <michael at fossekall.de>
> +
> +description: |
> + When the power-off handler is called, one more regulators are disabled
> + by calling regulator_force_disable(). If the power is still on and the
> + CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
> +
> +properties:
> + compatible:
> + const: "regulator-poweroff"
> +
> + regulator-names:
> + description:
> + Array of regulator names
> + $ref: /schemas/types.yaml#/definitions/string-array
> +
> + REGULATOR-supply:
This should be a patternProperties
> + description:
> + For any REGULATOR listed in regulator-names, a phandle
> + to the corresponding regulator node
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + timeout-ms:
> + description:
> + Time to wait before asserting a WARN_ON(1). If nothing is
> + specified, 3000 ms is used.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> + - compatible
> + - regulator-names
> + - REGULATOR-supply
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + regulator-poweroff {
> + compatible = "regulator-poweroff";
> + regulator-names = "vcc1v2", "vcc-dram";
> + vcc1v2-supply = <®_vcc1v2>;
> + vcc-dram-supply = <®_vcc_dram>;
> + };
I'm not entirely sure how multiple regulators would work here. I guess
the ordering is board/purpose sensitive. In this particular case, I
assume that vcc1v2 would be shut down before vcc-dram?
If so, I would expect that one regulator_force_disable is run, the CPU
is disabled and you never get the chance to cut vcc-dram.
Similarly, cutting the RAM regulator first would probably be fine if
you're running code from the cache / SRAM, but I don't see anything
making sure it's the case in the driver?
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201208/6e3c9c41/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list