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    description:
61      Power domain to use for enable control. This binding is only
62      available if the compatible is chosen to regulator-fixed-domain.
63    maxItems: 1
64
65  required-opps:
66    description:
67      Performance state to use for enable control. This binding is only
68      available if the compatible is chosen to regulator-fixed-domain. The
69      power-domain binding is mandatory if compatible is chosen to
70      regulator-fixed-domain.
71    maxItems: 1
72
73  startup-delay-us:
74    description: startup time in microseconds
75
76  off-on-delay-us:
77    description: off delay time in microseconds
78
79  enable-active-high:
80    description:
81      Polarity of GPIO is Active high. If this property is missing,
82      the default assumed is Active low.
83    type: boolean
84
85  gpio-open-drain:
86    description:
87      GPIO is open drain type. If this property is missing then default
88      assumption is false.
89    type: boolean
90
91  vin-supply:
92    description: Input supply phandle.
93
94required:
95  - compatible
96  - regulator-name
97
98unevaluatedProperties: false
99
100examples:
101  - |
102    reg_1v8: regulator-1v8 {
103      compatible = "regulator-fixed";
104      regulator-name = "1v8";
105      regulator-min-microvolt = <1800000>;
106      regulator-max-microvolt = <1800000>;
107      gpio = <&gpio1 16 0>;
108      startup-delay-us = <70000>;
109      enable-active-high;
110      regulator-boot-on;
111      gpio-open-drain;
112      vin-supply = <&parent_reg>;
113    };
114    reg_1v8_clk: regulator-1v8-clk {
115      compatible = "regulator-fixed-clock";
116      regulator-name = "1v8";
117      regulator-min-microvolt = <1800000>;
118      regulator-max-microvolt = <1800000>;
119      clocks = <&clock1>;
120      startup-delay-us = <70000>;
121      enable-active-high;
122      regulator-boot-on;
123      vin-supply = <&parent_reg>;
124    };
125    reg_1v8_domain: regulator-1v8-domain {
126      compatible = "regulator-fixed-domain";
127      regulator-name = "1v8";
128      regulator-min-microvolt = <1800000>;
129      regulator-max-microvolt = <1800000>;
130      power-domains = <&domain1>;
131      required-opps = <&domain1_state1>;
132      startup-delay-us = <70000>;
133      enable-active-high;
134      regulator-boot-on;
135      vin-supply = <&parent_reg>;
136    };
137...
138