xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/max77693.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunMaxim MAX77693 multi-function device
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunMAX77693 is a Multifunction device with the following submodules:
4*4882a593Smuzhiyun- PMIC,
5*4882a593Smuzhiyun- CHARGER,
6*4882a593Smuzhiyun- LED,
7*4882a593Smuzhiyun- MUIC,
8*4882a593Smuzhiyun- HAPTIC
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunIt is interfaced to host controller using i2c.
11*4882a593SmuzhiyunThis document describes the bindings for the mfd device.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunRequired properties:
14*4882a593Smuzhiyun- compatible : Must be "maxim,max77693".
15*4882a593Smuzhiyun- reg : Specifies the i2c slave address of PMIC block.
16*4882a593Smuzhiyun- interrupts : This i2c device has an IRQ line connected to the main SoC.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunOptional properties:
19*4882a593Smuzhiyun- regulators : The regulators of max77693 have to be instantiated under subnode
20*4882a593Smuzhiyun  named "regulators" using the following format.
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun	regulators {
23*4882a593Smuzhiyun		regulator-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
24*4882a593Smuzhiyun		standard regulator constraints[*].
25*4882a593Smuzhiyun	};
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun- haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
30*4882a593Smuzhiyun  users with tactile feedback. PWM period and duty-cycle are varied in
31*4882a593Smuzhiyun  order to provide the appropriate level of feedback.
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun Required properties:
34*4882a593Smuzhiyun	- compatible : Must be "maxim,max77693-haptic"
35*4882a593Smuzhiyun	- haptic-supply : power supply for the haptic motor
36*4882a593Smuzhiyun	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
37*4882a593Smuzhiyun	- pwms : phandle to the physical PWM(Pulse Width Modulation) device.
38*4882a593Smuzhiyun	 PWM properties should be named "pwms". And number of cell is different
39*4882a593Smuzhiyun	 for each pwm device.
40*4882a593Smuzhiyun	 To get more information, please refer to documentation.
41*4882a593Smuzhiyun	[*] refer Documentation/devicetree/bindings/pwm/pwm.txt
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun- charger : Node configuring the charger driver.
44*4882a593Smuzhiyun  If present, required properties:
45*4882a593Smuzhiyun  - compatible : Must be "maxim,max77693-charger".
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun  Optional properties (if not set, defaults will be used):
48*4882a593Smuzhiyun  - maxim,constant-microvolt : Battery constant voltage in uV. The charger
49*4882a593Smuzhiyun    will operate in fast charge constant current mode till battery voltage
50*4882a593Smuzhiyun    reaches this level. Then the charger will switch to fast charge constant
51*4882a593Smuzhiyun    voltage mode. Also vsys (system voltage) will be set to this value when
52*4882a593Smuzhiyun    DC power is supplied but charger is not enabled.
53*4882a593Smuzhiyun    Valid values: 3650000 - 4400000, step by 25000 (rounded down)
54*4882a593Smuzhiyun    Default: 4200000
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun  - maxim,min-system-microvolt : Minimal system voltage in uV.
57*4882a593Smuzhiyun    Valid values: 3000000 - 3700000, step by 100000 (rounded down)
58*4882a593Smuzhiyun    Default: 3600000
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun  - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
61*4882a593Smuzhiyun    high temperature charging mode. If die temperature exceeds this value
62*4882a593Smuzhiyun    the charging current will be reduced by 105 mA/Celsius.
63*4882a593Smuzhiyun    Valid values: 70, 85, 100, 115
64*4882a593Smuzhiyun    Default: 100
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun  - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
67*4882a593Smuzhiyun    in uA (current from battery to system).
68*4882a593Smuzhiyun    Valid values: 2000000 - 3500000, step by 250000 (rounded down)
69*4882a593Smuzhiyun    Default: 3500000
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun  - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
72*4882a593Smuzhiyun    triggering input voltage regulation loop. If input voltage decreases
73*4882a593Smuzhiyun    below this value, the input current will be reduced to reach the
74*4882a593Smuzhiyun    threshold voltage.
75*4882a593Smuzhiyun    Valid values: 4300000, 4700000, 4800000, 4900000
76*4882a593Smuzhiyun    Default: 4300000
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun- led : the LED submodule device node
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunThere are two LED outputs available - FLED1 and FLED2. Each of them can
81*4882a593Smuzhiyuncontrol a separate LED or they can be connected together to double
82*4882a593Smuzhiyunthe maximum current for a single connected LED. One LED is represented
83*4882a593Smuzhiyunby one child node.
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunRequired properties:
86*4882a593Smuzhiyun- compatible : Must be "maxim,max77693-led".
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunOptional properties:
89*4882a593Smuzhiyun- maxim,boost-mode :
90*4882a593Smuzhiyun	In boost mode the device can produce up to 1.2A of total current
91*4882a593Smuzhiyun	on both outputs. The maximum current on each output is reduced
92*4882a593Smuzhiyun	to 625mA then. If not enabled explicitly, boost setting defaults to
93*4882a593Smuzhiyun	LEDS_BOOST_FIXED in case both current sources are used.
94*4882a593Smuzhiyun	Possible values:
95*4882a593Smuzhiyun		LEDS_BOOST_OFF (0) - no boost,
96*4882a593Smuzhiyun		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
97*4882a593Smuzhiyun		LEDS_BOOST_FIXED (2) - fixed mode.
98*4882a593Smuzhiyun- maxim,boost-mvout : Output voltage of the boost module in millivolts.
99*4882a593Smuzhiyun	Valid values: 3300 - 5500, step by 25 (rounded down)
100*4882a593Smuzhiyun	Default: 3300
101*4882a593Smuzhiyun- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
102*4882a593Smuzhiyun	if chip estimates that system voltage could drop below this level due
103*4882a593Smuzhiyun	to flash power consumption.
104*4882a593Smuzhiyun	Valid values: 2400 - 3400, step by 33 (rounded down)
105*4882a593Smuzhiyun	Default: 2400
106*4882a593Smuzhiyun
107*4882a593SmuzhiyunRequired properties for the LED child node:
108*4882a593Smuzhiyun- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
109*4882a593Smuzhiyun		device current output identifiers: 0 - FLED1, 1 - FLED2
110*4882a593Smuzhiyun- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
111*4882a593Smuzhiyun	Valid values for a LED connected to one FLED output:
112*4882a593Smuzhiyun		15625 - 250000, step by 15625 (rounded down)
113*4882a593Smuzhiyun	Valid values for a LED connected to both FLED outputs:
114*4882a593Smuzhiyun		15625 - 500000, step by 15625 (rounded down)
115*4882a593Smuzhiyun- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
116*4882a593Smuzhiyun	Valid values for a single LED connected to one FLED output
117*4882a593Smuzhiyun	(boost mode must be turned off):
118*4882a593Smuzhiyun		15625 - 1000000, step by 15625 (rounded down)
119*4882a593Smuzhiyun	Valid values for a single LED connected to both FLED outputs:
120*4882a593Smuzhiyun		15625 - 1250000, step by 15625 (rounded down)
121*4882a593Smuzhiyun	Valid values for two LEDs case:
122*4882a593Smuzhiyun		15625 - 625000, step by 15625 (rounded down)
123*4882a593Smuzhiyun- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
124*4882a593Smuzhiyun	Valid values: 62500 - 1000000, step by 62500 (rounded down)
125*4882a593Smuzhiyun
126*4882a593SmuzhiyunOptional properties for the LED child node:
127*4882a593Smuzhiyun- label : see Documentation/devicetree/bindings/leds/common.txt
128*4882a593Smuzhiyun
129*4882a593SmuzhiyunOptional nodes:
130*4882a593Smuzhiyun- max77693-muic :
131*4882a593Smuzhiyun	Node used only by extcon consumers.
132*4882a593Smuzhiyun	Required properties:
133*4882a593Smuzhiyun		- compatible : "maxim,max77693-muic"
134*4882a593Smuzhiyun
135*4882a593SmuzhiyunExample:
136*4882a593Smuzhiyun#include <dt-bindings/leds/common.h>
137*4882a593Smuzhiyun
138*4882a593Smuzhiyun	max77693@66 {
139*4882a593Smuzhiyun		compatible = "maxim,max77693";
140*4882a593Smuzhiyun		reg = <0x66>;
141*4882a593Smuzhiyun		interrupt-parent = <&gpx1>;
142*4882a593Smuzhiyun		interrupts = <5 2>;
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun		regulators {
145*4882a593Smuzhiyun			esafeout@1 {
146*4882a593Smuzhiyun				regulator-compatible = "ESAFEOUT1";
147*4882a593Smuzhiyun				regulator-name = "ESAFEOUT1";
148*4882a593Smuzhiyun				regulator-boot-on;
149*4882a593Smuzhiyun			};
150*4882a593Smuzhiyun			esafeout@2 {
151*4882a593Smuzhiyun				regulator-compatible = "ESAFEOUT2";
152*4882a593Smuzhiyun				regulator-name = "ESAFEOUT2";
153*4882a593Smuzhiyun				};
154*4882a593Smuzhiyun			charger@0 {
155*4882a593Smuzhiyun				regulator-compatible = "CHARGER";
156*4882a593Smuzhiyun				regulator-name = "CHARGER";
157*4882a593Smuzhiyun				regulator-min-microamp = <60000>;
158*4882a593Smuzhiyun				regulator-max-microamp = <2580000>;
159*4882a593Smuzhiyun					regulator-boot-on;
160*4882a593Smuzhiyun			};
161*4882a593Smuzhiyun		};
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun		haptic {
164*4882a593Smuzhiyun			compatible = "maxim,max77693-haptic";
165*4882a593Smuzhiyun			haptic-supply = <&haptic_supply>;
166*4882a593Smuzhiyun			pwms = <&pwm 0 40000 0>;
167*4882a593Smuzhiyun			pwm-names = "haptic";
168*4882a593Smuzhiyun		};
169*4882a593Smuzhiyun
170*4882a593Smuzhiyun		charger {
171*4882a593Smuzhiyun			compatible = "maxim,max77693-charger";
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun			maxim,constant-microvolt = <4200000>;
174*4882a593Smuzhiyun			maxim,min-system-microvolt = <3600000>;
175*4882a593Smuzhiyun			maxim,thermal-regulation-celsius = <75>;
176*4882a593Smuzhiyun			maxim,battery-overcurrent-microamp = <3000000>;
177*4882a593Smuzhiyun			maxim,charge-input-threshold-microvolt = <4300000>;
178*4882a593Smuzhiyun		};
179*4882a593Smuzhiyun
180*4882a593Smuzhiyun		led {
181*4882a593Smuzhiyun			compatible = "maxim,max77693-led";
182*4882a593Smuzhiyun			maxim,boost-mode = <LEDS_BOOST_FIXED>;
183*4882a593Smuzhiyun			maxim,boost-mvout = <5000>;
184*4882a593Smuzhiyun			maxim,mvsys-min = <2400>;
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun			camera_flash: flash-led {
187*4882a593Smuzhiyun				label = "max77693-flash";
188*4882a593Smuzhiyun				led-sources = <0>, <1>;
189*4882a593Smuzhiyun				led-max-microamp = <500000>;
190*4882a593Smuzhiyun				flash-max-microamp = <1250000>;
191*4882a593Smuzhiyun				flash-max-timeout-us = <1000000>;
192*4882a593Smuzhiyun			};
193*4882a593Smuzhiyun		};
194*4882a593Smuzhiyun	};
195