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