as3722.txt 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. * ams AS3722 Power management IC.
  2. Required properties:
  3. -------------------
  4. - compatible: Must be "ams,as3722".
  5. - reg: I2C device address.
  6. - interrupt-controller: AS3722 has internal interrupt controller which takes the
  7. interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
  8. as external input.
  9. - #interrupt-cells: Should be set to 2 for IRQ number and flags.
  10. The first cell is the IRQ number. IRQ numbers for different interrupt source
  11. of AS3722 are defined at dt-bindings/mfd/as3722.h
  12. The second cell is the flags, encoded as the trigger masks from binding document
  13. interrupts.txt, using dt-bindings/irq.
  14. Optional properties:
  15. --------------------
  16. - ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on
  17. interrupt pin. Missing this will disable internal pullup on INT pin.
  18. - ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on
  19. i2c scl/sda pins. Missing this will disable internal pullup on i2c
  20. scl/sda lines.
  21. - ams,enable-ac-ok-power-on: Boolean property, to enable exit out of power off
  22. mode with AC_OK pin (pin enabled in power off mode).
  23. Optional submodule and their properties:
  24. =======================================
  25. Pinmux and GPIO:
  26. ===============
  27. Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
  28. functions.
  29. Please refer to pinctrl-bindings.txt in this directory for details of the
  30. common pinctrl bindings used by client devices, including the meaning of the
  31. phrase "pin configuration node".
  32. Following are properties which is needed if GPIO and pinmux functionality
  33. is required:
  34. Required properties:
  35. -------------------
  36. - gpio-controller: Marks the device node as a GPIO controller.
  37. - #gpio-cells: Number of GPIO cells. Refer to binding document
  38. gpio/gpio.txt
  39. Optional properties:
  40. --------------------
  41. Following properties are require if pin control setting is required
  42. at boot.
  43. - pinctrl-names: A pinctrl state named "default" be defined, using the
  44. bindings in pinctrl/pinctrl-bindings.txt.
  45. - pinctrl[0...n]: Properties to contain the phandle that refer to
  46. different nodes of pin control settings. These nodes represents
  47. the pin control setting of state 0 to state n. Each of these
  48. nodes contains different subnodes to represents some desired
  49. configuration for a list of pins. This configuration can
  50. include the mux function to select on those pin(s), and
  51. various pin configuration parameters, such as pull-up,
  52. open drain.
  53. Each subnode have following properties:
  54. Required properties:
  55. - pins: List of pins. Valid values of pins properties are:
  56. gpio0, gpio1, gpio2, gpio3, gpio4, gpio5,
  57. gpio6, gpio7
  58. Optional properties:
  59. function, bias-disable, bias-pull-up, bias-pull-down,
  60. bias-high-impedance, drive-open-drain.
  61. Valid values for function properties are:
  62. gpio, interrupt-out, gpio-in-interrupt,
  63. vsup-vbat-low-undebounce-out,
  64. vsup-vbat-low-debounce-out,
  65. voltage-in-standby, oc-pg-sd0, oc-pg-sd6,
  66. powergood-out, pwm-in, pwm-out, clk32k-out,
  67. watchdog-in, soft-reset-in
  68. Regulators:
  69. ===========
  70. Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
  71. functionality is needed.
  72. Following are properties of regulator subnode.
  73. Optional properties:
  74. -------------------
  75. The input supply of regulators are the optional properties on the
  76. regulator node. The input supply of these regulators are provided
  77. through following properties:
  78. vsup-sd2-supply: Input supply for SD2.
  79. vsup-sd3-supply: Input supply for SD3.
  80. vsup-sd4-supply: Input supply for SD4.
  81. vsup-sd5-supply: Input supply for SD5.
  82. vin-ldo0-supply: Input supply for LDO0.
  83. vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
  84. vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
  85. vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
  86. vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
  87. vin-ldo11-supply: Input supply for LDO11.
  88. Optional sub nodes for regulators:
  89. ---------------------------------
  90. The subnodes name is the name of regulator and it must be one of:
  91. sd[0-6], ldo[0-7], ldo[9-11]
  92. Each sub-node should contain the constraints and initialization
  93. information for that regulator. See regulator.txt for a description
  94. of standard properties for these sub-nodes.
  95. Additional optional custom properties are listed below.
  96. ams,ext-control: External control of the rail. The option of
  97. this properties will tell which external input is
  98. controlling this rail. Valid values are 0, 1, 2 ad 3.
  99. 0: There is no external control of this rail.
  100. 1: Rail is controlled by ENABLE1 input pin.
  101. 2: Rail is controlled by ENABLE2 input pin.
  102. 3: Rail is controlled by ENABLE3 input pin.
  103. Missing this property on DT will be assume as no
  104. external control. The external control pin macros
  105. are defined @dt-bindings/mfd/as3722.h
  106. ams,enable-tracking: Enable tracking with SD1, only supported
  107. by LDO3.
  108. Power-off:
  109. =========
  110. AS3722 supports the system power off by turning off all its rails.
  111. The device node should have the following properties to enable this
  112. functionality
  113. ams,system-power-controller: Boolean, to enable the power off functionality
  114. through this device.
  115. Example:
  116. --------
  117. #include <dt-bindings/mfd/as3722.h>
  118. ...
  119. ams3722 {
  120. compatible = "ams,as3722";
  121. reg = <0x48>;
  122. ams,system-power-controller;
  123. interrupt-parent = <&intc>;
  124. interrupt-controller;
  125. #interrupt-cells = <2>;
  126. gpio-controller;
  127. #gpio-cells = <2>;
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&as3722_default>;
  130. as3722_default: pinmux {
  131. gpio0 {
  132. pins = "gpio0";
  133. function = "gpio";
  134. bias-pull-down;
  135. };
  136. gpio1_2_4_7 {
  137. pins = "gpio1", "gpio2", "gpio4", "gpio7";
  138. function = "gpio";
  139. bias-pull-up;
  140. };
  141. gpio5 {
  142. pins = "gpio5";
  143. function = "clk32k_out";
  144. };
  145. }
  146. regulators {
  147. vsup-sd2-supply = <...>;
  148. ...
  149. sd0 {
  150. regulator-name = "vdd_cpu";
  151. regulator-min-microvolt = <700000>;
  152. regulator-max-microvolt = <1400000>;
  153. regulator-always-on;
  154. ams,ext-control = <2>;
  155. };
  156. sd1 {
  157. regulator-name = "vdd_core";
  158. regulator-min-microvolt = <700000>;
  159. regulator-max-microvolt = <1400000>;
  160. regulator-always-on;
  161. ams,ext-control = <1>;
  162. };
  163. sd2 {
  164. regulator-name = "vddio_ddr";
  165. regulator-min-microvolt = <1350000>;
  166. regulator-max-microvolt = <1350000>;
  167. regulator-always-on;
  168. };
  169. sd4 {
  170. regulator-name = "avdd-hdmi-pex";
  171. regulator-min-microvolt = <1050000>;
  172. regulator-max-microvolt = <1050000>;
  173. regulator-always-on;
  174. };
  175. sd5 {
  176. regulator-name = "vdd-1v8";
  177. regulator-min-microvolt = <1800000>;
  178. regulator-max-microvolt = <1800000>;
  179. regulator-always-on;
  180. };
  181. ....
  182. };
  183. };