regulator.yaml 13 KB

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