s5m8767-regulator.txt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. * Samsung S5M8767 Voltage and Current Regulator
  2. The Samsung S5M8767 is a multi-function device which includes volatage 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 op_mode description.
  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. The following are the names of the regulators that the s5m8767 pmic block
  66. supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
  67. as per the datasheet of s5m8767.
  68. - LDOn
  69. - valid values for n are 1 to 28
  70. - Example: LDO0, LD01, LDO28
  71. - BUCKn
  72. - valid values for n are 1 to 9.
  73. - Example: BUCK1, BUCK2, BUCK9
  74. The bindings inside the regulator nodes use the standard regulator bindings
  75. which are documented elsewhere.
  76. Example:
  77. s5m8767_pmic@66 {
  78. compatible = "samsung,s5m8767-pmic";
  79. reg = <0x66>;
  80. s5m8767,pmic-buck2-uses-gpio-dvs;
  81. s5m8767,pmic-buck3-uses-gpio-dvs;
  82. s5m8767,pmic-buck4-uses-gpio-dvs;
  83. s5m8767,pmic-buck-default-dvs-idx = <0>;
  84. s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 1 0 0>, /* DVS1 */
  85. <&gpx0 1 1 0 0>, /* DVS2 */
  86. <&gpx0 2 1 0 0>; /* DVS3 */
  87. s5m8767,pmic-buck-ds-gpios = <&gpx2 3 1 0 0>, /* SET1 */
  88. <&gpx2 4 1 0 0>, /* SET2 */
  89. <&gpx2 5 1 0 0>; /* SET3 */
  90. s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
  91. <1250000>, <1200000>,
  92. <1150000>, <1100000>,
  93. <1000000>, <950000>;
  94. s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
  95. <1100000>, <1100000>,
  96. <1000000>, <1000000>,
  97. <1000000>, <1000000>;
  98. s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
  99. <1200000>, <1200000>,
  100. <1200000>, <1200000>,
  101. <1200000>, <1200000>;
  102. regulators {
  103. ldo1_reg: LDO1 {
  104. regulator-name = "VDD_ABB_3.3V";
  105. regulator-min-microvolt = <3300000>;
  106. regulator-max-microvolt = <3300000>;
  107. op_mode = <1>; /* Normal Mode */
  108. };
  109. ldo2_reg: LDO2 {
  110. regulator-name = "VDD_ALIVE_1.1V";
  111. regulator-min-microvolt = <1100000>;
  112. regulator-max-microvolt = <1100000>;
  113. regulator-always-on;
  114. };
  115. buck1_reg: BUCK1 {
  116. regulator-name = "VDD_MIF_1.2V";
  117. regulator-min-microvolt = <950000>;
  118. regulator-max-microvolt = <1350000>;
  119. regulator-always-on;
  120. regulator-boot-on;
  121. };
  122. };
  123. };