[RFC PATCH v3 1/9] dt-bindings: battery: Add temperature-capacity degradation table

From: Matti Vaittinen
Date: Tue Nov 16 2021 - 07:25:07 EST

Some charger/battery vendors describe the temperature impact to
battery capacity by providing tables with capacity change at
given temperature. Support providing this temperature - capacity
dependency using the simple-battery DT nodes.

Signed-off-by: Matti Vaittinen <matti.vaittinen@xxxxxxxxxxxxxxxxx>
.../bindings/power/supply/battery.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/supply/battery.yaml b/Documentation/devicetree/bindings/power/supply/battery.yaml
index d56ac484fec5..98cc85b92a71 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.yaml
+++ b/Documentation/devicetree/bindings/power/supply/battery.yaml
@@ -114,6 +114,25 @@ properties:
- description: alert when battery temperature is lower than this value
- description: alert when battery temperature is higher than this value

+ temp-degrade-table:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ description: |
+ An array of value triplets. First value is "capacity change per degree C"
+ when temperature differs from 'set point'. Second value is "capacity
+ degradation at given 'set point' temperature" and third value is "the
+ 'set-point' temperature" where given degradation is correct.
+ Up to 100 value triplets can be provided to specify different degradation
+ for different temperature ranges. When capacity change caused by
+ temperatures is computed the range which 'set point' is closest to the
+ current temperature is used. Capacity change should be in units of
+ micro Ah. Temperature is in units of 0.1 C degree.
+ maxItems: 100
+ items:
+ items:
+ - description: capacity drop per degree C in micro Ah
+ - description: capacity drop at 'set point' temperature in micro Ah
+ - description: 'set point' temperature for this range in 0.1 degree C
- compatible


Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]

Attachment: signature.asc
Description: PGP signature