xref: /freebsd-src/sys/contrib/device-tree/Bindings/regulator/regulator.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/regulator/regulator.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Voltage/Current Regulators
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Liam Girdwood <lgirdwood@gmail.com>
11c66ec88fSEmmanuel Vadot  - Mark Brown <broonie@kernel.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotproperties:
14c66ec88fSEmmanuel Vadot  regulator-name:
15c66ec88fSEmmanuel Vadot    description: A string used as a descriptive name for regulator outputs
16fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadot  regulator-min-microvolt:
19c66ec88fSEmmanuel Vadot    description: smallest voltage consumers may set
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot  regulator-max-microvolt:
22c66ec88fSEmmanuel Vadot    description: largest voltage consumers may set
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot  regulator-microvolt-offset:
25c66ec88fSEmmanuel Vadot    description: Offset applied to voltages to compensate for voltage drops
26fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot  regulator-min-microamp:
29c66ec88fSEmmanuel Vadot    description: smallest current consumers may set
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel Vadot  regulator-max-microamp:
32c66ec88fSEmmanuel Vadot    description: largest current consumers may set
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot  regulator-input-current-limit-microamp:
35c66ec88fSEmmanuel Vadot    description: maximum input current regulator allows
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  regulator-always-on:
38c66ec88fSEmmanuel Vadot    description: boolean, regulator should never be disabled
39c66ec88fSEmmanuel Vadot    type: boolean
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot  regulator-boot-on:
42c66ec88fSEmmanuel Vadot    description: bootloader/firmware enabled regulator.
43c66ec88fSEmmanuel Vadot      It's expected that this regulator was left on by the bootloader.
44c66ec88fSEmmanuel Vadot      If the bootloader didn't leave it on then OS should turn it on
45c66ec88fSEmmanuel Vadot      at boot but shouldn't prevent it from being turned off later.
46c66ec88fSEmmanuel Vadot      This property is intended to only be used for regulators where
47c66ec88fSEmmanuel Vadot      software cannot read the state of the regulator.
48c66ec88fSEmmanuel Vadot    type: boolean
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  regulator-allow-bypass:
51c66ec88fSEmmanuel Vadot    description: allow the regulator to go into bypass mode
52c66ec88fSEmmanuel Vadot    type: boolean
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel Vadot  regulator-allow-set-load:
55c66ec88fSEmmanuel Vadot    description: allow the regulator performance level to be configured
56c66ec88fSEmmanuel Vadot    type: boolean
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  regulator-ramp-delay:
59c66ec88fSEmmanuel Vadot    description: ramp delay for regulator(in uV/us) For hardware which supports
60c66ec88fSEmmanuel Vadot      disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay
61c66ec88fSEmmanuel Vadot      = <0>) for disabling ramp delay.
62fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  regulator-enable-ramp-delay:
65c66ec88fSEmmanuel Vadot    description: The time taken, in microseconds, for the supply rail to
66c66ec88fSEmmanuel Vadot      reach the target voltage, plus/minus whatever tolerance the board
67c66ec88fSEmmanuel Vadot      design requires. This property describes the total system ramp time
68c66ec88fSEmmanuel Vadot      required due to the combination of internal ramping of the regulator
69c66ec88fSEmmanuel Vadot      itself, and board design issues such as trace capacitance and load
70c66ec88fSEmmanuel Vadot      on the supply.
71fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot  regulator-settling-time-us:
74c66ec88fSEmmanuel Vadot    description: Settling time, in microseconds, for voltage change if regulator
75c66ec88fSEmmanuel Vadot      have the constant time for any level voltage change. This is useful
76c66ec88fSEmmanuel Vadot      when regulator have exponential voltage change.
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot  regulator-settling-time-up-us:
79c66ec88fSEmmanuel Vadot    description: Settling time, in microseconds, for voltage increase if
80c66ec88fSEmmanuel Vadot      the regulator needs a constant time to settle after voltage increases
81c66ec88fSEmmanuel Vadot      of any level. This is useful for regulators with exponential voltage
82c66ec88fSEmmanuel Vadot      changes.
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot  regulator-settling-time-down-us:
85c66ec88fSEmmanuel Vadot    description: Settling time, in microseconds, for voltage decrease if
86c66ec88fSEmmanuel Vadot      the regulator needs a constant time to settle after voltage decreases
87c66ec88fSEmmanuel Vadot      of any level. This is useful for regulators with exponential voltage
88c66ec88fSEmmanuel Vadot      changes.
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot  regulator-soft-start:
91c66ec88fSEmmanuel Vadot    description: Enable soft start so that voltage ramps slowly
92c66ec88fSEmmanuel Vadot    type: boolean
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadot  regulator-initial-mode:
95c66ec88fSEmmanuel Vadot    description: initial operating mode. The set of possible operating modes
96c66ec88fSEmmanuel Vadot      depends on the capabilities of every hardware so each device binding
97c66ec88fSEmmanuel Vadot      documentation explains which values the regulator supports.
98fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot  regulator-allowed-modes:
101c66ec88fSEmmanuel Vadot    description: list of operating modes that software is allowed to configure
102c66ec88fSEmmanuel Vadot      for the regulator at run-time.  Elements may be specified in any order.
103c66ec88fSEmmanuel Vadot      The set of possible operating modes depends on the capabilities of
104c66ec88fSEmmanuel Vadot      every hardware so each device binding document explains which values
105c66ec88fSEmmanuel Vadot      the regulator supports.
106fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot  regulator-system-load:
109c66ec88fSEmmanuel Vadot    description: Load in uA present on regulator that is not captured by
110c66ec88fSEmmanuel Vadot      any consumer request.
111fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot  regulator-pull-down:
114c66ec88fSEmmanuel Vadot    description: Enable pull down resistor when the regulator is disabled.
115c66ec88fSEmmanuel Vadot    type: boolean
116c66ec88fSEmmanuel Vadot
117*8d13bc63SEmmanuel Vadot  system-critical-regulator:
118*8d13bc63SEmmanuel Vadot    description: Set if the regulator is critical to system stability or
119*8d13bc63SEmmanuel Vadot      functionality.
120*8d13bc63SEmmanuel Vadot    type: boolean
121*8d13bc63SEmmanuel Vadot
122c66ec88fSEmmanuel Vadot  regulator-over-current-protection:
123c66ec88fSEmmanuel Vadot    description: Enable over current protection.
124c66ec88fSEmmanuel Vadot    type: boolean
125c66ec88fSEmmanuel Vadot
1265956d97fSEmmanuel Vadot  regulator-oc-protection-microamp:
1275956d97fSEmmanuel Vadot    description: Set over current protection limit. This is a limit where
1285956d97fSEmmanuel Vadot      hardware performs emergency shutdown. Zero can be passed to disable
1295956d97fSEmmanuel Vadot      protection and value '1' indicates that protection should be enabled but
1305956d97fSEmmanuel Vadot      limit setting can be omitted.
1315956d97fSEmmanuel Vadot
1325956d97fSEmmanuel Vadot  regulator-oc-error-microamp:
1335956d97fSEmmanuel Vadot    description: Set over current error limit. This is a limit where part of
134aa1a8ff2SEmmanuel Vadot      the hardware probably is malfunctional and damage prevention is requested.
1355956d97fSEmmanuel Vadot      Zero can be passed to disable error detection and value '1' indicates
1365956d97fSEmmanuel Vadot      that detection should be enabled but limit setting can be omitted.
1375956d97fSEmmanuel Vadot
1385956d97fSEmmanuel Vadot  regulator-oc-warn-microamp:
1395956d97fSEmmanuel Vadot    description: Set over current warning limit. This is a limit where hardware
1405956d97fSEmmanuel Vadot      is assumed still to be functional but approaching limit where it gets
1415956d97fSEmmanuel Vadot      damaged. Recovery actions should be initiated. Zero can be passed to
1425956d97fSEmmanuel Vadot      disable detection and value '1' indicates that detection should
1435956d97fSEmmanuel Vadot      be enabled but limit setting can be omitted.
1445956d97fSEmmanuel Vadot
1455956d97fSEmmanuel Vadot  regulator-ov-protection-microvolt:
1465956d97fSEmmanuel Vadot    description: Set over voltage protection limit. This is a limit where
1475956d97fSEmmanuel Vadot      hardware performs emergency shutdown. Zero can be passed to disable
1485956d97fSEmmanuel Vadot      protection and value '1' indicates that protection should be enabled but
1495956d97fSEmmanuel Vadot      limit setting can be omitted. Limit is given as microvolt offset from
1505956d97fSEmmanuel Vadot      voltage set to regulator.
1515956d97fSEmmanuel Vadot
1525956d97fSEmmanuel Vadot  regulator-ov-error-microvolt:
1535956d97fSEmmanuel Vadot    description: Set over voltage error limit. This is a limit where part of
154aa1a8ff2SEmmanuel Vadot      the hardware probably is malfunctional and damage prevention is requested
1555956d97fSEmmanuel Vadot      Zero can be passed to disable error detection and value '1' indicates
1565956d97fSEmmanuel Vadot      that detection should be enabled but limit setting can be omitted. Limit
1575956d97fSEmmanuel Vadot      is given as microvolt offset from voltage set to regulator.
1585956d97fSEmmanuel Vadot
1595956d97fSEmmanuel Vadot  regulator-ov-warn-microvolt:
1605956d97fSEmmanuel Vadot    description: Set over voltage warning limit. This is a limit where hardware
1615956d97fSEmmanuel Vadot      is assumed still to be functional but approaching limit where it gets
1625956d97fSEmmanuel Vadot      damaged. Recovery actions should be initiated. Zero can be passed to
1635956d97fSEmmanuel Vadot      disable detection and value '1' indicates that detection should
1645956d97fSEmmanuel Vadot      be enabled but limit setting can be omitted. Limit is given as microvolt
1655956d97fSEmmanuel Vadot      offset from voltage set to regulator.
1665956d97fSEmmanuel Vadot
1675956d97fSEmmanuel Vadot  regulator-uv-protection-microvolt:
1685956d97fSEmmanuel Vadot    description: Set over under voltage protection limit. This is a limit where
1695956d97fSEmmanuel Vadot      hardware performs emergency shutdown. Zero can be passed to disable
1705956d97fSEmmanuel Vadot      protection and value '1' indicates that protection should be enabled but
1715956d97fSEmmanuel Vadot      limit setting can be omitted. Limit is given as microvolt offset from
1725956d97fSEmmanuel Vadot      voltage set to regulator.
1735956d97fSEmmanuel Vadot
1745956d97fSEmmanuel Vadot  regulator-uv-error-microvolt:
1755956d97fSEmmanuel Vadot    description: Set under voltage error limit. This is a limit where part of
176aa1a8ff2SEmmanuel Vadot      the hardware probably is malfunctional and damage prevention is requested
1775956d97fSEmmanuel Vadot      Zero can be passed to disable error detection and value '1' indicates
1785956d97fSEmmanuel Vadot      that detection should be enabled but limit setting can be omitted. Limit
1795956d97fSEmmanuel Vadot      is given as microvolt offset from voltage set to regulator.
1805956d97fSEmmanuel Vadot
1815956d97fSEmmanuel Vadot  regulator-uv-warn-microvolt:
1825956d97fSEmmanuel Vadot    description: Set over under voltage warning limit. This is a limit where
1835956d97fSEmmanuel Vadot      hardware is assumed still to be functional but approaching limit where
1845956d97fSEmmanuel Vadot      it gets damaged. Recovery actions should be initiated. Zero can be passed
1855956d97fSEmmanuel Vadot      to disable detection and value '1' indicates that detection should
1865956d97fSEmmanuel Vadot      be enabled but limit setting can be omitted. Limit is given as microvolt
1875956d97fSEmmanuel Vadot      offset from voltage set to regulator.
1885956d97fSEmmanuel Vadot
189*8d13bc63SEmmanuel Vadot  regulator-uv-less-critical-window-ms:
190*8d13bc63SEmmanuel Vadot    description: Specifies the time window (in milliseconds) following a
191*8d13bc63SEmmanuel Vadot      critical under-voltage event during which the system can continue to
192*8d13bc63SEmmanuel Vadot      operate safely while performing less critical operations. This property
193*8d13bc63SEmmanuel Vadot      provides a defined duration before a more severe reaction to the
194*8d13bc63SEmmanuel Vadot      under-voltage event is needed, allowing for certain non-urgent actions to
195*8d13bc63SEmmanuel Vadot      be carried out in preparation for potential power loss.
196*8d13bc63SEmmanuel Vadot
1975956d97fSEmmanuel Vadot  regulator-temp-protection-kelvin:
1985956d97fSEmmanuel Vadot    description: Set over temperature protection limit. This is a limit where
1995956d97fSEmmanuel Vadot      hardware performs emergency shutdown. Zero can be passed to disable
2005956d97fSEmmanuel Vadot      protection and value '1' indicates that protection should be enabled but
2015956d97fSEmmanuel Vadot      limit setting can be omitted.
2025956d97fSEmmanuel Vadot
2035956d97fSEmmanuel Vadot  regulator-temp-error-kelvin:
2045956d97fSEmmanuel Vadot    description: Set over temperature error limit. This is a limit where part of
205aa1a8ff2SEmmanuel Vadot      the hardware probably is malfunctional and damage prevention is requested
2065956d97fSEmmanuel Vadot      Zero can be passed to disable error detection and value '1' indicates
2075956d97fSEmmanuel Vadot      that detection should be enabled but limit setting can be omitted.
2085956d97fSEmmanuel Vadot
2095956d97fSEmmanuel Vadot  regulator-temp-warn-kelvin:
2105956d97fSEmmanuel Vadot    description: Set over temperature warning limit. This is a limit where
2115956d97fSEmmanuel Vadot      hardware is assumed still to be functional but approaching limit where it
2125956d97fSEmmanuel Vadot      gets damaged. Recovery actions should be initiated. Zero can be passed to
2135956d97fSEmmanuel Vadot      disable detection and value '1' indicates that detection should
2145956d97fSEmmanuel Vadot      be enabled but limit setting can be omitted.
2155956d97fSEmmanuel Vadot
216c66ec88fSEmmanuel Vadot  regulator-active-discharge:
217c66ec88fSEmmanuel Vadot    description: |
218c66ec88fSEmmanuel Vadot      tristate, enable/disable active discharge of regulators. The values are:
219c66ec88fSEmmanuel Vadot      0: Disable active discharge.
220c66ec88fSEmmanuel Vadot      1: Enable active discharge.
221c66ec88fSEmmanuel Vadot      Absence of this property will leave configuration to default.
222fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
223c66ec88fSEmmanuel Vadot    enum: [0, 1]
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot  regulator-coupled-with:
226c66ec88fSEmmanuel Vadot    description: Regulators with which the regulator is coupled. The linkage
227c66ec88fSEmmanuel Vadot      is 2-way - all coupled regulators should be linked with each other.
228c66ec88fSEmmanuel Vadot      A regulator should not be coupled with its supplier.
229fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
230c9ccf3a3SEmmanuel Vadot    items:
231c9ccf3a3SEmmanuel Vadot      maxItems: 1
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot  regulator-coupled-max-spread:
234c66ec88fSEmmanuel Vadot    description: Array of maximum spread between voltages of coupled regulators
235c66ec88fSEmmanuel Vadot      in microvolts, each value in the array relates to the corresponding
236c66ec88fSEmmanuel Vadot      couple specified by the regulator-coupled-with property.
237fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
238c66ec88fSEmmanuel Vadot
239c66ec88fSEmmanuel Vadot  regulator-max-step-microvolt:
240c66ec88fSEmmanuel Vadot    description: Maximum difference between current and target voltages
241c66ec88fSEmmanuel Vadot      that can be changed safely in a single step.
242c66ec88fSEmmanuel Vadot
243c66ec88fSEmmanuel VadotpatternProperties:
244c66ec88fSEmmanuel Vadot  ".*-supply$":
245c66ec88fSEmmanuel Vadot    description: Input supply phandle(s) for this node
246c66ec88fSEmmanuel Vadot
2478bab661aSEmmanuel Vadot  "^regulator-state-(standby|mem|disk)$":
248c66ec88fSEmmanuel Vadot    type: object
249c66ec88fSEmmanuel Vadot    description:
250c66ec88fSEmmanuel Vadot      sub-nodes for regulator state in Standby, Suspend-to-RAM, and
251c66ec88fSEmmanuel Vadot      Suspend-to-DISK modes. Equivalent with standby, mem, and disk Linux
252c66ec88fSEmmanuel Vadot      sleep states.
253c66ec88fSEmmanuel Vadot
254c66ec88fSEmmanuel Vadot    properties:
255c66ec88fSEmmanuel Vadot      regulator-on-in-suspend:
256c66ec88fSEmmanuel Vadot        description: regulator should be on in suspend state.
257c66ec88fSEmmanuel Vadot        type: boolean
258c66ec88fSEmmanuel Vadot
259c66ec88fSEmmanuel Vadot      regulator-off-in-suspend:
260c66ec88fSEmmanuel Vadot        description: regulator should be off in suspend state.
261c66ec88fSEmmanuel Vadot        type: boolean
262c66ec88fSEmmanuel Vadot
263c66ec88fSEmmanuel Vadot      regulator-suspend-min-microvolt:
264c66ec88fSEmmanuel Vadot        description: minimum voltage may be set in suspend state.
265c66ec88fSEmmanuel Vadot
266c66ec88fSEmmanuel Vadot      regulator-suspend-max-microvolt:
267c66ec88fSEmmanuel Vadot        description: maximum voltage may be set in suspend state.
268c66ec88fSEmmanuel Vadot
269c66ec88fSEmmanuel Vadot      regulator-suspend-microvolt:
270c66ec88fSEmmanuel Vadot        description: the default voltage which regulator would be set in
271c66ec88fSEmmanuel Vadot          suspend. This property is now deprecated, instead setting voltage
272c66ec88fSEmmanuel Vadot          for suspend mode via the API which regulator driver provides is
273c66ec88fSEmmanuel Vadot          recommended.
274c66ec88fSEmmanuel Vadot
275c66ec88fSEmmanuel Vadot      regulator-changeable-in-suspend:
276c66ec88fSEmmanuel Vadot        description: whether the default voltage and the regulator on/off
277c66ec88fSEmmanuel Vadot          in suspend can be changed in runtime.
278c66ec88fSEmmanuel Vadot        type: boolean
279c66ec88fSEmmanuel Vadot
280c66ec88fSEmmanuel Vadot      regulator-mode:
281c66ec88fSEmmanuel Vadot        description: operating mode in the given suspend state. The set
282c66ec88fSEmmanuel Vadot          of possible operating modes depends on the capabilities of every
283c66ec88fSEmmanuel Vadot          hardware so the valid modes are documented on each regulator device
284c66ec88fSEmmanuel Vadot          tree binding document.
285fac71e4eSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
286c66ec88fSEmmanuel Vadot
287c66ec88fSEmmanuel Vadot    additionalProperties: false
288c66ec88fSEmmanuel Vadot
2896be33864SEmmanuel VadotadditionalProperties: true
2906be33864SEmmanuel Vadot
291c66ec88fSEmmanuel Vadotexamples:
292c66ec88fSEmmanuel Vadot  - |
293c66ec88fSEmmanuel Vadot    xyzreg: regulator {
294c66ec88fSEmmanuel Vadot      regulator-min-microvolt = <1000000>;
295c66ec88fSEmmanuel Vadot      regulator-max-microvolt = <2500000>;
296c66ec88fSEmmanuel Vadot      regulator-always-on;
297c66ec88fSEmmanuel Vadot      vin-supply = <&vin>;
298c66ec88fSEmmanuel Vadot
299c66ec88fSEmmanuel Vadot      regulator-state-mem {
300c66ec88fSEmmanuel Vadot        regulator-on-in-suspend;
301c66ec88fSEmmanuel Vadot      };
302c66ec88fSEmmanuel Vadot    };
303c66ec88fSEmmanuel Vadot
304c66ec88fSEmmanuel Vadot...
305