# Battery Characteristics

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Power bindings / supply_

> Device-tree binding reference for Battery Characteristics.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;power&#47;supply&#47;battery&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Sebastian Reichel &#60;sre&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The devicetree battery node provides static battery characteristics.
In smart batteries, these are typically stored in non-volatile memory
on a fuel gauge chip. The battery node should be used where there is
no appropriate non-volatile memory, or it is unprogrammed/incorrect.</p>
<p style="white-space: pre-wrap">Upstream dts files should not include battery nodes, unless the battery
represented cannot easily be replaced in the system by one of a
different type. This prevents unpredictable, potentially harmful,
behavior should a replacement that changes the battery type occur
without a corresponding update to the dtb.</p>
<p style="white-space: pre-wrap">Battery properties are named, where possible, for the corresponding elements
in enum power_supply_property, defined in include/linux/power_supply.h</p>
<p style="white-space: pre-wrap">Batteries must be referenced by chargers and/or fuel-gauges using a phandle.
The phandle's property should be named "monitored-battery".</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;simple&#45;battery&#34;</code></span>

<a id="dt-05170fdc442b93874084"></a>

### <code>device&#45;chemistry</code> — not listed as required here

<div id="dt-6b72729c659d28ab47dd">
<p style="white-space: pre-wrap">This describes the chemical technology of the battery.</p>
</div>

<a id="dt-c01b787f6331982defc0"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

<a id="dt-99579ad159e22edc22e8"></a>

**Rule 1**

> **Exact value (<code>const</code>):** <span id="dt-057891e416d90d168ec7"><code>&#34;nickel&#45;cadmium&#34;</code></span>

<a id="dt-f5c02c5b248e4c4841a5"></a>

**Rule 2**

> **Exact value (<code>const</code>):** <span id="dt-62ea02d839ff87317375"><code>&#34;nickel&#45;metal&#45;hydride&#34;</code></span>

<a id="dt-4e6392876e511d8620c6"></a>

**Rule 3**

> **Exact value (<code>const</code>):** <span id="dt-576675a9bee5a22c51b4"><code>&#34;lithium&#45;ion&#34;</code></span>
>
> <div id="dt-d5aa45b17b766fc6277c">
> <p style="white-space: pre-wrap">This is a blanket type for all lithium-ion batteries, including those below. If possible, a precise compatible string from below should be used, but sometimes it is unknown which specific lithium ion battery is employed and this wide compatible can be used.</p>
> </div>

<a id="dt-49f6897e5a0e40c02d20"></a>

**Rule 4**

> **Exact value (<code>const</code>):** <span id="dt-29dc073bda42769f659c"><code>&#34;lithium&#45;ion&#45;polymer&#34;</code></span>

<a id="dt-2557e71e8fd335bdbfda"></a>

**Rule 5**

> **Exact value (<code>const</code>):** <span id="dt-9bd6b6ff46ff2ba7afd0"><code>&#34;lithium&#45;ion&#45;iron&#45;phosphate&#34;</code></span>

<a id="dt-0f6ea26e2071d55ccba3"></a>

**Rule 6**

> **Exact value (<code>const</code>):** <span id="dt-8b79d968bd39c0ef8a98"><code>&#34;lithium&#45;ion&#45;manganese&#45;oxide&#34;</code></span>

<a id="dt-c51b7c6932f6d38a73fe"></a>

### <code>over&#45;voltage&#45;threshold&#45;microvolt</code> — not listed as required here

<div id="dt-db2c89aa0a624579660c">
<p style="white-space: pre-wrap">battery over-voltage limit</p>
</div>

<a id="dt-825e8072794535bbd0d9"></a>

### <code>re&#45;charge&#45;voltage&#45;microvolt</code> — not listed as required here

<div id="dt-d38a19d30f3269115ccd">
<p style="white-space: pre-wrap">limit to automatically start charging again</p>
</div>

<a id="dt-e0371ab41661c515b41f"></a>

### <code>voltage&#45;min&#45;design&#45;microvolt</code> — not listed as required here

<div id="dt-02ee880f26bd822ea8d5">
<p style="white-space: pre-wrap">drained battery voltage</p>
</div>

<a id="dt-4e16f2ee627bdbbb79a9"></a>

### <code>voltage&#45;max&#45;design&#45;microvolt</code> — not listed as required here

