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