# Analog Devices AD5592R/AD5593R DAC/ADC

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

> Device-tree binding reference for Analog Devices AD5592R/AD5593R DAC/ADC.

<!-- SPDX-License-Identifier: (GPL-2.0 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;dac&#47;adi&#44;ad5592r&#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;Michael Hennerich &#60;michael&#46;hennerich&#64;analog&#46;com&#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

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

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

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

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

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

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

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

### <code>&#35;address&#45;cells</code> — 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> — required here

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

<a id="dt-6971e222e0082656e9f5"></a>

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

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

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

### <code>vref&#45;supply</code> — not listed as required here

<div id="dt-f9c8a721f6889569bcad">
<p style="white-space: pre-wrap">If not set internal 2.5V reference used.</p>
</div>

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

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

### <code>gpio&#45;controller</code> — not listed as required here

<div id="dt-5168d714e593428371b8">
<p style="white-space: pre-wrap">Marks the device node as a GPIO controller.</p>
</div>

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

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

**Exact value (<code>const</code>):** <span id="dt-8950f722147d2cd640b8"><code>2</code></span>

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">The first cell is the GPIO number and the second cell specifies GPIO flags, as defined in &lt;dt-bindings/gpio/gpio.h&gt;.</p>
</div>

**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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;size&#45;cells&#34;</code></span>

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

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

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8997992e7087b5549d86"><code>&#34;adi&#44;ad5592r&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-b0b2f2243ff9a854f151"></a> <span id="dt-4e9ead0e861b67997dec"><code>&#34;spi&#45;cpol&#34;</code></span>
>
> <a id="dt-f985d6aaa3f73a650205"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-0b56c96a40292905ded0"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-1500813fb91ef03bb8b1"></a>
> >
> > **<code>spi&#45;cpol</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<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-e92215bd3c2f5373b164"></a>

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

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

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

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

<div id="dt-d711171723445bcfcfce">
<p style="white-space: pre-wrap">Child node to describe a channel</p>
</div>

<a id="dt-23112529dd9e796c0713"></a>

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

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

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-9f0766dbc3a7ac27c16a"><code>7</code></span>

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

**<code>adi&#44;mode</code> — required here**

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

**Allowed values (<code>enum</code>):** <a id="dt-3361062c61e732c10f77"></a> <span id="dt-47afa8f10e250ca048d9"><code>0</code></span>, <span id="dt-cf937eae646e33057e36"><code>1</code></span>, <span id="dt-53c66d582c4ee7bd1374"><code>2</code></span>, <span id="dt-0b2275cf5bd4e5c74c53"><code>3</code></span>, <span id="dt-1ed06867e536ddef2f88"><code>8</code></span>

<div id="dt-449210de1a54db6e11dd">
<p style="white-space: pre-wrap">Mode or function of this channel.
Macros specifying the valid values can be found in
&lt;dt-bindings/iio/adi,ad5592r.h&gt;.</p>
<pre><code>The following values are currently supported:
* CH_MODE_UNUSED (the pin is unused)
* CH_MODE_ADC (the pin is ADC input)
* CH_MODE_DAC (the pin is DAC output)
* CH_MODE_DAC_AND_ADC (the pin is DAC output but can be monitored
  by an ADC, since there is no disadvantage this should be
  considered as the preferred DAC mode)
* CH_MODE_GPIO (the pin is registered with GPIOLIB)</code></pre>
</div>

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-0e4227212b0ae19bf57b"></a> <span id="dt-103b6a88a57b9ca711ad"><code>0</code></span>, <span id="dt-9f7fbe9c1d49d2842087"><code>1</code></span>, <span id="dt-e03dbdf6aea003fafdf4"><code>2</code></span>, <span id="dt-a0dccdcc254b7df9385a"><code>3</code></span>

<div id="dt-32734b7e9b985b847419">
<p style="white-space: pre-wrap">State of this channel when unused or the device gets removed.
Macros specifying the  valid values can be found in
&lt;dt-bindings/iio/adi,ad5592r.h&gt;.
* CH_OFFSTATE_PULLDOWN (the pin is pulled down)
* CH_OFFSTATE_OUT_LOW  (the pin is output low)
* CH_OFFSTATE_OUT_HIGH (the pin is output high)
* CH_OFFSTATE_OUT_TRISTATE (the pin is tristated output)</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-03fb8496f0e3137869b4"></a> <span id="dt-a4fdf01e3d7d5fb55bfe"><code>&#34;reg&#34;</code></span>, <span id="dt-a5bc127dfa1388137884"><code>&#34;adi&#44;mode&#34;</code></span>

<a id="dt-72b9ed7c03ce7d6f0119"></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">#include &lt;dt-bindings/iio/adi,ad5592r.h&gt;
spi {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    addac@0 {
        compatible = "adi,ad5592r";
        #size-cells = &lt;0&gt;;
        #address-cells = &lt;1&gt;;
        #gpio-cells = &lt;2&gt;;
        reg = &lt;0&gt;;

        spi-max-frequency = &lt;1000000&gt;;
        spi-cpol;

        vref-supply = &lt;&amp;vref&gt;;
        reset-gpios = &lt;&amp;gpio0 86 0&gt;;
        gpio-controller;

        channel@0 {
            reg = &lt;0&gt;;
            adi,mode = &lt;CH_MODE_DAC&gt;;
        };
        channel@1 {
            reg = &lt;1&gt;;
            adi,mode = &lt;CH_MODE_ADC&gt;;
        };
        channel@2 {
            reg = &lt;2&gt;;
            adi,mode = &lt;CH_MODE_DAC_AND_ADC&gt;;
        };
        channel@3 {
            reg = &lt;3&gt;;
            adi,mode = &lt;CH_MODE_DAC_AND_ADC&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@4 {
            reg = &lt;4&gt;;
            adi,mode = &lt;CH_MODE_UNUSED&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@5 {
            reg = &lt;5&gt;;
            adi,mode = &lt;CH_MODE_GPIO&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@6 {
            reg = &lt;6&gt;;
            adi,mode = &lt;CH_MODE_GPIO&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@7 {
            reg = &lt;7&gt;;
            adi,mode = &lt;CH_MODE_GPIO&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
    };
    ad5593r@10 {
        compatible = "adi,ad5593r";
        #size-cells = &lt;0&gt;;
        #address-cells = &lt;1&gt;;
        #gpio-cells = &lt;2&gt;;
        reg = &lt;0x10&gt;;
        gpio-controller;

        channel@0 {
            reg = &lt;0&gt;;
            adi,mode = &lt;CH_MODE_DAC&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@1 {
            reg = &lt;1&gt;;
            adi,mode = &lt;CH_MODE_ADC&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@2 {
            reg = &lt;2&gt;;
            adi,mode = &lt;CH_MODE_DAC_AND_ADC&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&gt;;
        };
        channel@6 {
            reg = &lt;6&gt;;
            adi,mode = &lt;CH_MODE_GPIO&gt;;
            adi,off-state = &lt;CH_OFFSTATE_PULLDOWN&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 OR BSD-2-Clause)</span></p>

</details>
