summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/power
diff options
context:
space:
mode:
authorArtur Rojek <contact@artur-rojek.eu>2019-03-23 18:28:08 +0100
committerSebastian Reichel <sre@kernel.org>2019-04-18 21:34:56 +0200
commitbbdfeea2c6da271813a29344c8515220d0413daf (patch)
treeb4c22c86bad08d27b5fcc46d43268ff3f5d9c907 /Documentation/devicetree/bindings/power
parentMerge 'ib-jz47xx-battery-prereq' into psy-next (diff)
downloadlinux-bbdfeea2c6da271813a29344c8515220d0413daf.tar.xz
linux-bbdfeea2c6da271813a29344c8515220d0413daf.zip
dt-bindings: power: supply: Add docs for Ingenic JZ47xx SoCs battery.
Add documentation for the ingenic-battery driver, used on JZ47xx SoCs. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'Documentation/devicetree/bindings/power')
-rw-r--r--Documentation/devicetree/bindings/power/supply/ingenic,battery.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt b/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt
new file mode 100644
index 000000000000..66430bf73815
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt
@@ -0,0 +1,31 @@
+* Ingenic JZ47xx battery bindings
+
+Required properties:
+
+- compatible: Must be "ingenic,jz4740-battery".
+- io-channels: phandle and IIO specifier pair to the IIO device.
+ Format described in iio-bindings.txt.
+- monitored-battery: phandle to a "simple-battery" compatible node.
+
+The "monitored-battery" property must be a phandle to a node using the format
+described in battery.txt, with the following properties being required:
+
+- voltage-min-design-microvolt: Drained battery voltage.
+- voltage-max-design-microvolt: Fully charged battery voltage.
+
+Example:
+
+#include <dt-bindings/iio/adc/ingenic,adc.h>
+
+simple_battery: battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3600000>;
+ voltage-max-design-microvolt = <4200000>;
+};
+
+ingenic_battery {
+ compatible = "ingenic,jz4740-battery";
+ io-channels = <&adc INGENIC_ADC_BATTERY>;
+ io-channel-names = "battery";
+ monitored-battery = <&simple_battery>;
+};