From: Alexey Charkov <alchark@flipper.net>
To: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Alexey Charkov <alchark@flipper.net>
Subject: [PATCH 1/3] dt-bindings: power: supply: battery: Add a charging temperature range
Date: Mon, 09 Nov 2026 13:41:48 +0400 [thread overview]
Message-ID: <20261109-battery-charge-temp-range-v1-1-a967abd8b80c@flipper.net> (raw)
In-Reply-To: <20261109-battery-charge-temp-range-v1-0-a967abd8b80c@flipper.net>
Describe batteries rated for separate charging and discharging
temperature ranges, such as 0-45C for charging and -20-60C for
discharging, often with a reduced charge current near the ends of the
charging range: operating-range-celsius holds a single range, and
existing users read it both as the limit for any use of the battery and
as the limit for charging.
Add charge-temp-range-celsius for the charging range, falling back to
operating-range-celsius when absent, and state that
operating-range-celsius covers discharging. Add the charge current and
voltage to use between alert-celsius and the charging range limits, to
describe a reduced charge rate near those limits and none beyond them.
A missing half of an alert charge current and voltage pair falls back to
the matching constant-charge-* setting. alert-celsius is expected to fully
fall inside charge-temp-range-celsius, but when it does not,
charge-temp-range-celsius takes precedence to ensure no charge occurs
outside the allowed range.
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
.../devicetree/bindings/power/supply/battery.yaml | 45 +++++++++++++++++++++-
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/power/supply/battery.yaml b/Documentation/devicetree/bindings/power/supply/battery.yaml
index 9575ee1491bb..d2f2ed9a01fe 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.yaml
+++ b/Documentation/devicetree/bindings/power/supply/battery.yaml
@@ -111,11 +111,21 @@ properties:
for each of the battery capacity lookup table.
operating-range-celsius:
- description: operating temperature range of a battery
+ description: operating temperature range of a battery, in which it can be
+ discharged. Charging may be further restricted by
+ charge-temp-range-celsius.
items:
- description: minimum temperature at which battery can operate
- description: maximum temperature at which battery can operate
+ charge-temp-range-celsius:
+ description: temperature range in which the battery can be charged, within
+ operating-range-celsius. If absent, the battery can be charged in all of
+ operating-range-celsius. Outside this range the battery is not charged.
+ items:
+ - description: minimum temperature at which battery can be charged
+ - description: maximum temperature at which battery can be charged
+
ambient-celsius:
description: safe range of ambient temperature
items:
@@ -123,11 +133,39 @@ properties:
- description: alert when ambient temperature is higher than this value
alert-celsius:
- description: safe range of battery temperature
+ description: safe range of battery temperature. Where a limit of this
+ range lies within charge-temp-range-celsius, the battery is charged
+ between the two limits with the alert-low-temp-charge-* or
+ alert-high-temp-charge-* settings. Each of those that is absent falls
+ back to the corresponding constant-charge-* setting.
items:
- description: alert when battery temperature is lower than this value
- description: alert when battery temperature is higher than this value
+ alert-low-temp-charge-current-microamp:
+ description: charge current in place of
+ constant-charge-current-max-microamp, while the battery temperature is
+ between the lower limits of charge-temp-range-celsius and alert-celsius
+ minimum: 1
+
+ alert-low-temp-charge-voltage-microvolt:
+ description: charge voltage in place of
+ constant-charge-voltage-max-microvolt, while the battery temperature is
+ between the lower limits of charge-temp-range-celsius and alert-celsius
+ minimum: 1
+
+ alert-high-temp-charge-current-microamp:
+ description: charge current in place of
+ constant-charge-current-max-microamp, while the battery temperature is
+ between the upper limits of alert-celsius and charge-temp-range-celsius
+ minimum: 1
+
+ alert-high-temp-charge-voltage-microvolt:
+ description: charge voltage in place of
+ constant-charge-voltage-max-microvolt, while the battery temperature is
+ between the upper limits of alert-celsius and charge-temp-range-celsius
+ minimum: 1
+
# 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
@@ -200,8 +238,11 @@ examples:
ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>;
resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
operating-range-celsius = <(-30) 50>;
+ charge-temp-range-celsius = <0 45>;
ambient-celsius = <(-5) 50>;
alert-celsius = <0 40>;
+ alert-high-temp-charge-current-microamp = <450000>;
+ alert-high-temp-charge-voltage-microvolt = <4100000>;
};
charger@11 {
--
2.56.0
next prev parent reply other threads:[~2026-11-09 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 9:41 [PATCH 0/3] power: supply: battery: Allow separate charging limits vs. discharging Alexey Charkov
2026-11-09 9:41 ` Alexey Charkov [this message]
2026-11-19 22:58 ` [PATCH 1/3] dt-bindings: power: supply: battery: Add a charging temperature range Rob Herring
2026-11-09 9:41 ` [PATCH 2/3] power: supply: core: Read the charging temperature range and alert settings Alexey Charkov
2026-11-09 9:41 ` [PATCH 3/3] power: supply: samsung-sdi-battery: Set the charging temperature range Alexey Charkov
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=20261109-battery-charge-temp-range-v1-1-a967abd8b80c@flipper.net \
--to=alchark@flipper.net \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®