1d913a03bSSebastian Reichel# SPDX-License-Identifier: GPL-2.0 2d913a03bSSebastian Reichel%YAML 1.2 3d913a03bSSebastian Reichel--- 41ea78ec5SKrzysztof Kozlowski$id: http://devicetree.org/schemas/power/supply/lltc,ltc294x.yaml# 51ea78ec5SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 6d913a03bSSebastian Reichel 79d69d47fSKrzysztof Kozlowskititle: LTC2941, LTC2942, LTC2943 and LTC2944 battery fuel gauges 8d913a03bSSebastian Reichel 9d913a03bSSebastian Reicheldescription: | 10d913a03bSSebastian Reichel All chips measure battery capacity. 11d913a03bSSebastian Reichel The LTC2942 is pin compatible with the LTC2941, it adds voltage and 12d913a03bSSebastian Reichel temperature monitoring, and is runtime detected. LTC2943 and LTC2944 13d913a03bSSebastian Reichel are software compatible, uses a slightly different conversion formula 14d913a03bSSebastian Reichel for the charge counter and adds voltage, current and temperature monitoring. 15d913a03bSSebastian Reichel 16d913a03bSSebastian Reichelmaintainers: 17d913a03bSSebastian Reichel - Sebastian Reichel <sre@kernel.org> 18d913a03bSSebastian Reichel 19d913a03bSSebastian ReichelallOf: 20d913a03bSSebastian Reichel - $ref: power-supply.yaml# 21d913a03bSSebastian Reichel 22d913a03bSSebastian Reichelproperties: 23d913a03bSSebastian Reichel compatible: 24d913a03bSSebastian Reichel enum: 25d913a03bSSebastian Reichel - lltc,ltc2941 26d913a03bSSebastian Reichel - lltc,ltc2942 27d913a03bSSebastian Reichel - lltc,ltc2943 28d913a03bSSebastian Reichel - lltc,ltc2944 29d913a03bSSebastian Reichel 30d913a03bSSebastian Reichel reg: 31d913a03bSSebastian Reichel maxItems: 1 32d913a03bSSebastian Reichel 33d913a03bSSebastian Reichel lltc,resistor-sense: 34d913a03bSSebastian Reichel $ref: /schemas/types.yaml#/definitions/int32 35d913a03bSSebastian Reichel description: | 36d913a03bSSebastian Reichel Sense resistor value in milli-ohms. 37d913a03bSSebastian Reichel Can be negative value when the battery has been connected to the wrong end of the resistor. 38d913a03bSSebastian Reichel 39d913a03bSSebastian Reichel lltc,prescaler-exponent: 40d913a03bSSebastian Reichel $ref: /schemas/types.yaml#/definitions/uint32 41d913a03bSSebastian Reichel description: | 42d913a03bSSebastian Reichel The prescaler exponent as explained in the datasheet. 43d913a03bSSebastian Reichel This determines the range and accuracy of the gauge. 44d913a03bSSebastian Reichel The value is programmed into the chip only if it differs from the current setting. 45d913a03bSSebastian Reichel The setting is lost when the battery is disconnected. 46d913a03bSSebastian Reichel 47d913a03bSSebastian Reichelrequired: 48d913a03bSSebastian Reichel - compatible 49d913a03bSSebastian Reichel - reg 50d913a03bSSebastian Reichel - lltc,resistor-sense 51d913a03bSSebastian Reichel - lltc,prescaler-exponent 52d913a03bSSebastian Reichel 53d913a03bSSebastian ReicheladditionalProperties: false 54d913a03bSSebastian Reichel 55d913a03bSSebastian Reichelexamples: 56d913a03bSSebastian Reichel - | 57*20a72af1SRob Herring i2c { 58d913a03bSSebastian Reichel #address-cells = <1>; 59d913a03bSSebastian Reichel #size-cells = <0>; 60d913a03bSSebastian Reichel battery@64 { 61d913a03bSSebastian Reichel compatible = "lltc,ltc2943"; 62d913a03bSSebastian Reichel reg = <0x64>; 63d913a03bSSebastian Reichel lltc,resistor-sense = <15>; 64d913a03bSSebastian Reichel lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */ 65d913a03bSSebastian Reichel }; 66d913a03bSSebastian Reichel }; 67