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
22if:
23  properties:
24    compatible:
25      contains:
26        const: regulator-fixed-clock
27  required:
28    - clocks
29else:
30  if:
31    properties:
32      compatible:
33        contains:
34          const: regulator-fixed-domain
35    required:
36      - power-domains
37      - required-opps
38
39properties:
40  compatible:
41    enum:
42      - regulator-fixed
43      - regulator-fixed-clock
44      - regulator-fixed-domain
45
46  regulator-name: true
47
48  gpio:
49    description: gpio to use for enable control
50    maxItems: 1
51
52  clocks:
53    description:
54      clock to use for enable control. This binding is only available if
55      the compatible is chosen to regulator-fixed-clock. The clock binding
56      is mandatory if compatible is chosen to regulator-fixed-clock.
57    maxItems: 1
58
59  power-domains:
60    deprecated: true
61    description:
62      Power domain to use for enable control. This binding is only
63      available if the compatible is chosen to regulator-fixed-domain.
64    maxItems: 1
65
66  required-opps:
67    deprecated: true
68    description:
69      Performance state to use for enable control. This binding is only
70      available if the compatible is chosen to regulator-fixed-domain. The
71      power-domain binding is mandatory if compatible is chosen to
72      regulator-fixed-domain.
73    maxItems: 1
74
75  startup-delay-us:
76    description: startup time in microseconds
77
78  off-on-delay-us:
79    description: off delay time in microseconds
80
81  enable-active-high:
82    description:
83      Polarity of GPIO is Active high. If this property is missing,
84      the default assumed is Active low.
85    type: boolean
86
87  gpio-open-drain:
88    description:
89      GPIO is open drain type. If this property is missing then default
90      assumption is false.
91    type: boolean
92
93  vin-supply:
94    description: Input supply phandle.
95
96required:
97  - compatible
98  - regulator-name
99
100unevaluatedProperties: false
101
102examples:
103  - |
104    reg_1v8: regulator-1v8 {
105      compatible = "regulator-fixed";
106      regulator-name = "1v8";
107      regulator-min-microvolt = <1800000>;
108      regulator-max-microvolt = <1800000>;
109      gpio = <&gpio1 16 0>;
110      startup-delay-us = <70000>;
111      enable-active-high;
112      regulator-boot-on;
113      gpio-open-drain;
114      vin-supply = <&parent_reg>;
115    };
116    reg_1v8_clk: regulator-1v8-clk {
117      compatible = "regulator-fixed-clock";
118      regulator-name = "1v8";
119      regulator-min-microvolt = <1800000>;
120      regulator-max-microvolt = <1800000>;
121      clocks = <&clock1>;
122      startup-delay-us = <70000>;
123      enable-active-high;
124      regulator-boot-on;
125      vin-supply = <&parent_reg>;
126    };
127    reg_1v8_domain: regulator-1v8-domain {
128      compatible = "regulator-fixed-domain";
129      regulator-name = "1v8";
130      regulator-min-microvolt = <1800000>;
131      regulator-max-microvolt = <1800000>;
132      power-domains = <&domain1>;
133      required-opps = <&domain1_state1>;
134      startup-delay-us = <70000>;
135      enable-active-high;
136      regulator-boot-on;
137      vin-supply = <&parent_reg>;
138    };
139...
140