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