<div id="dt-2b3e73b82d68b8be8800">
<p style="white-space: pre-wrap">fully charged battery voltage</p>
</div>

<a id="dt-843e3e38b6d520e5e14d"></a>

### <code>energy&#45;full&#45;design&#45;microwatt&#45;hours</code> — not listed as required here

<div id="dt-2594b8c969b0b317af67">
<p style="white-space: pre-wrap">battery design energy</p>
</div>

<a id="dt-91f801324e3e4a559907"></a>

### <code>charge&#45;full&#45;design&#45;microamp&#45;hours</code> — not listed as required here

<div id="dt-b31650625afa6dd76ffe">
<p style="white-space: pre-wrap">battery design capacity</p>
</div>

<a id="dt-1647c9c46cfab1bc94b8"></a>

### <code>trickle&#45;charge&#45;current&#45;microamp</code> — not listed as required here

<div id="dt-3ac9d0ce788227528931">
<p style="white-space: pre-wrap">current for trickle-charge phase. Please note that the trickle-charging here, refers "wake-up" or "pre-pre" -charging, for very empty batteries. Similar term is also used for "maintenance" or "top-off" -charging of batteries (like NiMh bq24400) - that is different and not controlled by this property.</p>
</div>

<a id="dt-4a1863693c03ab01358f"></a>

### <code>tricklecharge&#45;upper&#45;limit&#45;microvolt</code> — not listed as required here

<div id="dt-27f338e47a173848a6d2">
<p style="white-space: pre-wrap">limit when to change to precharge from trickle charge Trickle-charging here refers "wake-up" or "pre-pre" -charging.</p>
</div>

<a id="dt-b69946f406ae07b06c49"></a>

### <code>precharge&#45;current&#45;microamp</code> — not listed as required here

<div id="dt-0bf809db3a991f824104">
<p style="white-space: pre-wrap">current for pre-charge phase</p>
</div>

<a id="dt-ea68405e7b34431a16e8"></a>

### <code>precharge&#45;upper&#45;limit&#45;microvolt</code> — not listed as required here

<div id="dt-eee9479c1d2e5b7f4534">
<p style="white-space: pre-wrap">limit when to change to constant charging</p>
</div>

<a id="dt-ccde3cbe663bad9b37c3"></a>

### <code>charge&#45;term&#45;current&#45;microamp</code> — not listed as required here

<div id="dt-274d02687c4151bfeacb">
<p style="white-space: pre-wrap">current for charge termination phase</p>
</div>

<a id="dt-349dbed38292be225552"></a>

### <code>constant&#45;charge&#45;current&#45;max&#45;microamp</code> — not listed as required here

<div id="dt-4eca188e5115dc712c64">
<p style="white-space: pre-wrap">maximum constant input current</p>
</div>

<a id="dt-bf46cf026b39898fab40"></a>

### <code>constant&#45;charge&#45;voltage&#45;max&#45;microvolt</code> — not listed as required here

<div id="dt-3e74c5eb56832bd86919">
<p style="white-space: pre-wrap">maximum constant input voltage</p>
</div>

<a id="dt-9795d097666ea7fdebcb"></a>

### <code>factory&#45;internal&#45;resistance&#45;micro&#45;ohms</code> — not listed as required here

<div id="dt-4d3bb22eb86f706f7f40">
<p style="white-space: pre-wrap">battery factory internal resistance</p>
</div>

<a id="dt-c2b3556a7e8b2197f808"></a>

### <code>resistance&#45;temp&#45;table</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-041ce5a00a7dfc0a8934">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>

<a id="dt-6ea46cef4d47dc429329"></a>

#### Array item rules (<code>items</code>)

> <a id="dt-7c1b0afc4a03ae9247d6"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-74d361608f57f316e197"></a>
>
> **Item 1**
>
> > <div id="dt-5e1a70e2217348aa1210">
> > <p style="white-space: pre-wrap">the temperature in degree Celsius</p>
> > </div>
>
> <a id="dt-fcd883ae7dc3201d00a6"></a>
>
> **Item 2**
>
> > <div id="dt-3558abe039197b562851">
> > <p style="white-space: pre-wrap">battery internal resistance percent</p>
> > </div>

