Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / Documentation / devicetree / bindings / power / supply / ingenic,battery.txt
1 * Ingenic JZ47xx battery bindings
2
3 Required properties:
4
5 - compatible: Must be "ingenic,jz4740-battery".
6 - io-channels: phandle and IIO specifier pair to the IIO device.
7   Format described in iio-bindings.txt.
8 - monitored-battery: phandle to a "simple-battery" compatible node.
9
10 The "monitored-battery" property must be a phandle to a node using the format
11 described in battery.txt, with the following properties being required:
12
13 - voltage-min-design-microvolt: Drained battery voltage.
14 - voltage-max-design-microvolt: Fully charged battery voltage.
15
16 Example:
17
18 #include <dt-bindings/iio/adc/ingenic,adc.h>
19
20 simple_battery: battery {
21         compatible = "simple-battery";
22         voltage-min-design-microvolt = <3600000>;
23         voltage-max-design-microvolt = <4200000>;
24 };
25
26 ingenic_battery {
27         compatible = "ingenic,jz4740-battery";
28         io-channels = <&adc INGENIC_ADC_BATTERY>;
29         io-channel-names = "battery";
30         monitored-battery = <&simple_battery>;
31 };