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