[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19d537f9920cae5fa849b649e5bc42ba0b8e52f8.1759824376.git.mazziesaccount@gmail.com>
Date: Tue, 7 Oct 2025 11:33:19 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Sebastian Reichel <sre@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Matti Vaittinen <mazziesaccount@...il.com>,
Andreas Kemnade <andreas@...nade.info>, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: [RFC PATCH 03/13] dt-bindings: power: supply: BD72720 managed battery
The BD72720 PMIC has a battery charger + coulomb counter block. These
can be used to manage charging of a lithium-ion battery and to do fuel
gauging.
ROHM has developed a so called "zero-correction" -algotihm to improve
the fuel-gauging accuracy close to the point where battery is depleted.
This relies on battery specific "VDR" 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
BD72720 and some other ROHM chargers.
Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
---
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". I was not comfortable with adding these
properties to the generic battery.yaml because they 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 though (Kobo?).
---
.../power/supply/rohm,vdr-battery.yaml | 78 +++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/rohm,vdr-battery.yaml
diff --git a/Documentation/devicetree/bindings/power/supply/rohm,vdr-battery.yaml b/Documentation/devicetree/bindings/power/supply/rohm,vdr-battery.yaml
new file mode 100644
index 000000000000..85611ed050fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/rohm,vdr-battery.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/rohm,vdr-battery.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Battery managed by the BD72720 PMIC
+
+maintainers:
+ - Matti Vaittinen <mazziesaccount@...il.com>
+
+description:
+ A battery which has VDR parameters measuerd for ROHM chargers.
+
+allOf:
+ - $ref: battery.yaml#
+
+properties:
+ rohm,voltage-vdr-thresh-microvolt:
+ description: Threshold for starting the VDR correction
+
+ rohm,volt-drop-soc:
+ description: Table of capacity values matching the values in VDR tables.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ rohm,volt-drop-high-temp-microvolt:
+ description: VDR table for high temperature
+
+ rohm,volt-drop-normal-temp-microvolt:
+ description: VDR table for normal temperature
+
+ rohm,volt-drop-low-temp-microvolt:
+ description: VDR table for low temperature
+
+ rohm,volt-drop-very-low-temp-microvolt:
+ description: VDR table for very low temperature
+
+
+additionalProperties: false
+
+examples:
+ - |
+ power {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ battery: battery {
+ compatible = "simple-battery";
+
+ ocv-capacity-celsius = <25>;
+ ocv-capacity-table-0 = <4200000 100 4184314 100 4140723 95 4099487 90
+ 4060656 85 4024350 80 3991121 75 3954379 70 3913265 65 3877821 60
+ 3855577 55 3837466 50 3822194 45 3809012 40 3795984 35 3780647 30
+ 3760505 25 3741532 20 3718837 15 3696698 10 3690594 5 3581427 0>;
+
+ rohm,volt-drop-soc = <1000 1000 950 900 850 800 750 700 650 600 550 500
+ 450 400 350 300 250 200 150 100 50 00 (-50)>;
+
+ rohm,volt-drop-high-temp-microvolt = <100 100 102 104 106 109 114 124
+ 117 107 107 109 112 116 117 108 109 109 108 109 122 126 130>;
+
+ rohm,volt-drop-normal-temp-microvolt = <100 100 102 105 98 100 105 102
+ 101 99 98 100 103 105 109 117 111 109 110 114 128 141 154>;
+
+ rohm,volt-drop-low-temp-microvolt = <100 100 98 107 112 114 118 118 112
+ 108 108 110 111 113 117 123 131 144 157 181 220 283 399>;
+
+ rohm,volt-drop-very-low-temp-microvolt = <86 86 105 109 114 110 115 115
+ 110 108 110 112 114 118 124 134 136 160 177 201 241 322 403>;
+
+ rohm,voltage-vdr-thresh-microvolt = <4150000>;
+
+ charge-full-design-microamp-hours = <1799000>;
+ voltage-max-design-microvolt = <4200000>;
+ voltage-min-design-microvolt = <3500000>;
+ degrade-cycle-microamp-hours = <131>;
+ };
+ };
--
2.51.0
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists