qcom,rpmh-regulator.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. Qualcomm Technologies, Inc. RPMh Regulators
  2. rpmh-regulator devices support PMIC regulator management via the Voltage
  3. Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators. The APPS
  4. processor communicates with these hardware blocks via a Resource State
  5. Coordinator (RSC) using command packets. The VRM allows changing three
  6. parameters for a given regulator: enable state, output voltage, and operating
  7. mode. The XOB allows changing only a single parameter for a given regulator:
  8. its enable state. Despite its name, the XOB is capable of controlling the
  9. enable state of any PMIC peripheral. It is used for clock buffers, low-voltage
  10. switches, and LDO/SMPS regulators which have a fixed voltage and mode.
  11. =======================
  12. Required Node Structure
  13. =======================
  14. RPMh regulators must be described in two levels of device nodes. The first
  15. level describes the PMIC containing the regulators and must reside within an
  16. RPMh device node. The second level describes each regulator within the PMIC
  17. which is to be used on the board. Each of these regulators maps to a single
  18. RPMh resource.
  19. The names used for regulator nodes must match those supported by a given PMIC.
  20. Supported regulator node names:
  21. PM8998: smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
  22. PMI8998: bob
  23. PM8005: smps1 - smps4
  24. ========================
  25. First Level Nodes - PMIC
  26. ========================
  27. - compatible
  28. Usage: required
  29. Value type: <string>
  30. Definition: Must be one of: "qcom,pm8998-rpmh-regulators",
  31. "qcom,pmi8998-rpmh-regulators" or
  32. "qcom,pm8005-rpmh-regulators".
  33. - qcom,pmic-id
  34. Usage: required
  35. Value type: <string>
  36. Definition: RPMh resource name suffix used for the regulators found on
  37. this PMIC. Typical values: "a", "b", "c", "d", "e", "f".
  38. - vdd-s1-supply
  39. - vdd-s2-supply
  40. - vdd-s3-supply
  41. - vdd-s4-supply
  42. Usage: optional (PM8998 and PM8005 only)
  43. Value type: <phandle>
  44. Definition: phandle of the parent supply regulator of one or more of the
  45. regulators for this PMIC.
  46. - vdd-s5-supply
  47. - vdd-s6-supply
  48. - vdd-s7-supply
  49. - vdd-s8-supply
  50. - vdd-s9-supply
  51. - vdd-s10-supply
  52. - vdd-s11-supply
  53. - vdd-s12-supply
  54. - vdd-s13-supply
  55. - vdd-l1-l27-supply
  56. - vdd-l2-l8-l17-supply
  57. - vdd-l3-l11-supply
  58. - vdd-l4-l5-supply
  59. - vdd-l6-supply
  60. - vdd-l7-l12-l14-l15-supply
  61. - vdd-l9-supply
  62. - vdd-l10-l23-l25-supply
  63. - vdd-l13-l19-l21-supply
  64. - vdd-l16-l28-supply
  65. - vdd-l18-l22-supply
  66. - vdd-l20-l24-supply
  67. - vdd-l26-supply
  68. - vin-lvs-1-2-supply
  69. Usage: optional (PM8998 only)
  70. Value type: <phandle>
  71. Definition: phandle of the parent supply regulator of one or more of the
  72. regulators for this PMIC.
  73. - vdd-bob-supply
  74. Usage: optional (PMI8998 only)
  75. Value type: <phandle>
  76. Definition: BOB regulator parent supply phandle
  77. ===============================
  78. Second Level Nodes - Regulators
  79. ===============================
  80. - qcom,always-wait-for-ack
  81. Usage: optional
  82. Value type: <empty>
  83. Definition: Boolean flag which indicates that the application processor
  84. must wait for an ACK or a NACK from RPMh for every request
  85. sent for this regulator including those which are for a
  86. strictly lower power state.
  87. Other properties defined in Documentation/devicetree/bindings/regulator.txt
  88. may also be used. regulator-initial-mode and regulator-allowed-modes may be
  89. specified for VRM regulators using mode values from
  90. include/dt-bindings/regulator/qcom,rpmh-regulator.h. regulator-allow-bypass
  91. may be specified for BOB type regulators managed via VRM.
  92. regulator-allow-set-load may be specified for LDO type regulators managed via
  93. VRM.
  94. ========
  95. Examples
  96. ========
  97. #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
  98. &apps_rsc {
  99. pm8998-rpmh-regulators {
  100. compatible = "qcom,pm8998-rpmh-regulators";
  101. qcom,pmic-id = "a";
  102. vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
  103. smps2 {
  104. regulator-min-microvolt = <1100000>;
  105. regulator-max-microvolt = <1100000>;
  106. };
  107. pm8998_s5: smps5 {
  108. regulator-min-microvolt = <1904000>;
  109. regulator-max-microvolt = <2040000>;
  110. };
  111. ldo7 {
  112. regulator-min-microvolt = <1800000>;
  113. regulator-max-microvolt = <1800000>;
  114. regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
  115. regulator-allowed-modes =
  116. <RPMH_REGULATOR_MODE_LPM
  117. RPMH_REGULATOR_MODE_HPM>;
  118. regulator-allow-set-load;
  119. };
  120. lvs1 {
  121. regulator-min-microvolt = <1800000>;
  122. regulator-max-microvolt = <1800000>;
  123. };
  124. };
  125. pmi8998-rpmh-regulators {
  126. compatible = "qcom,pmi8998-rpmh-regulators";
  127. qcom,pmic-id = "b";
  128. bob {
  129. regulator-min-microvolt = <3312000>;
  130. regulator-max-microvolt = <3600000>;
  131. regulator-allowed-modes =
  132. <RPMH_REGULATOR_MODE_AUTO
  133. RPMH_REGULATOR_MODE_HPM>;
  134. regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
  135. };
  136. };
  137. };