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