max77693.txt 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. Maxim MAX77693 multi-function device
  2. MAX77693 is a Multifunction device with the following submodules:
  3. - PMIC,
  4. - CHARGER,
  5. - LED,
  6. - MUIC,
  7. - HAPTIC
  8. It is interfaced to host controller using i2c.
  9. This document describes the bindings for the mfd device.
  10. Required properties:
  11. - compatible : Must be "maxim,max77693".
  12. - reg : Specifies the i2c slave address of PMIC block.
  13. - interrupts : This i2c device has an IRQ line connected to the main SoC.
  14. - interrupt-parent : The parent interrupt controller.
  15. Optional properties:
  16. - regulators : The regulators of max77693 have to be instantiated under subnod
  17. named "regulators" using the following format.
  18. regulators {
  19. regualtor-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
  20. standard regulator constratints[*].
  21. };
  22. [*] refer Documentation/devicetree/bindings/regulator/regulator.txt
  23. - haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
  24. users with tactile feedback. PWM period and duty-cycle are varied in
  25. order to provide the approprite level of feedback.
  26. Required properties:
  27. - compatible : Must be "maxim,max77693-hpatic"
  28. - haptic-supply : power supply for the haptic motor
  29. [*] refer Documentation/devicetree/bindings/regulator/regulator.txt
  30. - pwms : phandle to the physical PWM(Pulse Width Modulation) device.
  31. PWM properties should be named "pwms". And number of cell is different
  32. for each pwm device.
  33. To get more informations, please refer to documentaion.
  34. [*] refer Documentation/devicetree/bindings/pwm/pwm.txt
  35. - charger : Node configuring the charger driver.
  36. If present, required properties:
  37. - compatible : Must be "maxim,max77693-charger".
  38. Optional properties (if not set, defaults will be used):
  39. - maxim,constant-microvolt : Battery constant voltage in uV. The charger
  40. will operate in fast charge constant current mode till battery voltage
  41. reaches this level. Then the charger will switch to fast charge constant
  42. voltage mode. Also vsys (system voltage) will be set to this value when
  43. DC power is supplied but charger is not enabled.
  44. Valid values: 3650000 - 4400000, step by 25000 (rounded down)
  45. Default: 4200000
  46. - maxim,min-system-microvolt : Minimal system voltage in uV.
  47. Valid values: 3000000 - 3700000, step by 100000 (rounded down)
  48. Default: 3600000
  49. - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
  50. high temperature charging mode. If die temperature exceeds this value
  51. the charging current will be reduced by 105 mA/Celsius.
  52. Valid values: 70, 85, 100, 115
  53. Default: 100
  54. - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
  55. in uA (current from battery to system).
  56. Valid values: 2000000 - 3500000, step by 250000 (rounded down)
  57. Default: 3500000
  58. - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
  59. triggering input voltage regulation loop. If input voltage decreases
  60. below this value, the input current will be reduced to reach the
  61. threshold voltage.
  62. Valid values: 4300000, 4700000, 4800000, 4900000
  63. Default: 4300000
  64. - led : the LED submodule device node
  65. There are two LED outputs available - FLED1 and FLED2. Each of them can
  66. control a separate LED or they can be connected together to double
  67. the maximum current for a single connected LED. One LED is represented
  68. by one child node.
  69. Required properties:
  70. - compatible : Must be "maxim,max77693-led".
  71. Optional properties:
  72. - maxim,boost-mode :
  73. In boost mode the device can produce up to 1.2A of total current
  74. on both outputs. The maximum current on each output is reduced
  75. to 625mA then. If not enabled explicitly, boost setting defaults to
  76. LEDS_BOOST_FIXED in case both current sources are used.
  77. Possible values:
  78. LEDS_BOOST_OFF (0) - no boost,
  79. LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
  80. LEDS_BOOST_FIXED (2) - fixed mode.
  81. - maxim,boost-mvout : Output voltage of the boost module in millivolts.
  82. Valid values: 3300 - 5500, step by 25 (rounded down)
  83. Default: 3300
  84. - maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
  85. if chip estimates that system voltage could drop below this level due
  86. to flash power consumption.
  87. Valid values: 2400 - 3400, step by 33 (rounded down)
  88. Default: 2400
  89. Required properties for the LED child node:
  90. - led-sources : see Documentation/devicetree/bindings/leds/common.txt;
  91. device current output identifiers: 0 - FLED1, 1 - FLED2
  92. - led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
  93. Valid values for a LED connected to one FLED output:
  94. 15625 - 250000, step by 15625 (rounded down)
  95. Valid values for a LED connected to both FLED outputs:
  96. 15625 - 500000, step by 15625 (rounded down)
  97. - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
  98. Valid values for a single LED connected to one FLED output
  99. (boost mode must be turned off):
  100. 15625 - 1000000, step by 15625 (rounded down)
  101. Valid values for a single LED connected to both FLED outputs:
  102. 15625 - 1250000, step by 15625 (rounded down)
  103. Valid values for two LEDs case:
  104. 15625 - 625000, step by 15625 (rounded down)
  105. - flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
  106. Valid values: 62500 - 1000000, step by 62500 (rounded down)
  107. Optional properties for the LED child node:
  108. - label : see Documentation/devicetree/bindings/leds/common.txt
  109. Example:
  110. #include <dt-bindings/leds/common.h>
  111. max77693@66 {
  112. compatible = "maxim,max77693";
  113. reg = <0x66>;
  114. interrupt-parent = <&gpx1>;
  115. interrupts = <5 2>;
  116. regulators {
  117. esafeout@1 {
  118. regulator-compatible = "ESAFEOUT1";
  119. regulator-name = "ESAFEOUT1";
  120. regulator-boot-on;
  121. };
  122. esafeout@2 {
  123. regulator-compatible = "ESAFEOUT2";
  124. regulator-name = "ESAFEOUT2";
  125. };
  126. charger@0 {
  127. regulator-compatible = "CHARGER";
  128. regulator-name = "CHARGER";
  129. regulator-min-microamp = <60000>;
  130. regulator-max-microamp = <2580000>;
  131. regulator-boot-on;
  132. };
  133. };
  134. haptic {
  135. compatible = "maxim,max77693-haptic";
  136. haptic-supply = <&haptic_supply>;
  137. pwms = <&pwm 0 40000 0>;
  138. pwm-names = "haptic";
  139. };
  140. charger {
  141. compatible = "maxim,max77693-charger";
  142. maxim,constant-microvolt = <4200000>;
  143. maxim,min-system-microvolt = <3600000>;
  144. maxim,thermal-regulation-celsius = <75>;
  145. maxim,battery-overcurrent-microamp = <3000000>;
  146. maxim,charge-input-threshold-microvolt = <4300000>;
  147. led {
  148. compatible = "maxim,max77693-led";
  149. maxim,boost-mode = <LEDS_BOOST_FIXED>;
  150. maxim,boost-mvout = <5000>;
  151. maxim,mvsys-min = <2400>;
  152. camera_flash: flash-led {
  153. label = "max77693-flash";
  154. led-sources = <0>, <1>;
  155. led-max-microamp = <500000>;
  156. flash-max-microamp = <1250000>;
  157. flash-max-timeout-us = <1000000>;
  158. };
  159. };
  160. };