qcom-rpm.txt 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. Qualcomm Resource Power Manager (RPM)
  2. This driver is used to interface with the Resource Power Manager (RPM) found in
  3. various Qualcomm platforms. The RPM allows each component in the system to vote
  4. for state of the system resources, such as clocks, regulators and bus
  5. frequencies.
  6. - compatible:
  7. Usage: required
  8. Value type: <string>
  9. Definition: must be one of:
  10. "qcom,rpm-apq8064"
  11. "qcom,rpm-msm8660"
  12. "qcom,rpm-msm8960"
  13. "qcom,rpm-ipq8064"
  14. "qcom,rpm-mdm9615"
  15. - reg:
  16. Usage: required
  17. Value type: <prop-encoded-array>
  18. Definition: base address and size of the RPM's message ram
  19. - interrupts:
  20. Usage: required
  21. Value type: <prop-encoded-array>
  22. Definition: three entries specifying the RPM's:
  23. 1. acknowledgement interrupt
  24. 2. error interrupt
  25. 3. wakeup interrupt
  26. - interrupt-names:
  27. Usage: required
  28. Value type: <string-array>
  29. Definition: must be the three strings "ack", "err" and "wakeup", in order
  30. - qcom,ipc:
  31. Usage: required
  32. Value type: <prop-encoded-array>
  33. Definition: three entries specifying the outgoing ipc bit used for
  34. signaling the RPM:
  35. - phandle to a syscon node representing the apcs registers
  36. - u32 representing offset to the register within the syscon
  37. - u32 representing the ipc bit within the register
  38. = SUBNODES
  39. The RPM exposes resources to its subnodes. The below bindings specify the set
  40. of valid subnodes that can operate on these resources.
  41. == Regulators
  42. Regulator nodes are identified by their compatible:
  43. - compatible:
  44. Usage: required
  45. Value type: <string>
  46. Definition: must be one of:
  47. "qcom,rpm-pm8058-regulators"
  48. "qcom,rpm-pm8901-regulators"
  49. "qcom,rpm-pm8921-regulators"
  50. "qcom,rpm-pm8018-regulators"
  51. - vdd_l0_l1_lvs-supply:
  52. - vdd_l2_l11_l12-supply:
  53. - vdd_l3_l4_l5-supply:
  54. - vdd_l6_l7-supply:
  55. - vdd_l8-supply:
  56. - vdd_l9-supply:
  57. - vdd_l10-supply:
  58. - vdd_l13_l16-supply:
  59. - vdd_l14_l15-supply:
  60. - vdd_l17_l18-supply:
  61. - vdd_l19_l20-supply:
  62. - vdd_l21-supply:
  63. - vdd_l22-supply:
  64. - vdd_l23_l24_l25-supply:
  65. - vdd_ncp-supply:
  66. - vdd_s0-supply:
  67. - vdd_s1-supply:
  68. - vdd_s2-supply:
  69. - vdd_s3-supply:
  70. - vdd_s4-supply:
  71. Usage: optional (pm8058 only)
  72. Value type: <phandle>
  73. Definition: reference to regulator supplying the input pin, as
  74. described in the data sheet
  75. - lvs0_in-supply:
  76. - lvs1_in-supply:
  77. - lvs2_in-supply:
  78. - lvs3_in-supply:
  79. - mvs_in-supply:
  80. - vdd_l0-supply:
  81. - vdd_l1-supply:
  82. - vdd_l2-supply:
  83. - vdd_l3-supply:
  84. - vdd_l4-supply:
  85. - vdd_l5-supply:
  86. - vdd_l6-supply:
  87. - vdd_s0-supply:
  88. - vdd_s1-supply:
  89. - vdd_s2-supply:
  90. - vdd_s3-supply:
  91. - vdd_s4-supply:
  92. Usage: optional (pm8901 only)
  93. Value type: <phandle>
  94. Definition: reference to regulator supplying the input pin, as
  95. described in the data sheet
  96. - vdd_l1_l2_l12_l18-supply:
  97. - vdd_l3_l15_l17-supply:
  98. - vdd_l4_l14-supply:
  99. - vdd_l5_l8_l16-supply:
  100. - vdd_l6_l7-supply:
  101. - vdd_l9_l11-supply:
  102. - vdd_l10_l22-supply:
  103. - vdd_l21_l23_l29-supply:
  104. - vdd_l24-supply:
  105. - vdd_l25-supply:
  106. - vdd_l26-supply:
  107. - vdd_l27-supply:
  108. - vdd_l28-supply:
  109. - vdd_ncp-supply:
  110. - vdd_s1-supply:
  111. - vdd_s2-supply:
  112. - vdd_s4-supply:
  113. - vdd_s5-supply:
  114. - vdd_s6-supply:
  115. - vdd_s7-supply:
  116. - vdd_s8-supply:
  117. - vin_5vs-supply:
  118. - vin_lvs1_3_6-supply:
  119. - vin_lvs2-supply:
  120. - vin_lvs4_5_7-supply:
  121. Usage: optional (pm8921 only)
  122. Value type: <phandle>
  123. Definition: reference to regulator supplying the input pin, as
  124. described in the data sheet
  125. - vin_lvs1-supply:
  126. - vdd_l7-supply:
  127. - vdd_l8-supply:
  128. - vdd_l9_l10_l11_l12-supply:
  129. Usage: optional (pm8018 only)
  130. Value type: <phandle>
  131. Definition: reference to regulator supplying the input pin, as
  132. described in the data sheet
  133. The regulator node houses sub-nodes for each regulator within the device. Each
  134. sub-node is identified using the node's name, with valid values listed for each
  135. of the pmics below.
  136. pm8058:
  137. l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15,
  138. l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, s0, s1, s2, s3, s4,
  139. lvs0, lvs1, ncp
  140. pm8901:
  141. l0, l1, l2, l3, l4, l5, l6, s0, s1, s2, s3, s4, lvs0, lvs1, lvs2, lvs3,
  142. mvs
  143. pm8921:
  144. s1, s2, s3, s4, s7, s8, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  145. l12, l14, l15, l16, l17, l18, l21, l22, l23, l24, l25, l26, l27, l28,
  146. l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch,
  147. ncp
  148. pm8018:
  149. s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
  150. l12, l14, lvs1
  151. The content of each sub-node is defined by the standard binding for regulators -
  152. see regulator.txt - with additional custom properties described below:
  153. === Switch-mode Power Supply regulator custom properties
  154. - bias-pull-down:
  155. Usage: optional
  156. Value type: <empty>
  157. Definition: enable pull down of the regulator when inactive
  158. - qcom,switch-mode-frequency:
  159. Usage: required
  160. Value type: <u32>
  161. Definition: Frequency (Hz) of the switch-mode power supply;
  162. must be one of:
  163. 19200000, 9600000, 6400000, 4800000, 3840000, 3200000,
  164. 2740000, 2400000, 2130000, 1920000, 1750000, 1600000,
  165. 1480000, 1370000, 1280000, 1200000
  166. - qcom,force-mode:
  167. Usage: optional (default if no other qcom,force-mode is specified)
  168. Value type: <u32>
  169. Definition: indicates that the regulator should be forced to a
  170. particular mode, valid values are:
  171. QCOM_RPM_FORCE_MODE_NONE - do not force any mode
  172. QCOM_RPM_FORCE_MODE_LPM - force into low power mode
  173. QCOM_RPM_FORCE_MODE_HPM - force into high power mode
  174. QCOM_RPM_FORCE_MODE_AUTO - allow regulator to automatically
  175. select its own mode based on
  176. realtime current draw, only for:
  177. pm8921 smps and ftsmps
  178. - qcom,power-mode-hysteretic:
  179. Usage: optional
  180. Value type: <empty>
  181. Definition: select that the power supply should operate in hysteretic
  182. mode, instead of the default pwm mode
  183. === Low-dropout regulator custom properties
  184. - bias-pull-down:
  185. Usage: optional
  186. Value type: <empty>
  187. Definition: enable pull down of the regulator when inactive
  188. - qcom,force-mode:
  189. Usage: optional
  190. Value type: <u32>
  191. Definition: indicates that the regulator should not be forced to any
  192. particular mode, valid values are:
  193. QCOM_RPM_FORCE_MODE_NONE - do not force any mode
  194. QCOM_RPM_FORCE_MODE_LPM - force into low power mode
  195. QCOM_RPM_FORCE_MODE_HPM - force into high power mode
  196. QCOM_RPM_FORCE_MODE_BYPASS - set regulator to use bypass
  197. mode, i.e. to act as a switch
  198. and not regulate, only for:
  199. pm8921 pldo, nldo and nldo1200
  200. === Negative Charge Pump custom properties
  201. - qcom,switch-mode-frequency:
  202. Usage: required
  203. Value type: <u32>
  204. Definition: Frequency (Hz) of the switch mode power supply;
  205. must be one of:
  206. 19200000, 9600000, 6400000, 4800000, 3840000, 3200000,
  207. 2740000, 2400000, 2130000, 1920000, 1750000, 1600000,
  208. 1480000, 1370000, 1280000, 1200000
  209. = EXAMPLE
  210. #include <dt-bindings/mfd/qcom-rpm.h>
  211. rpm@108000 {
  212. compatible = "qcom,rpm-msm8960";
  213. reg = <0x108000 0x1000>;
  214. qcom,ipc = <&apcs 0x8 2>;
  215. interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
  216. interrupt-names = "ack", "err", "wakeup";
  217. regulators {
  218. compatible = "qcom,rpm-pm8921-regulators";
  219. vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
  220. s1 {
  221. regulator-min-microvolt = <1225000>;
  222. regulator-max-microvolt = <1225000>;
  223. bias-pull-down;
  224. qcom,switch-mode-frequency = <3200000>;
  225. };
  226. pm8921_s4: s4 {
  227. regulator-min-microvolt = <1800000>;
  228. regulator-max-microvolt = <1800000>;
  229. qcom,switch-mode-frequency = <1600000>;
  230. bias-pull-down;
  231. qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
  232. };
  233. };
  234. };