12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 22eb4d8dcSEmmanuel Vadot%YAML 1.2 32eb4d8dcSEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/lltc,ltc294x.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 62eb4d8dcSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: LTC2941, LTC2942, LTC2943 and LTC2944 battery fuel gauges 82eb4d8dcSEmmanuel Vadot 92eb4d8dcSEmmanuel Vadotdescription: | 102eb4d8dcSEmmanuel Vadot All chips measure battery capacity. 112eb4d8dcSEmmanuel Vadot The LTC2942 is pin compatible with the LTC2941, it adds voltage and 122eb4d8dcSEmmanuel Vadot temperature monitoring, and is runtime detected. LTC2943 and LTC2944 132eb4d8dcSEmmanuel Vadot are software compatible, uses a slightly different conversion formula 142eb4d8dcSEmmanuel Vadot for the charge counter and adds voltage, current and temperature monitoring. 152eb4d8dcSEmmanuel Vadot 162eb4d8dcSEmmanuel Vadotmaintainers: 172eb4d8dcSEmmanuel Vadot - Sebastian Reichel <sre@kernel.org> 182eb4d8dcSEmmanuel Vadot 192eb4d8dcSEmmanuel VadotallOf: 202eb4d8dcSEmmanuel Vadot - $ref: power-supply.yaml# 212eb4d8dcSEmmanuel Vadot 222eb4d8dcSEmmanuel Vadotproperties: 232eb4d8dcSEmmanuel Vadot compatible: 242eb4d8dcSEmmanuel Vadot enum: 252eb4d8dcSEmmanuel Vadot - lltc,ltc2941 262eb4d8dcSEmmanuel Vadot - lltc,ltc2942 272eb4d8dcSEmmanuel Vadot - lltc,ltc2943 282eb4d8dcSEmmanuel Vadot - lltc,ltc2944 292eb4d8dcSEmmanuel Vadot 302eb4d8dcSEmmanuel Vadot reg: 312eb4d8dcSEmmanuel Vadot maxItems: 1 322eb4d8dcSEmmanuel Vadot 332eb4d8dcSEmmanuel Vadot lltc,resistor-sense: 342eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/int32 352eb4d8dcSEmmanuel Vadot description: | 362eb4d8dcSEmmanuel Vadot Sense resistor value in milli-ohms. 372eb4d8dcSEmmanuel Vadot Can be negative value when the battery has been connected to the wrong end of the resistor. 382eb4d8dcSEmmanuel Vadot 392eb4d8dcSEmmanuel Vadot lltc,prescaler-exponent: 402eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 412eb4d8dcSEmmanuel Vadot description: | 422eb4d8dcSEmmanuel Vadot The prescaler exponent as explained in the datasheet. 432eb4d8dcSEmmanuel Vadot This determines the range and accuracy of the gauge. 442eb4d8dcSEmmanuel Vadot The value is programmed into the chip only if it differs from the current setting. 452eb4d8dcSEmmanuel Vadot The setting is lost when the battery is disconnected. 462eb4d8dcSEmmanuel Vadot 472eb4d8dcSEmmanuel Vadotrequired: 482eb4d8dcSEmmanuel Vadot - compatible 492eb4d8dcSEmmanuel Vadot - reg 502eb4d8dcSEmmanuel Vadot - lltc,resistor-sense 512eb4d8dcSEmmanuel Vadot - lltc,prescaler-exponent 522eb4d8dcSEmmanuel Vadot 532eb4d8dcSEmmanuel VadotadditionalProperties: false 542eb4d8dcSEmmanuel Vadot 552eb4d8dcSEmmanuel Vadotexamples: 562eb4d8dcSEmmanuel Vadot - | 57*fac71e4eSEmmanuel Vadot i2c { 582eb4d8dcSEmmanuel Vadot #address-cells = <1>; 592eb4d8dcSEmmanuel Vadot #size-cells = <0>; 602eb4d8dcSEmmanuel Vadot battery@64 { 612eb4d8dcSEmmanuel Vadot compatible = "lltc,ltc2943"; 622eb4d8dcSEmmanuel Vadot reg = <0x64>; 632eb4d8dcSEmmanuel Vadot lltc,resistor-sense = <15>; 642eb4d8dcSEmmanuel Vadot lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */ 652eb4d8dcSEmmanuel Vadot }; 662eb4d8dcSEmmanuel Vadot }; 67