# Analog Devices AD74412R/AD74413R device

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Industrial I/O bindings / addac_

> Device-tree binding reference for Analog Devices AD74412R/AD74413R device.

<!-- 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;iio&#47;addac&#47;adi&#44;ad74413r&#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;Cosmin Tanislav &#60;cosmin&#46;tanislav&#64;analog&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<pre><code>The AD74412R and AD74413R are quad-channel software configurable input/output
solutions for building and process control applications. They contain
functionality for analog output, analog input, digital input, resistance
temperature detector, and thermocouple measurements integrated
into a single chip solution with an SPI interface.
The devices feature a 16-bit ADC and four configurable 13-bit DACs to provide
four configurable input/output channels and a suite of diagnostic functions.
The AD74413R differentiates itself from the AD74412R by being HART-compatible.
  https://www.analog.com/en/products/ad74412r.html
  https://www.analog.com/en/products/ad74413r.html</code></pre>
</div>

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

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;adi&#44;ad74412r&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;adi&#44;ad74413r&#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-2efe70314a961a652abe"></a>

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

**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

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

<a id="dt-03a3b4f56bf191dde680"></a>

### <code>spi&#45;max&#45;frequency</code> — required here

**Maximum value (<code>maximum</code>):** <span id="dt-f17e1c3bb71259096275"><code>1000000</code></span>

<a id="dt-27851c8ce8d41152ef35"></a>

### <code>spi&#45;cpol</code> — required here

<code>true</code> — No constraints added by this property rule.

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

### <code>interrupts</code> — not listed as required here

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

<a id="dt-84e2e3a75b9cc8ae2fc7"></a>

### <code>refin&#45;supply</code> — required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-9800ba30a3358f7953d5"></a>

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

<div id="dt-2f043def05d1b62bd4af">
<p style="white-space: pre-wrap">Shunt (sense) resistor value in micro-Ohms.</p>
</div>

**Default value (<code>default</code>):** <span id="dt-7a74f95426492cd9706c"><code>100000000</code></span>

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

### <code>reset&#45;gpios</code> — not listed as required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-140c9736042c6903f7ff"><code>1</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>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;spi&#45;max&#45;frequency&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;spi&#45;cpol&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;refin&#45;supply&#34;</code></span>

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

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

<a id="dt-851beb48e74b776e2b4b"></a>

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

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

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-dd8e1d4a3870cf8fd802">
<p style="white-space: pre-wrap">Represents the external channels which are connected to the device.</p>
</div>

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

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

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

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

<div id="dt-37064238cfe14c8d59ca">
<p style="white-space: pre-wrap">The channel number. It can have up to 4 channels numbered from 0 to 3.</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-b6f2dc4be6272dc9d7a5"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-90e673016c8c58728574"><code>3</code></span>

<a id="dt-5893a381d597ec914395"></a>

**<code>adi&#44;ch&#45;func</code> — not listed as required here**

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

<div id="dt-cb5740367eef795056f0">
<p style="white-space: pre-wrap">Channel function.
HART functions are not supported on AD74412R.
0 - CH_FUNC_HIGH_IMPEDANCE
1 - CH_FUNC_VOLTAGE_OUTPUT
2 - CH_FUNC_CURRENT_OUTPUT
3 - CH_FUNC_VOLTAGE_INPUT
4 - CH_FUNC_CURRENT_INPUT_EXT_POWER
5 - CH_FUNC_CURRENT_INPUT_LOOP_POWER
6 - CH_FUNC_RESISTANCE_INPUT
7 - CH_FUNC_DIGITAL_INPUT_LOGIC
8 - CH_FUNC_DIGITAL_INPUT_LOOP_POWER
9 - CH_FUNC_CURRENT_INPUT_EXT_POWER_HART
10 - CH_FUNC_CURRENT_INPUT_LOOP_POWER_HART</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-b03e044d89768d0ef5f0"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-cc8bdb2144061280fbbc"><code>10</code></span>

**Default value (<code>default</code>):** <span id="dt-9a9f65ee5b9dc367479e"><code>0</code></span>

<a id="dt-814dd21b7c7566390b69"></a>

**<code>adi&#44;gpo&#45;comparator</code> — not listed as required here**

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

<div id="dt-299818214608a2a8f377">
<p style="white-space: pre-wrap">Whether to configure GPO as a comparator or not.
When not configured as a comparator, the GPO will be treated as an
output-only GPIO.</p>
</div>

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

**<code>drive&#45;strength&#45;microamp</code> — not listed as required here**

<div id="dt-dfe6f48853f0ee186b4a">
<p style="white-space: pre-wrap">For channels configured as digital input, this configures the sink
current.</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-171da113327ddffa85bb"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-dd0908842882bb5ebd90"><code>1800</code></span>

**Default value (<code>default</code>):** <span id="dt-9a8097724fdf448db984"><code>0</code></span>

**Multiple of (<code>multipleOf</code>):** <span id="dt-248e113fae29525bd111"><code>120</code></span>

**Required in this object (<code>required</code>):** <a id="dt-ed8c88f28db5f41ceea0"></a> <span id="dt-2369497c99afd9cc977c"><code>&#34;reg&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>&#47;schemas&#47;spi&#47;spi&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/spi-peripheral-props.md#dt-root>)</span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</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">#include &lt;dt-bindings/gpio/gpio.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/iio/addac/adi,ad74413r.h&gt;

spi {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;

  addac@0 {
    compatible = "adi,ad74413r";
    reg = &lt;0&gt;;
    spi-max-frequency = &lt;1000000&gt;;
    spi-cpol;

    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    interrupt-parent = &lt;&amp;gpio&gt;;
    interrupts = &lt;26 IRQ_TYPE_EDGE_FALLING&gt;;

    refin-supply = &lt;&amp;ad74413r_refin&gt;;
    reset-gpios = &lt;&amp;gpio2 6 GPIO_ACTIVE_LOW&gt;;

    channel@0 {
      reg = &lt;0&gt;;

      adi,ch-func = &lt;CH_FUNC_VOLTAGE_OUTPUT&gt;;
    };

    channel@1 {
      reg = &lt;1&gt;;

      adi,ch-func = &lt;CH_FUNC_CURRENT_OUTPUT&gt;;
    };

    channel@2 {
      reg = &lt;2&gt;;

      adi,ch-func = &lt;CH_FUNC_DIGITAL_INPUT_LOGIC&gt;;
      adi,gpo-comparator;
    };

    channel@3 {
      reg = &lt;3&gt;;

      adi,ch-func = &lt;CH_FUNC_CURRENT_INPUT_EXT_POWER&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>
