| 1 |
.. SPDX-License-Identifier: GPL-2.0 |
| 2 |
|
| 3 |
Kernel driver kbatt |
| 4 |
=================== |
| 5 |
|
| 6 |
Supported chips: |
| 7 |
|
| 8 |
* KEBA battery monitoring controller (IP core in FPGA) |
| 9 |
|
| 10 |
Prefix: 'kbatt' |
| 11 |
|
| 12 |
Authors: |
| 13 |
|
| 14 |
Gerhard Engleder <[email protected]> |
| 15 |
Petar Bojanic <[email protected]> |
| 16 |
|
| 17 |
Description |
| 18 |
----------- |
| 19 |
|
| 20 |
The KEBA battery monitoring controller is an IP core for FPGAs, which |
| 21 |
monitors the health of a coin cell battery. The coin cell battery is |
| 22 |
typically used to supply the RTC during power off to keep the current |
| 23 |
time. E.g., the CP500 FPGA includes this IP core to monitor the coin cell |
| 24 |
battery of PLCs and the corresponding cp500 driver creates an auxiliary |
| 25 |
device for the kbatt driver. |
| 26 |
|
| 27 |
This driver provides information about the coin cell battery health to |
| 28 |
user space. Actually the user space shall be informed that the coin cell |
| 29 |
battery is nearly empty and needs to be replaced. |
| 30 |
|
| 31 |
The coin cell battery must be tested actively to get to know if its nearly |
| 32 |
empty or not. Therefore, a load is put on the coin cell battery and the |
| 33 |
resulting voltage is evaluated. This evaluation is done by some hard wired |
| 34 |
analog logic, which compares the voltage to a defined limit. If the |
| 35 |
voltage is above the limit, then the coin cell battery is assumed to be |
| 36 |
ok. If the voltage is below the limit, then the coin cell battery is |
| 37 |
nearly empty (or broken, removed, ...) and shall be replaced by a new one. |
| 38 |
The KEBA battery monitoring controller allows to start the test of the |
| 39 |
coin cell battery and to get the result if the voltage is above or below |
| 40 |
the limit. The actual voltage is not available. Only the information if |
| 41 |
the voltage is below a limit is available. |
| 42 |
|
| 43 |
The test load, which is put on the coin cell battery for the health check, |
| 44 |
is similar to the load during power off. Therefore, the lifetime of the |
| 45 |
coin cell battery is reduced directly by the duration of each test. To |
| 46 |
limit the negative impact to the lifetime the test is limited to at most |
| 47 |
once every 10 seconds. The test load is put on the coin cell battery for |
| 48 |
100ms. Thus, in worst case the coin cell battery lifetime is reduced by |
| 49 |
1% of the uptime or 3.65 days per year. As the coin cell battery lasts |
| 50 |
multiple years, this lifetime reduction negligible. |
| 51 |
|
| 52 |
This driver only provides a single alarm attribute, which is raised when |
| 53 |
the coin cell battery is nearly empty. |
| 54 |
|
| 55 |
====================== ==== =================================================== |
| 56 |
Attribute R/W Contents |
| 57 |
====================== ==== =================================================== |
| 58 |
in0_min_alarm R voltage of coin cell battery under load is below |
| 59 |
limit |
| 60 |
====================== ==== =================================================== |