# Samsung Midas audio complex with WM1811 codec

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

> Device-tree binding reference for Samsung Midas audio complex with WM1811 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;samsung&#44;midas&#45;audio&#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;Sylwester Nawrocki &#60;s&#46;nawrocki&#64;samsung&#46;com&#62;&#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>sound&#45;card&#45;common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/sound-card-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;samsung&#44;midas&#45;audio&#34;</code></span>

<a id="dt-04b422a940a732dc566a"></a>

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

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

<a id="dt-512ea5fe7417e34aff51"></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-04b86380754f3d28fabf"></a>

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

<a id="dt-83919e46621447566035"></a>

**<code>sound&#45;dai</code> — required here**

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

<div id="dt-8fc1c495f8b37577e338">
<p style="white-space: pre-wrap">phandle to the I2S controller</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-2bf5668c4f369cbc9896"></a> <span id="dt-2417fd65df7d98fbe891"><code>&#34;sound&#45;dai&#34;</code></span>

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

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

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

<a id="dt-b99d5f0fdb9f9922c358"></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-689bd98d988b5ce4bf07"></a>

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

<a id="dt-8906a371a28515f3547c"></a>

**<code>sound&#45;dai</code> — required here**

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

<div id="dt-7822b5a12827e0159859">
<p style="white-space: pre-wrap">phandle to the WM1811 CODEC</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-e7a1a1ce11b5da6da8bf"></a> <span id="dt-06b87627922e020727a4"><code>&#34;sound&#45;dai&#34;</code></span>

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

### <code>samsung&#44;audio&#45;routing</code> — not listed as required here

**Deprecated (<code>deprecated</code>):** <span id="dt-f900bd58ade74efdf119"><code>true</code></span>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-42794ecb4a073f8d31cf">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;non&#45;unique&#45;string&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-493f5d03b14b15ff7558>)</span>

<div id="dt-01d254f31e597787718a">
<p style="white-space: pre-wrap">List of the connections between audio components; each entry is
a pair of strings, the first being the connection's sink, the second
being the connection's source; valid names for sources and sinks are
the WM1811's pins (as documented in its binding), and the jacks
on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
Deprecated, use audio-routing.</p>
</div>

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

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

<div id="dt-f302720bbd4deda7f4a2">
<p style="white-space: pre-wrap">Supply for the micbias on the Main microphone</p>
</div>

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

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

<div id="dt-fa9f5bbe376c35cbe022">
<p style="white-space: pre-wrap">Supply for the micbias on the Sub microphone</p>
</div>

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

### <code>headset&#45;mic&#45;bias&#45;supply</code> — not listed as required here

<div id="dt-36826fdfa5dded1ff4f9">
<p style="white-space: pre-wrap">Supply for the micbias on the Headset microphone</p>
</div>

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

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

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

<div id="dt-662ff70f1bf70d283e3c">
<p style="white-space: pre-wrap">GPIO pin for FM selection</p>
</div>

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

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

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

<div id="dt-4aff2f5b428c457c668c">
<p style="white-space: pre-wrap">GPIO pin for line out selection</p>
</div>

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

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

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

<div id="dt-8cd3d620efbaabe59717">
<p style="white-space: pre-wrap">GPIO for detection of headset insertion</p>
</div>

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

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

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

<div id="dt-26683eaf64ed355a0fe3">
<p style="white-space: pre-wrap">GPIO for detection of headset key press</p>
</div>

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

### <code>io&#45;channels</code> — not listed as required here

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

<div id="dt-00f0389e57ab952e1ac1">
<p style="white-space: pre-wrap">IO channel to read micbias voltage for headset detection</p>
</div>

<a id="dt-52503acc5d03431d5405"></a>

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

**Exact value (<code>const</code>):** <span id="dt-27bb6bb6712fac2e8172"><code>&#34;headset&#45;detect&#34;</code></span>

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

### <code>samsung&#44;headset&#45;4pole&#45;threshold&#45;microvolt</code> — not listed as required here

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

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

<div id="dt-3e1d5fb346330f1e6b01">
<p style="white-space: pre-wrap">Array containing minimum and maximum IO channel value for 4-pole (with microphone/button) headsets. If the IO channel value is outside of this range, a 3-pole headset is assumed.</p>
</div>

<a id="dt-32ff21a47d9d89f9c17a"></a>

### <code>samsung&#44;headset&#45;button&#45;threshold&#45;microvolt</code> — not listed as required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-fe98433077e8ffd0aabd"><code>3</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-463b79a2bccec631a803"><code>3</code></span>

<div id="dt-3d94205ca7ad062559c8">
<p style="white-space: pre-wrap">Array of minimum (inclusive) IO channel values for headset button
detection, in order: "Media", "Volume Up" and "Volume Down".</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;cpu&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;codec&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;audio&#45;routing&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;mic&#45;bias&#45;supply&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;submic&#45;bias&#45;supply&#34;</code></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;

sound {
    compatible = "samsung,midas-audio";
    model = "Midas";

    fm-sel-gpios = &lt;&amp;gpaa0 3 GPIO_ACTIVE_HIGH&gt;;

    mic-bias-supply = &lt;&amp;mic_bias_reg&gt;;
    submic-bias-supply = &lt;&amp;submic_bias_reg&gt;;

    audio-routing =
            "HP", "HPOUT1L",
            "HP", "HPOUT1R",

            "SPK", "SPKOUTLN",
            "SPK", "SPKOUTLP",
            "SPK", "SPKOUTRN",
            "SPK", "SPKOUTRP",

            "RCV", "HPOUT2N",
            "RCV", "HPOUT2P",

            "IN1LP", "Main Mic",
            "IN1LN", "Main Mic",
            "IN1RP", "Sub Mic",
            "IN1LP", "Sub Mic";

    cpu {
        sound-dai = &lt;&amp;i2s0&gt;;
    };

    codec {
        sound-dai = &lt;&amp;wm1811&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>
