Commit 69b569c1 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Alexandre Belloni

dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels

The isl12022 has a built-in support for monitoring the voltage of the
backup battery, and setting bits in the status register when that
voltage drops below two predetermined levels (usually 85% and 75% of
the nominal voltage). However, since it can operate at wide range of
battery voltages (2.5V - 5.5V), one must configure those trip levels
according to which battery is used on a given board.

Add bindings for defining these two trip levels. While the register
and bit names suggest that they should correspond to 85% and 75% of
the nominal battery voltage, the data sheet also says

  There are total of 7 levels that could be selected for the first
  alarm. Any of the of levels could be selected as the first alarm
  with no reference as to nominal Battery voltage level.

Hence this provides the hardware designer the ability to choose values
based on the discharge characteristics of the battery chosen for the
given product, rather than just having one battery-microvolt property
and having the driver choose levels close to 0.85/0.75 times that.
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230615105826.411953-4-linux@rasmusvillemoes.dkSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ffc00528
...@@ -19,6 +19,14 @@ properties: ...@@ -19,6 +19,14 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
isil,battery-trip-levels-microvolt:
description:
The battery voltages at which the first alarm and second alarm
should trigger (normally ~85% and ~75% of nominal V_BAT).
items:
- enum: [2125000, 2295000, 2550000, 2805000, 3060000, 4250000, 4675000]
- enum: [1875000, 2025000, 2250000, 2475000, 2700000, 3750000, 4125000]
required: required:
- compatible - compatible
- reg - reg
...@@ -39,6 +47,7 @@ examples: ...@@ -39,6 +47,7 @@ examples:
compatible = "isil,isl12022"; compatible = "isil,isl12022";
reg = <0x6f>; reg = <0x6f>;
interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>;
isil,battery-trip-levels-microvolt = <2550000>, <2250000>;
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment