From fa679d428f386107445161c871907cf86d79d136 Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 2 Aug 2023 17:38:50 -0700 Subject: [PATCH] dt-bindings: regulator: add proxy consumer bindings Add bindings for regulator proxy consumers which can be used to enforce minimum voltage, current, and enable state of regulators when a board is booting up. Change-Id: I045faf871af168e5ace707f434e0317a176a16fc Signed-off-by: David Collins --- bindings/regulator/qcom,proxy-consumer.yaml | 90 +++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 bindings/regulator/qcom,proxy-consumer.yaml diff --git a/bindings/regulator/qcom,proxy-consumer.yaml b/bindings/regulator/qcom,proxy-consumer.yaml new file mode 100644 index 00000000..3864b309 --- /dev/null +++ b/bindings/regulator/qcom,proxy-consumer.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/qcom,proxy-consumer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Regulator Proxy Consumer Bindings + +maintainers: + - David Collins + +description: | + Regulator proxy consumers provide a means to use a default regulator state + during bootup only which is removed at the end of boot. This feature can be + used in situations where a shared regulator can be scaled between several + possible voltages and hardware requires that it be at a high level at the + beginning of boot before the consumer device responsible for requesting the + high level has initialized. + +properties: + qcom,proxy-consumer-enable: + description: Boolean flag indicating that the regulator must be kept enabled + during boot. + type: boolean + + qcom,proxy-consumer-voltage: + description: Voltage constraints to enforce during boot. + $ref: /schemas/types.yaml#/definitions/uint32-array + items: + - description: Minimum voltage in microvolts allowed during boot. + - description: Maximum voltage in microvolts allowed during boot. + + qcom,proxy-consumer-current: + description: Minimum current in microamps required during boot. + $ref: /schemas/types.yaml#/definitions/uint32 + + qcom,proxy-consumer-name: + description: Name of the proxy consumer supply. + $ref: /schemas/types.yaml#/definitions/string + default: proxy + +patternProperties: + ".*-supply$": + description: | + phandle of the regulator's own device node. If qcom,proxy-consumer-name + is specified, then this property should be -supply; + otherwise, it should be proxy-supply. + + This property must be specified in the regulator device node (or its + parent node) if qcom,proxy-consumer-enable, qcom,proxy-consumer-voltage, + or qcom,proxy-consumer-current is specified. + +additionalProperties: true + +examples: + - | + foo_vreg: regulator { + regulator-name = "foo"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <2000000>; + proxy-supply = <&foo_vreg>; + qcom,proxy-consumer-voltage = <1500000 2000000>; + qcom,proxy-consumer-current = <25000>; + qcom,proxy-consumer-enable; + }; + + pmic { + ldo1-proxy-supply = <&ldo1>; + ldo2-proxy-supply = <&ldo2>; + + ldo1: ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <2000000>; + qcom,proxy-consumer-name = "ldo1-proxy"; + qcom,proxy-consumer-voltage = <1500000 2000000>; + qcom,proxy-consumer-current = <25000>; + qcom,proxy-consumer-enable; + }; + + ldo2: ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <3000000>; + qcom,proxy-consumer-name = "ldo2-proxy"; + qcom,proxy-consumer-voltage = <2500000 3000000>; + qcom,proxy-consumer-current = <50000>; + qcom,proxy-consumer-enable; + }; + };