xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/max17040_battery.txt (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1max17040_battery
2~~~~~~~~~~~~~~~~
3
4Required properties :
5 - compatible : "maxim,max17040", "maxim,max17041", "maxim,max17043",
6		"maxim,max17044", "maxim,max17048", "maxim,max17049",
7		"maxim,max17058", "maxim,max17059" or "maxim,max77836-battery"
8 - reg: i2c slave address
9
10Optional properties :
11- maxim,alert-low-soc-level :	The alert threshold that sets the state of
12				charge level (%) where an interrupt is
13				generated. Can be configured from 1 up to 32
14				(%). If skipped the power up default value of
15				4 (%) will be used.
16- maxim,double-soc : 		Certain devices return double the capacity.
17				Specify this boolean property to divide the
18				reported value in 2 and thus normalize it.
19				SOC == State of Charge == Capacity.
20- maxim,rcomp :			A value to compensate readings for various
21				battery chemistries and operating temperatures.
22				max17040,41 have 2 byte rcomp, default to
23				0x97 0x00. All other devices have one byte
24				rcomp, default to 0x97.
25- interrupts : 			Interrupt line see Documentation/devicetree/
26				bindings/interrupt-controller/interrupts.txt
27- wakeup-source :		This device has wakeup capabilities. Use this
28				property to use alert low SOC level interrupt
29				as wake up source.
30
31Optional properties support interrupt functionality for alert low state of
32charge level, present in some ICs in the same family, and should be used with
33compatible "maxim,max77836-battery".
34
35Example:
36
37	battery-fuel-gauge@36 {
38		compatible = "maxim,max77836-battery";
39		reg = <0x36>;
40		maxim,alert-low-soc-level = <10>;
41		interrupt-parent = <&gpio7>;
42		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
43		wakeup-source;
44	};
45
46	battery-fuel-gauge@36 {
47		compatible = "maxim,max17048";
48		reg = <0x36>;
49		maxim,rcomp = /bits/ 8 <0x56>;
50		maxim,alert-low-soc-level = <10>;
51		maxim,double-soc;
52	};
53