xref: /linux/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml (revision f9bff0e31881d03badf191d3b0005839391f5f2b)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/regulator/fixed-regulator.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Fixed Voltage regulators
8
9maintainers:
10  - Liam Girdwood <lgirdwood@gmail.com>
11  - Mark Brown <broonie@kernel.org>
12
13description:
14  Any property defined as part of the core regulator binding, defined in
15  regulator.yaml, can also be used. However a fixed voltage regulator is
16  expected to have the regulator-min-microvolt and regulator-max-microvolt
17  to be the same.
18
19allOf:
20  - $ref: regulator.yaml#
21  - if:
22      properties:
23        compatible:
24          contains:
25            const: regulator-fixed-clock
26    then:
27      required:
28        - clocks
29  - if:
30      properties:
31        compatible:
32          contains:
33            const: regulator-fixed-domain
34    then:
35      required:
36        - power-domains
37        - required-opps
38  - not:
39      required:
40        - gpio
41        - gpios
42
43properties:
44  compatible:
45    enum:
46      - regulator-fixed
47      - regulator-fixed-clock
48      - regulator-fixed-domain
49
50  regulator-name: true
51
52  gpio:
53    description: gpio to use for enable control
54    maxItems: 1
55
56  gpios:
57    maxItems: 1
58
59  clocks:
60    description:
61      clock to use for enable control. This binding is only available if
62      the compatible is chosen to regulator-fixed-clock. The clock binding
63      is mandatory if compatible is chosen to regulator-fixed-clock.
64    maxItems: 1
65
66  power-domains:
67    deprecated: true
68    description:
69      Power domain to use for enable control. This binding is only
70      available if the compatible is chosen to regulator-fixed-domain.
71    maxItems: 1
72
73  required-opps:
74    deprecated: true
75    description:
76      Performance state to use for enable control. This binding is only
77      available if the compatible is chosen to regulator-fixed-domain. The
78      power-domain binding is mandatory if compatible is chosen to
79      regulator-fixed-domain.
80    maxItems: 1
81
82  startup-delay-us:
83    description: startup time in microseconds
84
85  off-on-delay-us:
86    description: off delay time in microseconds
87
88  enable-active-high:
89    description:
90      Polarity of GPIO is Active high. If this property is missing,
91      the default assumed is Active low.
92    type: boolean
93
94  gpio-open-drain:
95    description:
96      GPIO is open drain type. If this property is missing then default
97      assumption is false.
98    type: boolean
99
100  vin-supply:
101    description: Input supply phandle.
102
103required:
104  - compatible
105  - regulator-name
106
107unevaluatedProperties: false
108
109examples:
110  - |
111    reg_1v8: regulator-1v8 {
112      compatible = "regulator-fixed";
113      regulator-name = "1v8";
114      regulator-min-microvolt = <1800000>;
115      regulator-max-microvolt = <1800000>;
116      gpio = <&gpio1 16 0>;
117      startup-delay-us = <70000>;
118      enable-active-high;
119      regulator-boot-on;
120      gpio-open-drain;
121      vin-supply = <&parent_reg>;
122    };
123    reg_1v8_clk: regulator-1v8-clk {
124      compatible = "regulator-fixed-clock";
125      regulator-name = "1v8";
126      regulator-min-microvolt = <1800000>;
127      regulator-max-microvolt = <1800000>;
128      clocks = <&clock1>;
129      startup-delay-us = <70000>;
130      enable-active-high;
131      regulator-boot-on;
132      vin-supply = <&parent_reg>;
133    };
134    reg_1v8_domain: regulator-1v8-domain {
135      compatible = "regulator-fixed-domain";
136      regulator-name = "1v8";
137      regulator-min-microvolt = <1800000>;
138      regulator-max-microvolt = <1800000>;
139      power-domains = <&domain1>;
140      required-opps = <&domain1_state1>;
141      startup-delay-us = <70000>;
142      enable-active-high;
143      regulator-boot-on;
144      vin-supply = <&parent_reg>;
145    };
146...
147