Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / power / supply / battery.txt
1 Battery Characteristics
2
3 The devicetree battery node provides static battery characteristics.
4 In smart batteries, these are typically stored in non-volatile memory
5 on a fuel gauge chip. The battery node should be used where there is
6 no appropriate non-volatile memory, or it is unprogrammed/incorrect.
7
8 Upstream dts files should not include battery nodes, unless the battery
9 represented cannot easily be replaced in the system by one of a
10 different type. This prevents unpredictable, potentially harmful,
11 behavior should a replacement that changes the battery type occur
12 without a corresponding update to the dtb.
13
14 Required Properties:
15  - compatible: Must be "simple-battery"
16
17 Optional Properties:
18  - voltage-min-design-microvolt: drained battery voltage
19  - energy-full-design-microwatt-hours: battery design energy
20  - charge-full-design-microamp-hours: battery design capacity
21  - precharge-current-microamp: current for pre-charge phase
22  - charge-term-current-microamp: current for charge termination phase
23  - constant-charge-current-max-microamp: maximum constant input current
24  - constant-charge-voltage-max-microvolt: maximum constant input voltage
25
26 Battery properties are named, where possible, for the corresponding
27 elements in enum power_supply_property, defined in
28 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/power_supply.h
29
30 Batteries must be referenced by chargers and/or fuel-gauges
31 using a phandle. The phandle's property should be named
32 "monitored-battery".
33
34 Example:
35
36         bat: battery {
37                 compatible = "simple-battery";
38                 voltage-min-design-microvolt = <3200000>;
39                 energy-full-design-microwatt-hours = <5290000>;
40                 charge-full-design-microamp-hours = <1430000>;
41                 precharge-current-microamp = <256000>;
42                 charge-term-current-microamp = <128000>;
43                 constant-charge-current-max-microamp = <900000>;
44                 constant-charge-voltage-max-microvolt = <4200000>;
45         };
46
47         charger: charger@11 {
48                 ....
49                 monitored-battery = <&bat>;
50                 ...
51         };
52
53         fuel_gauge: fuel-gauge@22 {
54                 ....
55                 monitored-battery = <&bat>;
56                 ...
57         };