<div id="dt-ae6dd696faa6920328fd">
<p style="white-space: pre-wrap">A table providing the temperature in degree Celsius
and corresponding battery internal resistance percent, which is used to
look up the resistance percent according to current temperature to get an
accurate batterty internal resistance in different temperatures.</p>
</div>

<a id="dt-d5fbefddac321e641447"></a>

### <code>ocv&#45;capacity&#45;celsius</code> — not listed as required here

<div id="dt-1641ad89ec5fb96f6e81">
<p style="white-space: pre-wrap">An array containing the temperature in degree Celsius,
for each of the battery capacity lookup table.</p>
</div>

<a id="dt-d83203566ee2a29aab49"></a>

### <code>operating&#45;range&#45;celsius</code> — not listed as required here

<div id="dt-eca204cdb4cf34cb249d">
<p style="white-space: pre-wrap">operating temperature range of a battery</p>
</div>

<a id="dt-2167d39bb0e7d16fd04b"></a>

#### Array item rules (<code>items</code>)

<a id="dt-c6fb3d63274cfd64310a"></a>

**Item 1**

> <div id="dt-3bab2d51fcb5b727316b">
> <p style="white-space: pre-wrap">minimum temperature at which battery can operate</p>
> </div>

<a id="dt-131bf3df2c9f996e9fd8"></a>

**Item 2**

> <div id="dt-d7cd8a61dd0f6bfdc8c2">
> <p style="white-space: pre-wrap">maximum temperature at which battery can operate</p>
> </div>

<a id="dt-3f6ebbf7336a00970b1d"></a>

### <code>ambient&#45;celsius</code> — not listed as required here

<div id="dt-ff971b4bf332bc98a8b7">
<p style="white-space: pre-wrap">safe range of ambient temperature</p>
</div>

<a id="dt-7a6fe9388253fa6a9f8f"></a>

#### Array item rules (<code>items</code>)

<a id="dt-6167c6ac7f15a119a914"></a>

**Item 1**

> <div id="dt-bb84d6d616e1e5f359d7">
> <p style="white-space: pre-wrap">alert when ambient temperature is lower than this value</p>
> </div>

<a id="dt-a02365c0e5d24d5b958b"></a>

**Item 2**

> <div id="dt-c9d117069917242e8639">
> <p style="white-space: pre-wrap">alert when ambient temperature is higher than this value</p>
> </div>

<a id="dt-9cefeae1f302c92d8e2e"></a>

### <code>alert&#45;celsius</code> — not listed as required here

<div id="dt-7ed5f6c6bf4600891d3f">
<p style="white-space: pre-wrap">safe range of battery temperature</p>
</div>

<a id="dt-34d5d676d99bbed6e576"></a>

#### Array item rules (<code>items</code>)

<a id="dt-9b89475bf6c3d4e7c1e5"></a>

**Item 1**

> <div id="dt-8f19b7e2096ade5534bd">
> <p style="white-space: pre-wrap">alert when battery temperature is lower than this value</p>
> </div>

<a id="dt-6130dc90df3cd47be581"></a>

**Item 2**

> <div id="dt-e63470b0b9027c9cfcf5">
> <p style="white-space: pre-wrap">alert when battery temperature is higher than this value</p>
> </div>

<a id="dt-02c4110b4a4ffd2b01cc"></a>

### <code>volt&#45;drop&#45;thresh&#45;microvolt</code> — not listed as required here

<div id="dt-5f4051b5010f57244679">
<p style="white-space: pre-wrap">Threshold for starting the VDR correction</p>
</div>

**Maximum value (<code>maximum</code>):** <span id="dt-267cbdcccf84c6c989c2"><code>48000000</code></span>

<a id="dt-8ebaf140b7cfe6287f91"></a>

### <code>volt&#45;drop&#45;soc&#45;bp</code> — not listed as required here

<div id="dt-634fee072ca3d0facb8a">
<p style="white-space: pre-wrap">Table of capacity values matching the values in VDR tables. The value should be given as basis points, 1/100 of a percent.</p>
</div>

<a id="dt-13c451761b9d2e357027"></a>

### <code>volt&#45;drop&#45;temperatures&#45;millicelsius</code> — not listed as required here

<div id="dt-32390069d81357b32e55">
<p style="white-space: pre-wrap">An array containing the temperature in milli celsius, for each of the VDR lookup table.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>

