rockchip,rk817.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/rockchip,rk817.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: RK809/RK817 Power Management Integrated Circuit
  7. maintainers:
  8. - Chris Zhong <zyw@rock-chips.com>
  9. - Zhang Qing <zhangqing@rock-chips.com>
  10. description: |
  11. Rockchip RK809/RK817 series PMIC. This device consists of an i2c controlled
  12. MFD that includes regulators, an RTC, a power button and an audio codec.
  13. The RK817 variant also provides a battery charger manager.
  14. properties:
  15. compatible:
  16. enum:
  17. - rockchip,rk809
  18. - rockchip,rk817
  19. reg:
  20. maxItems: 1
  21. interrupts:
  22. maxItems: 1
  23. '#clock-cells':
  24. description:
  25. See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
  26. minimum: 0
  27. maximum: 1
  28. clocks:
  29. maxItems: 1
  30. clock-names:
  31. items:
  32. - const: mclk
  33. clock-output-names:
  34. description:
  35. From common clock binding to override the default output clock name.
  36. rockchip,system-power-controller:
  37. type: boolean
  38. deprecated: true
  39. description:
  40. Telling whether or not this PMIC is controlling the system power.
  41. '#sound-dai-cells':
  42. const: 0
  43. system-power-controller: true
  44. wakeup-source:
  45. type: boolean
  46. description:
  47. Device can be used as a wakeup source.
  48. vcc1-supply:
  49. description:
  50. The input supply for DCDC_REG1.
  51. vcc2-supply:
  52. description:
  53. The input supply for DCDC_REG2.
  54. vcc3-supply:
  55. description:
  56. The input supply for DCDC_REG3.
  57. vcc4-supply:
  58. description:
  59. The input supply for DCDC_REG4.
  60. vcc5-supply:
  61. description:
  62. The input supply for LDO_REG1, LDO_REG2, and LDO_REG3.
  63. vcc6-supply:
  64. description:
  65. The input supply for LDO_REG4, LDO_REG5, and LDO_REG6.
  66. vcc7-supply:
  67. description:
  68. The input supply for LDO_REG7, LDO_REG8, and LDO_REG9.
  69. vcc8-supply:
  70. description:
  71. The input supply for BOOST on RK817, or for SWITCH_REG2 on RK809.
  72. vcc9-supply:
  73. description:
  74. The input supply for OTG_SWITCH on RK817,
  75. or for DCDC_REG5 and SWITCH_REG1 on RK809.
  76. regulators:
  77. type: object
  78. patternProperties:
  79. "^(LDO_REG[1-9]|DCDC_REG[1-5]|BOOST|OTG_SWITCH|SWITCH_REG[1-2])$":
  80. $ref: /schemas/regulator/regulator.yaml
  81. unevaluatedProperties: false
  82. additionalProperties: false
  83. codec:
  84. type: object
  85. additionalProperties: false
  86. properties:
  87. rockchip,mic-in-differential:
  88. type: boolean
  89. description:
  90. Describes if the microphone uses differential mode.
  91. charger:
  92. type: object
  93. $ref: /schemas/power/supply/power-supply.yaml
  94. properties:
  95. monitored-battery:
  96. description: |
  97. A phandle to a monitored battery node that contains a valid
  98. value for:
  99. charge-full-design-microamp-hours,
  100. charge-term-current-microamp,
  101. constant-charge-current-max-microamp,
  102. constant-charge-voltage-max-microvolt,
  103. voltage-max-design-microvolt,
  104. voltage-min-design-microvolt,
  105. and a valid ocv-capacity table.
  106. rockchip,resistor-sense-micro-ohms:
  107. description: |
  108. Value in microohms of the battery sense resistor. This value is
  109. used by the driver to set the correct divisor value to translate
  110. ADC readings into the proper units of measure.
  111. enum: [10000, 20000]
  112. rockchip,sleep-enter-current-microamp:
  113. description: |
  114. Value in microamps of the sleep enter current for the charger.
  115. Value is used by the driver to calibrate the relax threshold.
  116. rockchip,sleep-filter-current-microamp:
  117. description:
  118. Value in microamps of the sleep filter current for the charger.
  119. Value is used by the driver to derive the sleep sample current.
  120. required:
  121. - monitored-battery
  122. - rockchip,resistor-sense-micro-ohms
  123. - rockchip,sleep-enter-current-microamp
  124. - rockchip,sleep-filter-current-microamp
  125. additionalProperties: false
  126. allOf:
  127. - $ref: /schemas/sound/dai-common.yaml#
  128. - if:
  129. properties:
  130. '#clock-cells':
  131. const: 0
  132. then:
  133. properties:
  134. clock-output-names:
  135. maxItems: 1
  136. else:
  137. properties:
  138. clock-output-names:
  139. maxItems: 2
  140. - if:
  141. properties:
  142. compatible:
  143. contains:
  144. const: rockchip,rk817
  145. then:
  146. properties:
  147. regulators:
  148. patternProperties:
  149. "^(DCDC_REG5|SWITCH_REG[1-2])$": false
  150. else:
  151. properties:
  152. regulators:
  153. patternProperties:
  154. "^(BOOST|OTG_SWITCH)$": false
  155. required:
  156. - compatible
  157. - reg
  158. - interrupts
  159. - "#clock-cells"
  160. additionalProperties: false
  161. examples:
  162. - |
  163. #include <dt-bindings/clock/px30-cru.h>
  164. #include <dt-bindings/pinctrl/rockchip.h>
  165. #include <dt-bindings/interrupt-controller/irq.h>
  166. #include <dt-bindings/gpio/gpio.h>
  167. i2c {
  168. #address-cells = <1>;
  169. #size-cells = <0>;
  170. rk817: pmic@20 {
  171. compatible = "rockchip,rk817";
  172. reg = <0x20>;
  173. interrupt-parent = <&gpio0>;
  174. interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
  175. clock-output-names = "rk808-clkout1", "xin32k";
  176. clock-names = "mclk";
  177. clocks = <&cru SCLK_I2S1_OUT>;
  178. pinctrl-names = "default";
  179. pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
  180. wakeup-source;
  181. #clock-cells = <1>;
  182. #sound-dai-cells = <0>;
  183. vcc1-supply = <&vccsys>;
  184. vcc2-supply = <&vccsys>;
  185. vcc3-supply = <&vccsys>;
  186. vcc4-supply = <&vccsys>;
  187. vcc5-supply = <&vccsys>;
  188. vcc6-supply = <&vccsys>;
  189. vcc7-supply = <&vccsys>;
  190. regulators {
  191. vdd_logic: DCDC_REG1 {
  192. regulator-name = "vdd_logic";
  193. regulator-min-microvolt = <950000>;
  194. regulator-max-microvolt = <1150000>;
  195. regulator-ramp-delay = <6001>;
  196. regulator-always-on;
  197. regulator-boot-on;
  198. regulator-state-mem {
  199. regulator-on-in-suspend;
  200. regulator-suspend-microvolt = <950000>;
  201. };
  202. };
  203. vdd_arm: DCDC_REG2 {
  204. regulator-name = "vdd_arm";
  205. regulator-min-microvolt = <950000>;
  206. regulator-max-microvolt = <1350000>;
  207. regulator-ramp-delay = <6001>;
  208. regulator-always-on;
  209. regulator-boot-on;
  210. regulator-state-mem {
  211. regulator-off-in-suspend;
  212. regulator-suspend-microvolt = <950000>;
  213. };
  214. };
  215. vcc_ddr: DCDC_REG3 {
  216. regulator-name = "vcc_ddr";
  217. regulator-always-on;
  218. regulator-boot-on;
  219. regulator-state-mem {
  220. regulator-on-in-suspend;
  221. };
  222. };
  223. vcc_3v3: DCDC_REG4 {
  224. regulator-name = "vcc_3v3";
  225. regulator-min-microvolt = <3300000>;
  226. regulator-max-microvolt = <3300000>;
  227. regulator-always-on;
  228. regulator-boot-on;
  229. regulator-state-mem {
  230. regulator-off-in-suspend;
  231. regulator-suspend-microvolt = <3300000>;
  232. };
  233. };
  234. vcc_1v8: LDO_REG2 {
  235. regulator-name = "vcc_1v8";
  236. regulator-min-microvolt = <1800000>;
  237. regulator-max-microvolt = <1800000>;
  238. regulator-always-on;
  239. regulator-boot-on;
  240. regulator-state-mem {
  241. regulator-on-in-suspend;
  242. regulator-suspend-microvolt = <1800000>;
  243. };
  244. };
  245. vdd_1v0: LDO_REG3 {
  246. regulator-name = "vdd_1v0";
  247. regulator-min-microvolt = <1000000>;
  248. regulator-max-microvolt = <1000000>;
  249. regulator-always-on;
  250. regulator-boot-on;
  251. regulator-state-mem {
  252. regulator-on-in-suspend;
  253. regulator-suspend-microvolt = <1000000>;
  254. };
  255. };
  256. vcc3v3_pmu: LDO_REG4 {
  257. regulator-name = "vcc3v3_pmu";
  258. regulator-min-microvolt = <3300000>;
  259. regulator-max-microvolt = <3300000>;
  260. regulator-always-on;
  261. regulator-boot-on;
  262. regulator-state-mem {
  263. regulator-on-in-suspend;
  264. regulator-suspend-microvolt = <3300000>;
  265. };
  266. };
  267. vccio_sd: LDO_REG5 {
  268. regulator-name = "vccio_sd";
  269. regulator-min-microvolt = <1800000>;
  270. regulator-max-microvolt = <3300000>;
  271. regulator-always-on;
  272. regulator-boot-on;
  273. regulator-state-mem {
  274. regulator-on-in-suspend;
  275. regulator-suspend-microvolt = <3300000>;
  276. };
  277. };
  278. vcc_sd: LDO_REG6 {
  279. regulator-name = "vcc_sd";
  280. regulator-min-microvolt = <3300000>;
  281. regulator-max-microvolt = <3300000>;
  282. regulator-boot-on;
  283. regulator-state-mem {
  284. regulator-on-in-suspend;
  285. regulator-suspend-microvolt = <3300000>;
  286. };
  287. };
  288. vcc_bl: LDO_REG7 {
  289. regulator-name = "vcc_bl";
  290. regulator-min-microvolt = <3300000>;
  291. regulator-max-microvolt = <3300000>;
  292. regulator-state-mem {
  293. regulator-off-in-suspend;
  294. regulator-suspend-microvolt = <3300000>;
  295. };
  296. };
  297. vcc_lcd: LDO_REG8 {
  298. regulator-name = "vcc_lcd";
  299. regulator-min-microvolt = <2800000>;
  300. regulator-max-microvolt = <2800000>;
  301. regulator-state-mem {
  302. regulator-off-in-suspend;
  303. regulator-suspend-microvolt = <2800000>;
  304. };
  305. };
  306. vcc_cam: LDO_REG9 {
  307. regulator-name = "vcc_cam";
  308. regulator-min-microvolt = <3000000>;
  309. regulator-max-microvolt = <3000000>;
  310. regulator-state-mem {
  311. regulator-off-in-suspend;
  312. regulator-suspend-microvolt = <3000000>;
  313. };
  314. };
  315. };
  316. rk817_charger: charger {
  317. monitored-battery = <&battery>;
  318. rockchip,resistor-sense-micro-ohms = <10000>;
  319. rockchip,sleep-enter-current-microamp = <300000>;
  320. rockchip,sleep-filter-current-microamp = <100000>;
  321. };
  322. rk817_codec: codec {
  323. rockchip,mic-in-differential;
  324. };
  325. };
  326. };