From: Matti Vaittinen <matti.vaittinen@linux.dev>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-rtc@vger.kernel.org, Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH RESEND v6 04/17] dt-bindings: battery: Voltage drop properties
Date: Mon, 15 Dec 2025 15:18:11 +0200 [thread overview]
Message-ID: <461f2840a03e0189ecd4f1a7c261014342ddee91.1765804226.git.mazziesaccount@gmail.com> (raw)
In-Reply-To: <cover.1765804226.git.mazziesaccount@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4785 bytes --]
From: Matti Vaittinen <mazziesaccount@gmail.com>
ROHM has developed a so called "zero-correction" -algorithm to improve
the fuel-gauging accuracy close to the point where battery is depleted.
This relies on battery specific "VDR" (voltage drop rate) tables, which
are measured from the battery, and which describe the voltage drop rate.
More thorough explanation about the "zero correction" and "VDR"
parameters is here:
https://lore.kernel.org/all/676253b9-ff69-7891-1f26-a8b5bb5a421b@fi.rohmeurope.com/
Document the VDR zero-correction specific battery properties used by the
BD71815, BD71828, BD72720 and some other ROHM chargers. (Note, charger
drivers aren't upstream yet).
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
---
Revision history:
v5 =>:
- No changes
v4 => v5:
- Move volt-drop parameters from rohm,vdr-battry,yaml to the
battery.yaml
- drop rohm, -prefix from volt-drop-* properties
- Drop the rohm,vdr-battry,yaml
- Add comment clarifying what the rohm,volt-drop-* properties are for
because this may no longer be obvious as they were moved to common
battery.yaml
- Drop Linus Walleij's rb-tag because the concept was changed
v3 => v4:
- No changes
v2 => v3:
- Constrain VDR threshold voltage to 48V
- Use standard '-bp' -suffix for the rohm,volt-drop-soc
RFCv1 => v2:
- Add units to rohm,volt-drop-soc (tenths of %)
- Give real temperatures matching the VDR tables, instead of vague
'high', 'normal', 'low', 'very low'. (Add table of temperatures and
use number matching the right temperature index in the VDR table name).
- Fix typoed 'algorithm' in commit message.
The parameters are describing the battery voltage drop rates - so they
are properties of the battery, not the charger. Thus they do not belong
in the charger node.
The right place for them is the battery node, which is described by the
generic "battery.yaml". There were some discussion whether these
properties should be in their own file, or if they should be added to
battery.yaml. Discussion can be found from:
https://lore.kernel.org/all/52b99bf7-bfea-4cee-aa57-4c13e87eaa0d@gmail.com/
This patch implements the volt-drop properties as generic (not vemdor
specific) properties in the battery.yaml. It's worth noting that these
properties are:
- Meaningful only for those charger drivers which have the VDR
algorithm implemented. (And even though the algorithm is not charger
specific, AFAICS, it is currently only used by some ROHM PMIC
drivers).
- Technique of measuring the VDR tables for a battery is not widely
known. AFAICS, only folks at ROHM are measuring those for some
customer products. We do have those tables available for some of the
products, like Kobo e-readers though.
---
.../bindings/power/supply/battery.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/supply/battery.yaml b/Documentation/devicetree/bindings/power/supply/battery.yaml
index d1a2080557a0..8ebf05d9497c 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.yaml
+++ b/Documentation/devicetree/bindings/power/supply/battery.yaml
@@ -128,6 +128,21 @@ properties:
- description: alert when battery temperature is lower than this value
- description: alert when battery temperature is higher than this value
+ # The volt-drop* -properties describe voltage-drop for a battery, described
+ # as VDROP in:
+ # https://patentimages.storage.googleapis.com/6c/f5/17/c1d901c220f6a9/US20150032394A1.pdf
+ volt-drop-thresh-microvolt:
+ description: Threshold for starting the VDR correction
+ maximum: 48000000
+
+ volt-drop-soc-bp:
+ description: Table of capacity values matching the values in VDR tables.
+ The value should be given as basis points, 1/100 of a percent.
+
+ volt-drop-temperatures-millicelsius:
+ description: An array containing the temperature in milli celsius, for each
+ of the VDR lookup table.
+
required:
- compatible
@@ -146,6 +161,13 @@ patternProperties:
- description: battery capacity percent
maximum: 100
+ '^volt-drop-[0-9]-microvolt':
+ description: Table of the voltage drop rate (VDR) values. Each entry in the
+ table should match a capacity value in the volt-drop-soc table.
+ Furthermore, the values should be obtained for the temperature given in
+ volt-drop-temperatures-millicelsius table at index matching the
+ number in this table's name.
+
additionalProperties: false
examples:
--
2.52.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-12-15 13:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 13:16 [PATCH RESEND v6 00/17] Support ROHM BD72720 PMIC Matti Vaittinen
2025-12-15 13:17 ` [PATCH RESEND v6 01/17] dt-bindings: regulator: ROHM BD72720 Matti Vaittinen
2025-12-15 13:17 ` [PATCH RESEND v6 02/17] dt-bindings: battery: Clarify trickle-charge Matti Vaittinen
2025-12-15 13:17 ` [PATCH RESEND v6 03/17] dt-bindings: battery: Add trickle-charge upper limit Matti Vaittinen
2025-12-15 13:18 ` Matti Vaittinen [this message]
2025-12-15 13:18 ` [PATCH RESEND v6 05/17] dt-bindings: mfd: ROHM BD72720 Matti Vaittinen
2025-12-15 13:18 ` [PATCH RESEND v6 06/17] dt-bindings: leds: bd72720: Add BD72720 Matti Vaittinen
2025-12-15 13:19 ` [PATCH RESEND v6 07/17] mfd: rohm-bd71828: Use regmap_reg_range() Matti Vaittinen
2025-12-15 13:19 ` [PATCH RESEND v6 08/17] mfd: rohm-bd71828: Use standard file header format Matti Vaittinen
2025-12-15 13:19 ` [PATCH RESEND v6 09/17] mfd: rohm-bd71828: Support ROHM BD72720 Matti Vaittinen
2025-12-15 13:19 ` [PATCH RESEND v6 10/17] regulator: bd71828: rename IC specific entities Matti Vaittinen
2025-12-15 13:20 ` [PATCH RESEND v6 11/17] regulator: bd71828: Support ROHM BD72720 Matti Vaittinen
2025-12-15 13:20 ` [PATCH RESEND v6 12/17] gpio: Support ROHM BD72720 gpios Matti Vaittinen
2025-12-15 13:20 ` [PATCH RESEND v6 13/17] clk: clk-bd718x7: Support BD72720 clk gate Matti Vaittinen
2025-12-15 13:20 ` [PATCH RESEND v6 14/17] rtc: bd70528: Support BD72720 rtc Matti Vaittinen
2025-12-15 13:21 ` [PATCH RESEND v6 15/17] power: supply: bd71828: Support wider register addresses Matti Vaittinen
2025-12-15 13:21 ` [PATCH RESEND v6 16/17] power: supply: bd71828-power: Support ROHM BD72720 Matti Vaittinen
2025-12-15 13:21 ` [PATCH RESEND v6 17/17] MAINTAINERS: Add ROHM BD72720 PMIC Matti Vaittinen
2025-12-15 13:27 ` [PATCH RESEND v6 00/17] Support " Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=461f2840a03e0189ecd4f1a7c261014342ddee91.1765804226.git.mazziesaccount@gmail.com \
--to=matti.vaittinen@linux.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=andreas@kemnade.info \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=mturquette@baylibre.com \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).