s5m8767-regulator.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. * Samsung S5M8767 Voltage and Current Regulator
  2. The Samsung S5M8767 is a multi-function device which includes voltage and
  3. current regulators, rtc, charger controller and other sub-blocks. It is
  4. interfaced to the host controller using a i2c interface. Each sub-block is
  5. addressed by the host system using different i2c slave address. This document
  6. describes the bindings for 'pmic' sub-block of s5m8767.
  7. Required properties:
  8. - compatible: Should be "samsung,s5m8767-pmic".
  9. - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
  10. - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  11. units for buck2 when changing voltage using gpio dvs. Refer to [1] below
  12. for additional information.
  13. - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  14. units for buck3 when changing voltage using gpio dvs. Refer to [1] below
  15. for additional information.
  16. - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
  17. units for buck4 when changing voltage using gpio dvs. Refer to [1] below
  18. for additional information.
  19. - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
  20. for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
  21. [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
  22. property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
  23. property should specify atleast one voltage level (which would be a
  24. safe operating voltage).
  25. If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
  26. property is specified, then all the eight voltage values for the
  27. 's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
  28. Optional properties:
  29. - interrupt-parent: Specifies the phandle of the interrupt controller to which
  30. the interrupts from s5m8767 are delivered to.
  31. - interrupts: Interrupt specifiers for two interrupt sources.
  32. - First interrupt specifier is for 'irq1' interrupt.
  33. - Second interrupt specifier is for 'alert' interrupt.
  34. - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
  35. - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
  36. - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
  37. Additional properties required if either of the optional properties are used:
  38. - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
  39. the possible 8 options selectable by the dvs gpios. The value of this
  40. property should be between 0 and 7. If not specified or if out of range, the
  41. default value of this property is set to 0.
  42. - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
  43. for dvs. The format of the gpio specifier depends in the gpio controller.
  44. Regulators: The regulators of s5m8767 that have to be instantiated should be
  45. included in a sub-node named 'regulators'. Regulator nodes included in this
  46. sub-node should be of the format as listed below.
  47. regulator_name {
  48. ldo1_reg: LDO1 {
  49. regulator-name = "VDD_ALIVE_1.0V";
  50. regulator-min-microvolt = <1100000>;
  51. regulator-max-microvolt = <1100000>;
  52. regulator-always-on;
  53. regulator-boot-on;
  54. op_mode = <1>; /* Normal Mode */
  55. };
  56. };
  57. The above regulator entries are defined in regulator bindings documentation
  58. except these properties:
  59. - op_mode: describes the different operating modes of the LDO's with
  60. power mode change in SOC. The different possible values are,
  61. 0 - always off mode
  62. 1 - on in normal mode
  63. 2 - low power mode
  64. 3 - suspend mode
  65. - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
  66. GPIO controlling this regulator (enable/disable); This is
  67. valid only for buck9.
  68. The following are the names of the regulators that the s5m8767 pmic block
  69. supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
  70. as per the datasheet of s5m8767.
  71. - LDOn
  72. - valid values for n are 1 to 28
  73. - Example: LDO1, LDO2, LDO28
  74. - BUCKn
  75. - valid values for n are 1 to 9.
  76. - Example: BUCK1, BUCK2, BUCK9
  77. The bindings inside the regulator nodes use the standard regulator bindings
  78. which are documented elsewhere.
  79. Example:
  80. s5m8767_pmic@66 {
  81. compatible = "samsung,s5m8767-pmic";
  82. reg = <0x66>;
  83. s5m8767,pmic-buck2-uses-gpio-dvs;
  84. s5m8767,pmic-buck3-uses-gpio-dvs;
  85. s5m8767,pmic-buck4-uses-gpio-dvs;
  86. s5m8767,pmic-buck-default-dvs-idx = <0>;
  87. s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
  88. <&gpx0 1 0>, /* DVS2 */
  89. <&gpx0 2 0>; /* DVS3 */
  90. s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
  91. <&gpx2 4 0>, /* SET2 */
  92. <&gpx2 5 0>; /* SET3 */
  93. s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
  94. <1250000>, <1200000>,
  95. <1150000>, <1100000>,
  96. <1000000>, <950000>;
  97. s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
  98. <1100000>, <1100000>,
  99. <1000000>, <1000000>,
  100. <1000000>, <1000000>;
  101. s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
  102. <1200000>, <1200000>,
  103. <1200000>, <1200000>,
  104. <1200000>, <1200000>;
  105. regulators {
  106. ldo1_reg: LDO1 {
  107. regulator-name = "VDD_ABB_3.3V";
  108. regulator-min-microvolt = <3300000>;
  109. regulator-max-microvolt = <3300000>;
  110. op_mode = <1>; /* Normal Mode */
  111. };
  112. ldo2_reg: LDO2 {
  113. regulator-name = "VDD_ALIVE_1.1V";
  114. regulator-min-microvolt = <1100000>;
  115. regulator-max-microvolt = <1100000>;
  116. regulator-always-on;
  117. };
  118. buck1_reg: BUCK1 {
  119. regulator-name = "VDD_MIF_1.2V";
  120. regulator-min-microvolt = <950000>;
  121. regulator-max-microvolt = <1350000>;
  122. regulator-always-on;
  123. regulator-boot-on;
  124. };
  125. vemmc_reg: BUCK9 {
  126. regulator-name = "VMEM_VDD_2.8V";
  127. regulator-min-microvolt = <2800000>;
  128. regulator-max-microvolt = <2800000>;
  129. op_mode = <3>; /* Standby Mode */
  130. s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
  131. };
  132. };
  133. };