as3722.txt 6.5 KB

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