qcom-rpm.txt 7.0 KB

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