# Texas Instruments INA3221 Current and Voltage Monitor

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Hwmon bindings_

> Device-tree binding reference for Texas Instruments INA3221 Current and Voltage Monitor.

<!-- 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;hwmon&#47;ti&#44;ina3221&#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;Jean Delvare &#60;jdelvare&#64;suse&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Guenter Roeck &#60;linux&#64;roeck&#45;us&#46;net&#62;&#34;</code></span>

<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;ti&#44;ina3221&#34;</code></span>

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

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

### <code>ti&#44;single&#45;shot</code> — not listed as required here

<div id="dt-2ab4ec8be31786b2b7f8">
<p style="white-space: pre-wrap">This chip has two power modes: single-shot (chip takes one measurement
and then shuts itself down) and continuous (chip takes continuous
measurements). The continuous mode is more reliable and suitable for
hardware monitor type device, but the single-shot mode is more power-
friendly and useful for battery-powered device which cares power
consumptions while still needs some measurements occasionally.</p>
<p style="white-space: pre-wrap">If this property is present, the single-shot mode will be used, instead
of the default continuous one for monitoring.</p>
</div>

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

<a id="dt-2efe70314a961a652abe"></a>

### <code>&#35;address&#45;cells</code> — not listed as required here

<div id="dt-56d7bd958afc920979c6">
<p style="white-space: pre-wrap">Required only if a child node is present.</p>
</div>

**Exact value (<code>const</code>):** <span id="dt-e6e6af09ab617572731b"><code>1</code></span>

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

### <code>&#35;size&#45;cells</code> — not listed as required here

<div id="dt-a7b8b6ab7c1846810ef9">
<p style="white-space: pre-wrap">Required only if a child node is present.</p>
</div>

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>0</code></span>

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

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

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

### <code>&#94;input&#64;&#91;0&#45;2&#93;&#36;</code> — name matches this regular expression

<div id="dt-8d6ff66f4e65dcf29106">
<p style="white-space: pre-wrap">The node contains optional child nodes for three channels. Each child node describes the information of input source. Input channels default to enabled in the chip. Unless channels are explicitly disabled in device-tree, input channels will be enabled.</p>
</div>

**Value type (<code>type</code>):** <span id="dt-60d7d0dff236513ef766"><code>&#34;object&#34;</code></span>

<a id="dt-e64dc91766000363eb69"></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-20e619d7cb8524c60d19"></a>

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

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

**<code>reg</code> — required here**

<div id="dt-4a208ac977dd8b03d5cc">
<p style="white-space: pre-wrap">Must be 0, 1 and 2, corresponding to the IN1, IN2 or IN3 ports of the INA3221, respectively.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-1b18ab9cb83b93b6e590"></a> <span id="dt-db1e5c3ba166352384eb"><code>0</code></span>, <span id="dt-8279f8e4822b02f4ac6e"><code>1</code></span>, <span id="dt-d88b24687bb47781f806"><code>2</code></span>

<a id="dt-85d51b65fa67341489e2"></a>

**<code>label</code> — not listed as required here**

<div id="dt-bb847d70dd7dce0afd46">
<p style="white-space: pre-wrap">name of the input source</p>
</div>

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

**<code>shunt&#45;resistor&#45;micro&#45;ohms</code> — not listed as required here**

<div id="dt-94b942548a0f9863d226">
<p style="white-space: pre-wrap">shunt resistor value in micro-Ohm</p>
</div>

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

**<code>ti&#44;summation&#45;disable</code> — not listed as required here**

<div id="dt-7e18727804ca2f4702b4">
<p style="white-space: pre-wrap">The INA3221 has a critical alert pin that can be controlled by the
summation control function. This function adds the single
shunt-voltage conversions for the desired channels in order to
compare the combined sum to the programmed limit. The Shunt-Voltage
Sum Limit register contains the programmed value that is compared
to the value in the Shunt-Voltage Sum register in order to
determine if the total summed limit is exceeded. If the
shunt-voltage sum limit value is exceeded, the critical alert pin
is asserted.</p>
<p style="white-space: pre-wrap">For the summation limit to have a meaningful value, it is necessary
to use the same shunt-resistor value on all enabled channels. If
this is not the case or if a channel should not be used for
triggering the critical alert pin, then this property can be used
exclude specific channels from the summation control function.</p>
</div>

**Value type (<code>type</code>):** <span id="dt-6d9474aca193e1d19328"><code>&#34;boolean&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-07baf2939d4255c7a4c7"></a> <span id="dt-5ca81786dc026b8c5ba5"><code>&#34;reg&#34;</code></span>

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

<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">i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    power-sensor@40 {
        compatible = "ti,ina3221";
        reg = &lt;0x40&gt;;
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;

        input@0 {
            reg = &lt;0x0&gt;;
            /*
             * Input channels are enabled by default in the device and so
             * to disable, must be explicitly disabled in device-tree.
             */
            status = "disabled";
        };

        input@1 {
            reg = &lt;0x1&gt;;
            shunt-resistor-micro-ohms = &lt;5000&gt;;
        };

        input@2 {
            reg = &lt;0x2&gt;;
            label = "VDD_5V";
            shunt-resistor-micro-ohms = &lt;5000&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>

</details>
