# Realtek rt5682s codec

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

> Device-tree binding reference for Realtek rt5682s codec.

<!-- 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;sound&#47;realtek&#44;rt5682s&#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;Derek Fang &#60;derek&#46;fang&#64;realtek&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Rt5682s(ALC5682I-VS) is a rt5682i variant which supports I2C only.</p>
</div>

<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>dai&#45;common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/dai-common.md#dt-root>)</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;realtek&#44;rt5682s&#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>

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">I2C address of the device.</p>
</div>

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">The CODEC's interrupt output.</p>
</div>

<a id="dt-07f1d08db18a51c75d73"></a>

### <code>realtek&#44;dmic1&#45;data&#45;pin</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ea5f0749f7d6321689cd">[<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-2c2bd5a925c98d0d7673"></a> <span id="dt-c9f52067c54192dd746e"><code>0</code></span>, <span id="dt-7ea2049f9985fbb9dbe4"><code>1</code></span>, <span id="dt-9ceb19c9e84660d08d18"><code>2</code></span>

<div id="dt-20a529d6af09c9ca8d58">
<p style="white-space: pre-wrap">Specify which GPIO pin be used as DMIC1 data pin.</p>
</div>

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

### <code>realtek&#44;dmic1&#45;clk&#45;pin</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0afea6819c42627eda78">[<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-efd8c98852f08610b843"></a> <span id="dt-df8ddfa0ec646eea3acf"><code>0</code></span>, <span id="dt-fbb7c5075e6c4524cbb2"><code>1</code></span>, <span id="dt-a7e2a441f3503e7e0bb9"><code>2</code></span>

<div id="dt-71c46a533b7bafd61c47">
<p style="white-space: pre-wrap">Specify which GPIO pin be used as DMIC1 clk pin.</p>
</div>

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

### <code>realtek&#44;jd&#45;src</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-227141f0f9dd65e056f2">[<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-5f539729be2423e9164a"></a> <span id="dt-b64a879b2d62a82caffa"><code>0</code></span>, <span id="dt-816eb94a75b6e79bb5e6"><code>1</code></span>

<div id="dt-d6a7bd857bb4e4f1806e">
<p style="white-space: pre-wrap">Specify which JD source be used.</p>
</div>

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

### <code>realtek&#44;ldo1&#45;en&#45;gpios</code> — not listed as required here

<div id="dt-9142df446c8d42cf7680">
<p style="white-space: pre-wrap">The GPIO that controls the CODEC's LDO1_EN pin.</p>
</div>

<a id="dt-16eca591d12c8f2c365f"></a>

### <code>realtek&#44;dmic&#45;clk&#45;rate&#45;hz</code> — not listed as required here

<div id="dt-cd4affdfea3b87d98d6e">
<p style="white-space: pre-wrap">Set the clock rate (hz) for the requirement of the particular DMIC.</p>
</div>

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

### <code>realtek&#44;dmic&#45;delay&#45;ms</code> — not listed as required here

<div id="dt-9983acca6889b14a55bc">
<p style="white-space: pre-wrap">Set the delay time (ms) for the requirement of the particular DMIC.</p>
</div>

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

### <code>realtek&#44;amic&#45;delay&#45;ms</code> — not listed as required here

<div id="dt-446f62c67e06a1436161">
<p style="white-space: pre-wrap">Set the delay time (ms) for the requirement of the particular platform or AMIC.</p>
</div>

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

### <code>realtek&#44;dmic&#45;clk&#45;driving&#45;high</code> — not listed as required here

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

<div id="dt-1352fd2125a2c11a2a82">
<p style="white-space: pre-wrap">Set the high driving of the DMIC clock out.</p>
</div>

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

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

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">phandle and clock specifier for codec MCLK.</p>
> </div>

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — not listed as required here

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;mclk&#34;</code></span>

<a id="dt-7471877b51a93881192b"></a>

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

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

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

### <code>clock&#45;output&#45;names</code> — not listed as required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-425996d2e9b5a3acdc67"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-48bdbc8ce79b7a10c6b6"><code>2</code></span>

<div id="dt-1944bc0b47114a0d6f2d">
<p style="white-space: pre-wrap">Name given for DAI word clock and bit clock outputs.</p>
</div>

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

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

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

<a id="dt-108e4e3fba989bd6d0af"></a>

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

<div id="dt-89e7094c99037fa76d27">
<p style="white-space: pre-wrap">Regulator supplying analog power through the AVDD pin.</p>
</div>

<a id="dt-90c8e6ce8abd8198a2ee"></a>

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

<div id="dt-34bfdf642bcd3dd0f0a7">
<p style="white-space: pre-wrap">Regulator supplying power for the microphone bias through the MICVDD pin.</p>
</div>

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

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

<div id="dt-da8631045899fc03bff5">
<p style="white-space: pre-wrap">Regulator supplying I/O power through the DBVDD pin.</p>
</div>

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

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

<div id="dt-6964f16cbf4ea30f1bc0">
<p style="white-space: pre-wrap">Regulator supplying power to the digital core and charge pump through the LDO1_IN pin.</p>
</div>

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

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

**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;AVDD&#45;supply&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;MICVDD&#45;supply&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;DBVDD&#45;supply&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;LDO1&#45;IN&#45;supply&#34;</code></span>

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

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

    codec@1a {
        compatible = "realtek,rt5682s";
        reg = &lt;0x1a&gt;;
        interrupts = &lt;6 IRQ_TYPE_LEVEL_HIGH&gt;;
        realtek,ldo1-en-gpios =
            &lt;&amp;gpio 2 GPIO_ACTIVE_HIGH&gt;;
        realtek,dmic1-data-pin = &lt;1&gt;;
        realtek,dmic1-clk-pin = &lt;1&gt;;
        realtek,jd-src = &lt;1&gt;;

        #clock-cells = &lt;1&gt;;
        clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";

        clocks = &lt;&amp;osc&gt;;
        clock-names = "mclk";

        AVDD-supply = &lt;&amp;avdd_reg&gt;;
        MICVDD-supply = &lt;&amp;micvdd_reg&gt;;
        DBVDD-supply = &lt;&amp;dbvdd_reg&gt;;
        LDO1-IN-supply = &lt;&amp;ldo1_in_reg&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 33:</strong> <span> dmic1 data is not used</span></p>

<p id="dt-comment-2"><strong>Line 34:</strong> <span> using GPIO2 pin as dmic1 data pin</span></p>

<p id="dt-comment-3"><strong>Line 35:</strong> <span> using GPIO5 pin as dmic1 data pin</span></p>

<p id="dt-comment-4"><strong>Line 42:</strong> <span> dmic1 clk is not used</span></p>

<p id="dt-comment-5"><strong>Line 43:</strong> <span> using GPIO1 pin as dmic1 clock pin</span></p>

<p id="dt-comment-6"><strong>Line 44:</strong> <span> using GPIO3 pin as dmic1 clock pin</span></p>

<p id="dt-comment-7"><strong>Line 51:</strong> <span> No JD is used</span></p>

<p id="dt-comment-8"><strong>Line 52:</strong> <span> using JD1 as JD source</span></p>

</details>