<a id="dt-e92215bd3c2f5373b164"></a>

## Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-ce09d7f5144a979f4aec"></a>

### <code>&#94;ocv&#45;capacity&#45;table&#45;&#91;0&#45;9&#93;&#43;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-aeaa7519a9d11ea63ebf">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>

<div id="dt-988c4cc9033cb4b6051d">
<p style="white-space: pre-wrap">An array providing the open circuit voltage (OCV)
of the battery and corresponding battery capacity percent, which is used
to look up battery capacity according to current OCV value. And the open
circuit voltage unit is microvolt.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-39a7d1230dfdfa0fc896"><code>100</code></span>

<a id="dt-5e7f0766f5ea12da010d"></a>

#### Array item rules (<code>items</code>)

> <a id="dt-07a0472869c7c65c5c4f"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-efb184348d76389a8aee"></a>
>
> **Item 1**
>
> > <div id="dt-1bee605a473197c4ac9a">
> > <p style="white-space: pre-wrap">open circuit voltage (OCV) in microvolts</p>
> > </div>
>
> <a id="dt-53bec33c71df6e6b1b47"></a>
>
> **Item 2**
>
> > <div id="dt-5857520c352df8e9daf0">
> > <p style="white-space: pre-wrap">battery capacity percent</p>
> > </div>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-8ea67c3e7a8cf6ccf968"><code>100</code></span>

<a id="dt-99bd87fdba90f568470e"></a>

### <code>&#94;volt&#45;drop&#45;&#91;0&#45;9&#93;&#45;microvolt</code> — name matches this regular expression

<div id="dt-2cefcdd444122915ccf6">
<p style="white-space: pre-wrap">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.</p>
</div>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">power {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;

  battery: battery {
    compatible = "simple-battery";
    over-voltage-threshold-microvolt = &lt;4500000&gt;;
    re-charge-voltage-microvolt = &lt;250000&gt;;
    voltage-min-design-microvolt = &lt;3200000&gt;;
    voltage-max-design-microvolt = &lt;4200000&gt;;
    energy-full-design-microwatt-hours = &lt;5290000&gt;;
    charge-full-design-microamp-hours = &lt;1430000&gt;;
    precharge-current-microamp = &lt;256000&gt;;
    precharge-upper-limit-microvolt = &lt;2500000&gt;;
    charge-term-current-microamp = &lt;128000&gt;;
    constant-charge-current-max-microamp = &lt;900000&gt;;
    constant-charge-voltage-max-microvolt = &lt;4200000&gt;;
    factory-internal-resistance-micro-ohms = &lt;250000&gt;;
    ocv-capacity-celsius = &lt;(-10) 0 10&gt;;
    /* table for -10 degree Celsius */
    ocv-capacity-table-0 = &lt;4185000 100&gt;, &lt;4113000 95&gt;, &lt;4066000 90&gt;;
    /* table for 0 degree Celsius */
    ocv-capacity-table-1 = &lt;4200000 100&gt;, &lt;4185000 95&gt;, &lt;4113000 90&gt;;
    /* table for 10 degree Celsius */
    ocv-capacity-table-2 = &lt;4250000 100&gt;, &lt;4200000 95&gt;, &lt;4185000 90&gt;;
    resistance-temp-table = &lt;20 100&gt;, &lt;10 90&gt;, &lt;0 80&gt;, &lt;(-10) 60&gt;;
    operating-range-celsius = &lt;(-30) 50&gt;;
    ambient-celsius = &lt;(-5) 50&gt;;
    alert-celsius = &lt;0 40&gt;;
  };

  charger@11 {
    reg = &lt;0x11&gt;;
    monitored-battery = &lt;&amp;battery&gt;;
  };

  fuel-gauge@22 {
    reg = &lt;0x22&gt;;
    monitored-battery = &lt;&amp;battery&gt;;
  };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 131:</strong> <span> The volt-drop* -properties describe voltage-drop for a battery, described</span></p>

<p id="dt-comment-2"><strong>Line 132:</strong> <span> as VDROP in:</span></p>

<p id="dt-comment-3"><strong>Line 133:</strong> <span> https://patentimages.storage.googleapis.com/6c/f5/17/c1d901c220f6a9/US20150032394A1.pdf</span></p>

</details>
