qpnp-regulator.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Qualcomm QPNP Regulators
  2. qpnp-regulator is a regulator driver which supports regulators inside of PMICs
  3. that utilize the MSM SPMI implementation.
  4. Required properties:
  5. - compatible: Must be "qcom,qpnp-regulator"
  6. - reg: Specifies the SPMI address and size for this regulator device
  7. Note, this is the only property which can be used within a
  8. subnode of a node which has specified spmi-dev-container.
  9. - regulator-name: A string used as a descriptive name for regulator outputs
  10. - parent-supply: phandle to the parent supply/regulator node
  11. Required structure:
  12. - A qcom,qpnp-regulator node must be a child of an SPMI node that has specified
  13. the spmi-slave-container property
  14. Optional properties:
  15. - interrupts: List of interrupts used by the regulator.
  16. - interrupt-names: List of strings defining the names of the
  17. interrupts in the 'interrupts' property 1-to-1.
  18. Supported values are "ocp" for voltage switch
  19. type regulators. If an OCP interrupt is
  20. specified, then the voltage switch will be
  21. toggled off and back on when OCP triggers in
  22. order to handle high in-rush current.
  23. - qcom,system-load: Load in uA present on regulator that is not
  24. captured by any consumer request
  25. - qcom,enable-time: Time in us to delay after enabling the regulator
  26. - qcom,auto-mode-enable: 1 = Enable automatic hardware selection of
  27. regulator mode (HPM vs LPM); not available on
  28. boost type regulators
  29. 0 = Disable auto mode selection
  30. - qcom,bypass-mode-enable: 1 = Enable bypass mode for an LDO type regulator
  31. so that it acts like a switch and simply outputs
  32. its input voltage
  33. 0 = Do not enable bypass mode
  34. - qcom,ocp-enable: 1 = Allow over current protection (OCP) to be
  35. enabled for voltage switch type regulators so
  36. that they latch off automatically when over
  37. current is detected. OCP is enabled when in
  38. HPM or auto mode.
  39. 0 = Disable OCP
  40. - qcom,ocp-max-retries: Maximum number of times to try toggling a voltage
  41. switch off and back on as a result of
  42. consecutive over current events.
  43. - qcom,ocp-retry-delay: Time to delay in milliseconds between each
  44. voltage switch toggle after an over current
  45. event takes place.
  46. - qcom,pull-down-enable: 1 = Enable output pull down resistor when the
  47. regulator is disabled
  48. 0 = Disable pull down resistor
  49. - qcom,soft-start-enable: 1 = Enable soft start for LDO and voltage switch
  50. type regulators so that output voltage slowly
  51. ramps up when the regulator is enabled
  52. 0 = Disable soft start
  53. - qcom,boost-current-limit: This property sets the current limit of boost
  54. type regulators; supported values are:
  55. 0 = 300 mA
  56. 1 = 600 mA
  57. 2 = 900 mA
  58. 3 = 1200 mA
  59. 4 = 1500 mA
  60. 5 = 1800 mA
  61. 6 = 2100 mA
  62. 7 = 2400 mA
  63. - qcom,pin-ctrl-enable: Bit mask specifying which hardware pins should be
  64. used to enable the regulator, if any; supported
  65. bits are:
  66. 0 = ignore all hardware enable signals
  67. BIT(0) = follow HW0_EN signal
  68. BIT(1) = follow HW1_EN signal
  69. BIT(2) = follow HW2_EN signal
  70. BIT(3) = follow HW3_EN signal
  71. - qcom,pin-ctrl-hpm: Bit mask specifying which hardware pins should be
  72. used to force the regulator into high power
  73. mode, if any; supported bits are:
  74. 0 = ignore all hardware enable signals
  75. BIT(0) = follow HW0_EN signal
  76. BIT(1) = follow HW1_EN signal
  77. BIT(2) = follow HW2_EN signal
  78. BIT(3) = follow HW3_EN signal
  79. BIT(4) = follow PMIC awake state
  80. - qcom,vs-soft-start-strength: This property sets the soft start strength for
  81. voltage switch type regulators; supported values
  82. are:
  83. 0 = 0.05 uA
  84. 1 = 0.25 uA
  85. 2 = 0.55 uA
  86. 3 = 0.75 uA
  87. - qcom,hpm-enable: 1 = Enable high power mode (HPM), also referred
  88. to as NPM. HPM consumes more ground current
  89. than LPM, but it can source significantly higher
  90. load current. HPM is not available on boost
  91. type regulators. For voltage switch type
  92. regulators, HPM implies that over current
  93. protection and soft start are active all the
  94. time. This configuration can be overwritten
  95. by changing the regulator's mode dynamically.
  96. 0 = Do not enable HPM
  97. - qcom,force-type: Override the type and subtype register values. Useful for some
  98. regulators that have invalid types advertised by the hardware.
  99. The format is two unsigned integers of the form <type subtype>.
  100. - spmi-dev-container: Specifies that all the device nodes specified
  101. within this node should have their resources coalesced into a
  102. single spmi_device. This is used to specify all SPMI peripherals
  103. that logically make up a single regulator device.
  104. Note, if a given optional qcom,* binding is not present, then the qpnp-regulator
  105. driver will leave that feature in the default hardware state.
  106. All properties specified within the core regulator framework can also be used.
  107. These bindings can be found in regulator.txt.
  108. Example:
  109. qcom,spmi@fc4c0000 {
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. interrupt-controller;
  113. #interrupt-cells = <3>;
  114. qcom,pm8941@1 {
  115. spmi-slave-container;
  116. reg = <0x1>;
  117. #address-cells = <1>;
  118. #size-cells = <1>;
  119. regulator@1400 {
  120. regulator-name = "8941_s1";
  121. spmi-dev-container;
  122. #address-cells = <1>;
  123. #size-cells = <1>;
  124. compatible = "qcom,qpnp-regulator";
  125. reg = <0x1400 0x300>;
  126. regulator-min-microvolt = <1300000>;
  127. regulator-max-microvolt = <1400000>;
  128. qcom,ctl@1400 {
  129. reg = <0x1400 0x100>;
  130. };
  131. qcom,ps@1500 {
  132. reg = <0x1500 0x100>;
  133. };
  134. qcom,freq@1600 {
  135. reg = <0x1600 0x100>;
  136. };
  137. };
  138. regulator@4000 {
  139. regulator-name = "8941_l1";
  140. reg = <0x4000 0x100>;
  141. compatible = "qcom,qpnp-regulator";
  142. regulator-min-microvolt = <1225000>;
  143. regulator-max-microvolt = <1300000>;
  144. qcom,pull-down-enable = <1>;
  145. };
  146. };
  147. };