regulator.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/regulator/regulator.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Voltage/Current Regulators
  7. maintainers:
  8. - Liam Girdwood <lgirdwood@gmail.com>
  9. - Mark Brown <broonie@kernel.org>
  10. properties:
  11. regulator-name:
  12. description: A string used as a descriptive name for regulator outputs
  13. $ref: /schemas/types.yaml#/definitions/string
  14. regulator-min-microvolt:
  15. description: smallest voltage consumers may set
  16. regulator-max-microvolt:
  17. description: largest voltage consumers may set
  18. regulator-microvolt-offset:
  19. description: Offset applied to voltages to compensate for voltage drops
  20. $ref: /schemas/types.yaml#/definitions/uint32
  21. regulator-min-microamp:
  22. description: smallest current consumers may set
  23. regulator-max-microamp:
  24. description: largest current consumers may set
  25. regulator-input-current-limit-microamp:
  26. description: maximum input current regulator allows
  27. regulator-always-on:
  28. description: boolean, regulator should never be disabled
  29. type: boolean
  30. regulator-boot-on:
  31. description: bootloader/firmware enabled regulator.
  32. It's expected that this regulator was left on by the bootloader.
  33. If the bootloader didn't leave it on then OS should turn it on
  34. at boot but shouldn't prevent it from being turned off later.
  35. This property is intended to only be used for regulators where
  36. software cannot read the state of the regulator.
  37. type: boolean
  38. regulator-allow-bypass:
  39. description: allow the regulator to go into bypass mode
  40. type: boolean
  41. regulator-allow-set-load:
  42. description: allow the regulator performance level to be configured
  43. type: boolean
  44. regulator-ramp-delay:
  45. description: ramp delay for regulator(in uV/us) For hardware which supports
  46. disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay
  47. = <0>) for disabling ramp delay.
  48. $ref: /schemas/types.yaml#/definitions/uint32
  49. regulator-enable-ramp-delay:
  50. description: The time taken, in microseconds, for the supply rail to
  51. reach the target voltage, plus/minus whatever tolerance the board
  52. design requires. This property describes the total system ramp time
  53. required due to the combination of internal ramping of the regulator
  54. itself, and board design issues such as trace capacitance and load
  55. on the supply.
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. regulator-settling-time-us:
  58. description: Settling time, in microseconds, for voltage change if regulator
  59. have the constant time for any level voltage change. This is useful
  60. when regulator have exponential voltage change.
  61. regulator-settling-time-up-us:
  62. description: Settling time, in microseconds, for voltage increase if
  63. the regulator needs a constant time to settle after voltage increases
  64. of any level. This is useful for regulators with exponential voltage
  65. changes.
  66. regulator-settling-time-down-us:
  67. description: Settling time, in microseconds, for voltage decrease if
  68. the regulator needs a constant time to settle after voltage decreases
  69. of any level. This is useful for regulators with exponential voltage
  70. changes.
  71. regulator-soft-start:
  72. description: Enable soft start so that voltage ramps slowly
  73. type: boolean
  74. regulator-initial-mode:
  75. description: initial operating mode. The set of possible operating modes
  76. depends on the capabilities of every hardware so each device binding
  77. documentation explains which values the regulator supports.
  78. $ref: /schemas/types.yaml#/definitions/uint32
  79. regulator-allowed-modes:
  80. description: list of operating modes that software is allowed to configure
  81. for the regulator at run-time. Elements may be specified in any order.
  82. The set of possible operating modes depends on the capabilities of
  83. every hardware so each device binding document explains which values
  84. the regulator supports.
  85. $ref: /schemas/types.yaml#/definitions/uint32-array
  86. regulator-system-load:
  87. description: Load in uA present on regulator that is not captured by
  88. any consumer request.
  89. $ref: /schemas/types.yaml#/definitions/uint32
  90. regulator-pull-down:
  91. description: Enable pull down resistor when the regulator is disabled.
  92. type: boolean
  93. system-critical-regulator:
  94. description: Set if the regulator is critical to system stability or
  95. functionality.
  96. type: boolean
  97. regulator-over-current-protection:
  98. description: Enable over current protection.
  99. type: boolean
  100. regulator-oc-protection-microamp:
  101. description: Set over current protection limit. This is a limit where
  102. hardware performs emergency shutdown. Zero can be passed to disable
  103. protection and value '1' indicates that protection should be enabled but
  104. limit setting can be omitted.
  105. regulator-oc-error-microamp:
  106. description: Set over current error limit. This is a limit where part of
  107. the hardware probably is malfunctional and damage prevention is requested.
  108. Zero can be passed to disable error detection and value '1' indicates
  109. that detection should be enabled but limit setting can be omitted.
  110. regulator-oc-warn-microamp:
  111. description: Set over current warning limit. This is a limit where hardware
  112. is assumed still to be functional but approaching limit where it gets
  113. damaged. Recovery actions should be initiated. Zero can be passed to
  114. disable detection and value '1' indicates that detection should
  115. be enabled but limit setting can be omitted.
  116. regulator-ov-protection-microvolt:
  117. description: Set over voltage protection limit. This is a limit where
  118. hardware performs emergency shutdown. Zero can be passed to disable
  119. protection and value '1' indicates that protection should be enabled but
  120. limit setting can be omitted. Limit is given as microvolt offset from
  121. voltage set to regulator.
  122. regulator-ov-error-microvolt:
  123. description: Set over voltage error limit. This is a limit where part of
  124. the hardware probably is malfunctional and damage prevention is requested
  125. Zero can be passed to disable error detection and value '1' indicates
  126. that detection should be enabled but limit setting can be omitted. Limit
  127. is given as microvolt offset from voltage set to regulator.
  128. regulator-ov-warn-microvolt:
  129. description: Set over voltage warning limit. This is a limit where hardware
  130. is assumed still to be functional but approaching limit where it gets
  131. damaged. Recovery actions should be initiated. Zero can be passed to
  132. disable detection and value '1' indicates that detection should
  133. be enabled but limit setting can be omitted. Limit is given as microvolt
  134. offset from voltage set to regulator.
  135. regulator-uv-protection-microvolt:
  136. description: Set over under voltage protection limit. This is a limit where
  137. hardware performs emergency shutdown. Zero can be passed to disable
  138. protection and value '1' indicates that protection should be enabled but
  139. limit setting can be omitted. Limit is given as microvolt offset from
  140. voltage set to regulator.
  141. regulator-uv-error-microvolt:
  142. description: Set under voltage error limit. This is a limit where part of
  143. the hardware probably is malfunctional and damage prevention is requested
  144. Zero can be passed to disable error detection and value '1' indicates
  145. that detection should be enabled but limit setting can be omitted. Limit
  146. is given as microvolt offset from voltage set to regulator.
  147. regulator-uv-warn-microvolt:
  148. description: Set over under voltage warning limit. This is a limit where
  149. hardware is assumed still to be functional but approaching limit where
  150. it gets damaged. Recovery actions should be initiated. Zero can be passed
  151. to disable detection and value '1' indicates that detection should
  152. be enabled but limit setting can be omitted. Limit is given as microvolt
  153. offset from voltage set to regulator.
  154. regulator-uv-less-critical-window-ms:
  155. description: Specifies the time window (in milliseconds) following a
  156. critical under-voltage event during which the system can continue to
  157. operate safely while performing less critical operations. This property
  158. provides a defined duration before a more severe reaction to the
  159. under-voltage event is needed, allowing for certain non-urgent actions to
  160. be carried out in preparation for potential power loss.
  161. regulator-temp-protection-kelvin:
  162. description: Set over temperature protection limit. This is a limit where
  163. hardware performs emergency shutdown. Zero can be passed to disable
  164. protection and value '1' indicates that protection should be enabled but
  165. limit setting can be omitted.
  166. regulator-temp-error-kelvin:
  167. description: Set over temperature error limit. This is a limit where part of
  168. the hardware probably is malfunctional and damage prevention is requested
  169. Zero can be passed to disable error detection and value '1' indicates
  170. that detection should be enabled but limit setting can be omitted.
  171. regulator-temp-warn-kelvin:
  172. description: Set over temperature warning limit. This is a limit where
  173. hardware is assumed still to be functional but approaching limit where it
  174. gets damaged. Recovery actions should be initiated. Zero can be passed to
  175. disable detection and value '1' indicates that detection should
  176. be enabled but limit setting can be omitted.
  177. regulator-active-discharge:
  178. description: |
  179. tristate, enable/disable active discharge of regulators. The values are:
  180. 0: Disable active discharge.
  181. 1: Enable active discharge.
  182. Absence of this property will leave configuration to default.
  183. $ref: /schemas/types.yaml#/definitions/uint32
  184. enum: [0, 1]
  185. regulator-coupled-with:
  186. description: Regulators with which the regulator is coupled. The linkage
  187. is 2-way - all coupled regulators should be linked with each other.
  188. A regulator should not be coupled with its supplier.
  189. $ref: /schemas/types.yaml#/definitions/phandle-array
  190. items:
  191. maxItems: 1
  192. regulator-coupled-max-spread:
  193. description: Array of maximum spread between voltages of coupled regulators
  194. in microvolts, each value in the array relates to the corresponding
  195. couple specified by the regulator-coupled-with property.
  196. $ref: /schemas/types.yaml#/definitions/uint32-array
  197. regulator-max-step-microvolt:
  198. description: Maximum difference between current and target voltages
  199. that can be changed safely in a single step.
  200. patternProperties:
  201. ".*-supply$":
  202. description: Input supply phandle(s) for this node
  203. "^regulator-state-(standby|mem|disk)$":
  204. type: object
  205. description:
  206. sub-nodes for regulator state in Standby, Suspend-to-RAM, and
  207. Suspend-to-DISK modes. Equivalent with standby, mem, and disk Linux
  208. sleep states.
  209. properties:
  210. regulator-on-in-suspend:
  211. description: regulator should be on in suspend state.
  212. type: boolean
  213. regulator-off-in-suspend:
  214. description: regulator should be off in suspend state.
  215. type: boolean
  216. regulator-suspend-min-microvolt:
  217. description: minimum voltage may be set in suspend state.
  218. regulator-suspend-max-microvolt:
  219. description: maximum voltage may be set in suspend state.
  220. regulator-suspend-microvolt:
  221. description: the default voltage which regulator would be set in
  222. suspend. This property is now deprecated, instead setting voltage
  223. for suspend mode via the API which regulator driver provides is
  224. recommended.
  225. regulator-changeable-in-suspend:
  226. description: whether the default voltage and the regulator on/off
  227. in suspend can be changed in runtime.
  228. type: boolean
  229. regulator-mode:
  230. description: operating mode in the given suspend state. The set
  231. of possible operating modes depends on the capabilities of every
  232. hardware so the valid modes are documented on each regulator device
  233. tree binding document.
  234. $ref: /schemas/types.yaml#/definitions/uint32
  235. additionalProperties: false
  236. additionalProperties: true
  237. examples:
  238. - |
  239. xyzreg: regulator {
  240. regulator-min-microvolt = <1000000>;
  241. regulator-max-microvolt = <2500000>;
  242. regulator-always-on;
  243. vin-supply = <&vin>;
  244. regulator-state-mem {
  245. regulator-on-in-suspend;
  246. };
  247. };
  248. ...