Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601331
| From | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding |
| Date | 2017-03-15 12:50 +0100 |
| Message-ID | <tlfBg-73v-15@gated-at.bofh.it> (permalink) |
| References | <tleOS-6tc-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply.
This patch adds the DT binding documentation for the battery power
supply which gets various data from the PMIC, such as the battery status
(charging, discharging, full, dead), current max limit, current current,
battery capacity (in percentage), voltage max and min limits, current
voltage and battery capacity (in Ah).
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
v4:
- added monitored-battery optional property,
- added example with battery,
v3:
- removed constant charge current property, now should use the WIP
battery framework,
v2:
- changed DT node name from ac_power_supply to ac-power-supply,
- removed io-channels and io-channel-names from DT (the IIO mapping is
done in the IIO ADC driver now),
- added x-powers,constant-charge-current property to set the maximal
default constant current charge of the battery,
.../bindings/power/supply/axp20x_battery.txt | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/axp20x_battery.txt
diff --git a/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt b/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt
new file mode 100644
index 0000000..89cb7a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt
@@ -0,0 +1,30 @@
+AXP20x and AXP22x battery power supply
+
+Required Properties:
+ - compatible, one of:
+ "x-powers,axp209-battery-power-supply"
+ "x-powers,axp221-battery-power-supply"
+
+Optional properties:
+ - monitored-battery, phandle to a fixed battery
+
+This node is a subnode of the axp20x/axp22x PMIC.
+
+The AXP20X and AXP22X can read the battery voltage, charge and discharge
+currents of the battery by reading ADC channels from the AXP20X/AXP22X
+ADC.
+
+Example:
+
+battery: battery {
+ compatible = "fixed-battery";
+ voltage-min-design-microvolt = <3200000>;
+ constant-charge-microamp = <300000>;
+};
+
+&axp209 {
+ battery_power_supply: battery-power-supply {
+ compatible = "x-powers,axp209-battery-power-supply";
+ monitored-battery = <&battery>;
+ }
+};
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 12:00 +0100
[PATCH v4 15/18] ARM: dtsi: axp209: add battery power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 12:10 +0100
[PATCH v4 14/18] mfd: axp20x: add MFD cells for AXP20X and AXP22X battery driver Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 12:30 +0100
[PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 12:50 +0100
Re: [PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding Sebastian Reichel <sre@kernel.org> - 2017-03-15 23:40 +0100
Re: [PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 23:50 +0100
Re: [PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding Sebastian Reichel <sre@kernel.org> - 2017-03-16 00:10 +0100
[PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 13:00 +0100
[PATCH v4 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 13:10 +0100
Re: [PATCH v4 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs Sebastian Reichel <sre@kernel.org> - 2017-03-16 00:40 +0100
Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Lee Jones <lee.jones@linaro.org> - 2017-03-15 13:20 +0100
Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 14:30 +0100
Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Sebastian Reichel <sre@kernel.org> - 2017-03-16 00:00 +0100
Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-20 12:40 +0100
Re: [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Sebastian Reichel <sre@kernel.org> - 2017-03-20 20:40 +0100
[PATCH v4 17/18] ARM: dts: sun8i: sina33: enable battery power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 13:50 +0100
[PATCH v4 18/18] ARM: sun5i: chip: enable battery power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 14:00 +0100
[PATCH v4 16/18] ARM: dtsi: axp22x: add battery power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 14:20 +0100
[PATCH v4 03/18] mfd: axp20x: correct name of temperature data ADC registers Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 15:20 +0100
[PATCH v4 10/18] ARM: sun5i: chip: enable ACIN power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 15:40 +0100
[PATCH v4 09/18] ARM: dts: sun8i: sina33: enable ACIN power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 16:00 +0100
[PATCH v4 01/18] dt-bindings: power: battery: add constant-charge-current property Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 16:00 +0100
[PATCH v4 07/18] ARM: dtsi: axp209: add AC power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 16:30 +0100
[PATCH v4 08/18] ARM: dtsi: axp22x: add AC power supply subnode Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 16:50 +0100
[PATCH v4 06/18] mfd: axp20x: add AC power supply cells for AXP22X PMICs Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 17:10 +0100
[PATCH v4 04/18] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 17:30 +0100
[PATCH v4 05/18] mfd: axp20x: add ADC cells for AXP20X and AXP22X PMICs Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 17:50 +0100
[PATCH v4 02/18] power: supply: power_supply_core: add constant-charge-current optional property Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-03-15 18:10 +0100
Re: [PATCH v4 02/18] power: supply: power_supply_core: add constant-charge-current optional property Sebastian Reichel <sre@kernel.org> - 2017-03-15 23:30 +0100
csiph-web