xref: /freebsd/sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml (revision 6549718b70f0e660a15685369afb4f9caf2215ce)
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
103  interrupts:
104    maxItems: 1
105    description:
106      Interrupt signaling a critical under-voltage event.
107
108  system-critical-regulator: true
109
110required:
111  - compatible
112  - regulator-name
113
114unevaluatedProperties: false
115
116examples:
117  - |
118    reg_1v8: regulator-1v8 {
119      compatible = "regulator-fixed";
120      regulator-name = "1v8";
121      regulator-min-microvolt = <1800000>;
122      regulator-max-microvolt = <1800000>;
123      gpio = <&gpio1 16 0>;
124      startup-delay-us = <70000>;
125      enable-active-high;
126      regulator-boot-on;
127      gpio-open-drain;
128      vin-supply = <&parent_reg>;
129    };
130    reg_1v8_clk: regulator-1v8-clk {
131      compatible = "regulator-fixed-clock";
132      regulator-name = "1v8";
133      regulator-min-microvolt = <1800000>;
134      regulator-max-microvolt = <1800000>;
135      clocks = <&clock1>;
136      startup-delay-us = <70000>;
137      enable-active-high;
138      regulator-boot-on;
139      vin-supply = <&parent_reg>;
140    };
141    reg_1v8_domain: regulator-1v8-domain {
142      compatible = "regulator-fixed-domain";
143      regulator-name = "1v8";
144      regulator-min-microvolt = <1800000>;
145      regulator-max-microvolt = <1800000>;
146      power-domains = <&domain1>;
147      required-opps = <&domain1_state1>;
148      startup-delay-us = <70000>;
149      enable-active-high;
150      regulator-boot-on;
151      vin-supply = <&parent_reg>;
152    };
153...
154