blob: 4f64b2a73169646fae8bafb57dad29dc791a6167 [file] [log] [blame]
Kyle Swenson8d8f6542021-03-15 11:02:55 -06001* 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
16Optional 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
24Optional 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
123Power-off:
124=========
125AS3722 supports the system power off by turning off all its rail. This
126is provided through pm_power_off.
127The device node should have the following properties to enable this
128functionality
129ams,system-power-controller: Boolean, to enable the power off functionality
130 through this device.
131
132Example:
133--------
134#include <dt-bindings/mfd/as3722.h>
135...
136ams3722 {
137 compatible = "ams,as3722";
138 reg = <0x48>;
139
140 ams,system-power-controller;
141
142 interrupt-parent = <&intc>;
143 interrupt-controller;
144 #interrupt-cells = <2>;
145
146 gpio-controller;
147 #gpio-cells = <2>;
148
149 pinctrl-names = "default";
150 pinctrl-0 = <&as3722_default>;
151
152 as3722_default: pinmux {
153 gpio0 {
154 pins = "gpio0";
155 function = "gpio";
156 bias-pull-down;
157 };
158
159 gpio1_2_4_7 {
160 pins = "gpio1", "gpio2", "gpio4", "gpio7";
161 function = "gpio";
162 bias-pull-up;
163 };
164
165 gpio5 {
166 pins = "gpio5";
167 function = "clk32k_out";
168 };
169 }
170
171 regulators {
172 vsup-sd2-supply = <...>;
173 ...
174
175 sd0 {
176 regulator-name = "vdd_cpu";
177 regulator-min-microvolt = <700000>;
178 regulator-max-microvolt = <1400000>;
179 regulator-always-on;
180 ams,ext-control = <2>;
181 };
182
183 sd1 {
184 regulator-name = "vdd_core";
185 regulator-min-microvolt = <700000>;
186 regulator-max-microvolt = <1400000>;
187 regulator-always-on;
188 ams,ext-control = <1>;
189 };
190
191 sd2 {
192 regulator-name = "vddio_ddr";
193 regulator-min-microvolt = <1350000>;
194 regulator-max-microvolt = <1350000>;
195 regulator-always-on;
196 };
197
198 sd4 {
199 regulator-name = "avdd-hdmi-pex";
200 regulator-min-microvolt = <1050000>;
201 regulator-max-microvolt = <1050000>;
202 regulator-always-on;
203 };
204
205 sd5 {
206 regulator-name = "vdd-1v8";
207 regulator-min-microvolt = <1800000>;
208 regulator-max-microvolt = <1800000>;
209 regulator-always-on;
210 };
211 ....
212 };
213};