max77620.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. MAX77620 Power management IC from Maxim Semiconductor.
  2. Required properties:
  3. -------------------
  4. - compatible: Must be one of
  5. "maxim,max77620"
  6. "maxim,max20024".
  7. - reg: I2C device address.
  8. Optional properties:
  9. -------------------
  10. - interrupts: The interrupt on the parent the controller is
  11. connected to.
  12. - interrupt-controller: Marks the device node as an interrupt controller.
  13. - #interrupt-cells: is <2> and their usage is compliant to the 2 cells
  14. variant of <../interrupt-controller/interrupts.txt>
  15. IRQ numbers for different interrupt source of MAX77620
  16. are defined at dt-bindings/mfd/max77620.h.
  17. Optional subnodes and their properties:
  18. =======================================
  19. Flexible power sequence configurations:
  20. --------------------------------------
  21. The Flexible Power Sequencer (FPS) allows each regulator to power up under
  22. hardware or software control. Additionally, each regulator can power on
  23. independently or among a group of other regulators with an adjustable power-up
  24. and power-down delays (sequencing). GPIO1, GPIO2, and GPIO3 can be programmed
  25. to be part of a sequence allowing external regulators to be sequenced along
  26. with internal regulators. 32KHz clock can be programmed to be part of a
  27. sequence.
  28. The flexible sequencing structure consists of two hardware enable inputs
  29. (EN0, EN1), and 3 master sequencing timers called FPS0, FPS1 and FPS2.
  30. Each master sequencing timer is programmable through its configuration
  31. register to have a hardware enable source (EN1 or EN2) or a software enable
  32. source (SW). When enabled/disabled, the master sequencing timer generates
  33. eight sequencing events on different time periods called slots. The time
  34. period between each event is programmable within the configuration register.
  35. Each regulator, GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power
  36. sequence slave register which allows its enable source to be specified as
  37. a flexible power sequencer timer or a software bit. When a FPS source of
  38. regulators, GPIOs and clocks specifies the enable source to be a flexible
  39. power sequencer, the power up and power down delays can be specified in
  40. the regulators, GPIOs and clocks flexible power sequencer configuration
  41. registers.
  42. When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz
  43. clock are set into following state at the sequencing event that
  44. corresponds to its flexible sequencer configuration register.
  45. Sleep state: In this state, regulators, GPIOs
  46. and 32KHz clock get disabled at
  47. the sequencing event.
  48. Global Low Power Mode (GLPM): In this state, regulators are set in
  49. low power mode at the sequencing event.
  50. The configuration parameters of FPS is provided through sub-node "fps"
  51. and their child for FPS specific. The child node name for FPS are "fps0",
  52. "fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.
  53. The FPS configurations like FPS source, power up and power down slots for
  54. regulators, GPIOs and 32kHz clocks are provided in their respective
  55. configuration nodes which is explained in respective sub-system DT
  56. binding document.
  57. There is need for different FPS configuration parameters based on system
  58. state like when system state changed from active to suspend or active to
  59. power off (shutdown).
  60. Optional properties:
  61. -------------------
  62. -maxim,fps-event-source: u32, FPS event source like external
  63. hardware input to PMIC i.e. EN0, EN1 or
  64. software (SW).
  65. The macros are defined on
  66. dt-bindings/mfd/max77620.h
  67. for different control source.
  68. - MAX77620_FPS_EVENT_SRC_EN0
  69. for hardware input pin EN0.
  70. - MAX77620_FPS_EVENT_SRC_EN1
  71. for hardware input pin EN1.
  72. - MAX77620_FPS_EVENT_SRC_SW
  73. for software control.
  74. -maxim,shutdown-fps-time-period-us: u32, FPS time period in microseconds
  75. when system enters in to shutdown
  76. state.
  77. -maxim,suspend-fps-time-period-us: u32, FPS time period in microseconds
  78. when system enters in to suspend state.
  79. -maxim,device-state-on-disabled-event: u32, describe the PMIC state when FPS
  80. event cleared (set to LOW) whether it
  81. should go to sleep state or low-power
  82. state. Following are valid values:
  83. - MAX77620_FPS_INACTIVE_STATE_SLEEP
  84. to set the PMIC state to sleep.
  85. - MAX77620_FPS_INACTIVE_STATE_LOW_POWER
  86. to set the PMIC state to low
  87. power.
  88. Absence of this property or other value
  89. will not change device state when FPS
  90. event get cleared.
  91. Here supported time periods by device in microseconds are as follows:
  92. MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
  93. MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
  94. -maxim,power-ok-control: configure map power ok bit
  95. 1: Enables POK(Power OK) to control nRST_IO and GPIO1
  96. POK function.
  97. 0: Disables POK control.
  98. if property missing, do not configure MPOK bit.
  99. If POK mapping is enabled for GPIO1/nRST_IO then,
  100. GPIO1/nRST_IO pins are HIGH only if all rails
  101. that have POK control enabled are HIGH.
  102. If any of the rails goes down(which are enabled for POK
  103. control) then, GPIO1/nRST_IO goes LOW.
  104. this property is valid for max20024 only.
  105. For DT binding details of different sub modules like GPIO, pincontrol,
  106. regulator, power, please refer respective device-tree binding document
  107. under their respective sub-system directories.
  108. Example:
  109. --------
  110. #include <dt-bindings/mfd/max77620.h>
  111. max77620@3c {
  112. compatible = "maxim,max77620";
  113. reg = <0x3c>;
  114. interrupt-parent = <&intc>;
  115. interrupts = <0 86 IRQ_TYPE_NONE>;
  116. interrupt-controller;
  117. #interrupt-cells = <2>;
  118. fps {
  119. fps0 {
  120. maxim,shutdown-fps-time-period-us = <1280>;
  121. maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
  122. };
  123. fps1 {
  124. maxim,shutdown-fps-time-period-us = <1280>;
  125. maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
  126. };
  127. fps2 {
  128. maxim,shutdown-fps-time-period-us = <1280>;
  129. maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
  130. };
  131. };
  132. };