dlg,da9063.yaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/dlg,da9063.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Dialog DA906{3L,3,2,1} Power Management Integrated Circuit (PMIC)
  7. maintainers:
  8. - Steve Twiss <stwiss.opensource@diasemi.com>
  9. description: |
  10. For device-tree bindings of other sub-modules refer to the binding documents
  11. under the respective sub-system directories.
  12. Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special
  13. handling: First, when GP_FB2 is used, it must be ensured that there is no
  14. moment where all voltage monitors are disabled. Next, as da9063 only supports
  15. UV *and* OV monitoring, both must be set to the same severity and value
  16. (0: disable, 1: enable).
  17. Product information for the DA906{3L,3,2,1} devices can be found here:
  18. - https://www.dialog-semiconductor.com/products/da9063l
  19. - https://www.dialog-semiconductor.com/products/da9063
  20. - https://www.dialog-semiconductor.com/products/da9062
  21. - https://www.dialog-semiconductor.com/products/da9061
  22. properties:
  23. compatible:
  24. enum:
  25. - dlg,da9061
  26. - dlg,da9062
  27. - dlg,da9063
  28. - dlg,da9063l
  29. reg:
  30. maxItems: 1
  31. interrupts:
  32. maxItems: 1
  33. interrupt-controller: true
  34. "#interrupt-cells":
  35. const: 2
  36. gpio-controller: true
  37. "#gpio-cells":
  38. const: 2
  39. gpio:
  40. type: object
  41. additionalProperties: false
  42. properties:
  43. compatible:
  44. const: dlg,da9062-gpio
  45. onkey:
  46. $ref: /schemas/input/dlg,da9062-onkey.yaml
  47. regulators:
  48. type: object
  49. additionalProperties: false
  50. patternProperties:
  51. "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck[1-4])$":
  52. $ref: /schemas/regulator/regulator.yaml
  53. unevaluatedProperties: false
  54. rtc:
  55. type: object
  56. $ref: /schemas/rtc/rtc.yaml#
  57. unevaluatedProperties: false
  58. properties:
  59. compatible:
  60. enum:
  61. - dlg,da9062-rtc
  62. - dlg,da9063-rtc
  63. thermal:
  64. $ref: /schemas/thermal/dlg,da9062-thermal.yaml
  65. watchdog:
  66. $ref: /schemas/watchdog/dlg,da9062-watchdog.yaml
  67. wakeup-source: true
  68. patternProperties:
  69. "^(.+-hog(-[0-9]+)?)$":
  70. type: object
  71. required:
  72. - gpio-hog
  73. required:
  74. - compatible
  75. - reg
  76. allOf:
  77. - if:
  78. properties:
  79. compatible:
  80. contains:
  81. enum:
  82. - dlg,da9063
  83. - dlg,da9063l
  84. then:
  85. properties:
  86. gpio-controller: false
  87. "#gpio-cells": false
  88. gpio: false
  89. regulators:
  90. patternProperties:
  91. "^buck[1-4]$": false
  92. thermal: false
  93. required:
  94. - interrupts
  95. - interrupt-controller
  96. - '#interrupt-cells'
  97. - if:
  98. properties:
  99. compatible:
  100. contains:
  101. enum:
  102. - dlg,da9062
  103. then:
  104. properties:
  105. regulators:
  106. patternProperties:
  107. "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": false
  108. required:
  109. - gpio
  110. - onkey
  111. - rtc
  112. - thermal
  113. - watchdog
  114. - if:
  115. properties:
  116. compatible:
  117. contains:
  118. enum:
  119. - dlg,da9061
  120. then:
  121. properties:
  122. gpio-controller: false
  123. "#gpio-cells": false
  124. gpio: false
  125. regulators:
  126. patternProperties:
  127. "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck4)$": false
  128. rtc: false
  129. required:
  130. - onkey
  131. - thermal
  132. - watchdog
  133. additionalProperties: false
  134. examples:
  135. - |
  136. #include <dt-bindings/interrupt-controller/irq.h>
  137. i2c {
  138. #address-cells = <1>;
  139. #size-cells = <0>;
  140. pmic@58 {
  141. compatible = "dlg,da9063";
  142. reg = <0x58>;
  143. interrupt-parent = <&gpio6>;
  144. interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
  145. interrupt-controller;
  146. #interrupt-cells = <2>;
  147. rtc {
  148. compatible = "dlg,da9063-rtc";
  149. };
  150. watchdog {
  151. compatible = "dlg,da9063-watchdog";
  152. };
  153. onkey {
  154. compatible = "dlg,da9063-onkey";
  155. dlg,disable-key-power;
  156. };
  157. regulators {
  158. bcore1 {
  159. regulator-name = "BCORE1";
  160. regulator-min-microvolt = <300000>;
  161. regulator-max-microvolt = <1570000>;
  162. regulator-min-microamp = <500000>;
  163. regulator-max-microamp = <2000000>;
  164. regulator-boot-on;
  165. };
  166. ldo6 {
  167. /* UNUSED */
  168. regulator-name = "LDO_6";
  169. regulator-uv-protection-microvolt = <0>;
  170. regulator-ov-protection-microvolt = <0>;
  171. };
  172. ldo11 {
  173. regulator-name = "LDO_11";
  174. regulator-min-microvolt = <900000>;
  175. regulator-max-microvolt = <900000>;
  176. regulator-uv-protection-microvolt = <1>;
  177. regulator-ov-protection-microvolt = <1>;
  178. regulator-always-on;
  179. };
  180. };
  181. };
  182. };
  183. - |
  184. #include <dt-bindings/interrupt-controller/irq.h>
  185. #include <dt-bindings/regulator/dlg,da9063-regulator.h>
  186. i2c {
  187. #address-cells = <1>;
  188. #size-cells = <0>;
  189. pmic@58 {
  190. compatible = "dlg,da9062";
  191. reg = <0x58>;
  192. gpio-controller;
  193. #gpio-cells = <2>;
  194. sd0-pwr-sel-hog {
  195. gpio-hog;
  196. gpios = <1 0>;
  197. input;
  198. line-name = "SD0_PWR_SEL";
  199. };
  200. sd1-pwr-sel-hog {
  201. gpio-hog;
  202. gpios = <2 0>;
  203. input;
  204. line-name = "SD1_PWR_SEL";
  205. };
  206. sw-et0-en-hog {
  207. gpio-hog;
  208. gpios = <3 0>;
  209. input;
  210. line-name = "SW_ET0_EN#";
  211. };
  212. pmic-good-hog {
  213. gpio-hog;
  214. gpios = <4 0>;
  215. output-high;
  216. line-name = "PMIC_PGOOD";
  217. };
  218. gpio {
  219. compatible = "dlg,da9062-gpio";
  220. };
  221. onkey {
  222. compatible = "dlg,da9062-onkey";
  223. };
  224. regulators {
  225. buck1 {
  226. regulator-name = "vdd_arm";
  227. regulator-min-microvolt = <925000>;
  228. regulator-max-microvolt = <1380000>;
  229. regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
  230. regulator-always-on;
  231. };
  232. buck2 {
  233. regulator-name = "vdd_soc";
  234. regulator-min-microvolt = <1150000>;
  235. regulator-max-microvolt = <1380000>;
  236. regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
  237. regulator-always-on;
  238. };
  239. buck3 {
  240. regulator-name = "vdd_ddr3";
  241. regulator-min-microvolt = <1500000>;
  242. regulator-max-microvolt = <1500000>;
  243. regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
  244. regulator-always-on;
  245. };
  246. buck4 {
  247. regulator-name = "vdd_eth";
  248. regulator-min-microvolt = <1200000>;
  249. regulator-max-microvolt = <1200000>;
  250. regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
  251. regulator-always-on;
  252. };
  253. ldo1 {
  254. regulator-name = "vdd_snvs";
  255. regulator-min-microvolt = <3000000>;
  256. regulator-max-microvolt = <3000000>;
  257. regulator-always-on;
  258. };
  259. ldo2 {
  260. regulator-name = "vdd_high";
  261. regulator-min-microvolt = <3000000>;
  262. regulator-max-microvolt = <3000000>;
  263. regulator-always-on;
  264. };
  265. ldo3 {
  266. regulator-name = "vdd_eth_io";
  267. regulator-min-microvolt = <2500000>;
  268. regulator-max-microvolt = <2500000>;
  269. };
  270. ldo4 {
  271. regulator-name = "vdd_emmc";
  272. regulator-min-microvolt = <1800000>;
  273. regulator-max-microvolt = <1800000>;
  274. regulator-always-on;
  275. };
  276. };
  277. rtc {
  278. compatible = "dlg,da9062-rtc";
  279. };
  280. thermal {
  281. compatible = "dlg,da9062-thermal";
  282. };
  283. watchdog {
  284. compatible = "dlg,da9062-watchdog";
  285. dlg,use-sw-pm;
  286. };
  287. };
  288. };
  289. ...