# Wolfson WM8960 audio codec

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

> Device-tree binding reference for Wolfson WM8960 audio 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;wlf&#44;wm8960&#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;patches&#64;opensource&#46;cirrus&#46;com&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Wolfson WM8960 audio codec</p>
<p style="white-space: pre-wrap">Pins on the device (for linking into audio routes):</p>
<pre><code>  Outputs:
    * HP_L    : Left Headphone/Line Output
    * HP_R    : Right Headphone/Line Output
    * SPK_LP  : Left Speaker Output (Positive)
    * SPK_LN  : Left Speaker Output (Negative)
    * SPK_RP  : Right Speaker Output (Positive)
    * SPK_RN  : Right Speaker Output (Negative)
    * OUT3    : Mono, Left, Right or buffered midrail output for capless mode</code></pre>
<pre><code>  Inputs:
    * LINPUT1 : Left single-ended or negative differential microphone input
    * RINPUT1 : Right single-ended or negative differential microphone input
    * LINPUT2 : Left line input or positive differential microphone input
    * RINPUT2 : Right line input or positive differential microphone input
    * LINPUT3 : Left line input, positive differential microphone, or Jack Detect 2
    * RINPUT3 : Right line input, positive differential microphone, or Jack Detect 3</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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;wlf&#44;wm8960&#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-4e9a371963ac013ad39d"></a>

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

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

<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-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>0</code></span>

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

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

<div id="dt-89e7094c99037fa76d27">
<p style="white-space: pre-wrap">Analogue supply.</p>
</div>

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

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

<div id="dt-da8631045899fc03bff5">
<p style="white-space: pre-wrap">Digital Buffer Supply.</p>
</div>

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

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

<div id="dt-c74a4be16d81d6c4e145">
<p style="white-space: pre-wrap">Digital Core Supply.</p>
</div>

<a id="dt-60a31cfa6f6a94257956"></a>

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

<div id="dt-881a46d48160228ce981">
<p style="white-space: pre-wrap">Supply for speaker drivers 1.</p>
</div>

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

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

<div id="dt-96ebb001a12f8cb599b2">
<p style="white-space: pre-wrap">Supply for speaker drivers 2.</p>
</div>

<a id="dt-94f7c7d2349275fe517c"></a>

### <code>wlf&#44;capless</code> — not listed as required here

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

<div id="dt-bbaf3bc8996dca1ffd38">
<p style="white-space: pre-wrap">If present, OUT3 pin will be enabled and disabled together with HP_L and HP_R pins in response to jack detect events.</p>
</div>

<a id="dt-377a0729efe1531e7ae9"></a>

### <code>wlf&#44;gpio&#45;cfg</code> — not listed as required here

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

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

<div id="dt-b5e93fd1a83d13e09e00">
<p style="white-space: pre-wrap">A list of GPIO configuration register values.
 - gpio-cfg[0]: ALRCGPIO of R9 (Audio interface)
 - gpio-cfg[1]: {GPIOPOL:GPIOSEL[2:0]} of R48 (Additional Control 4).</p>
</div>

<a id="dt-852256d1fb52c5bab0c7"></a>

### <code>wlf&#44;hp&#45;cfg</code> — not listed as required here

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

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

<div id="dt-d57b74da3e3966567a55">
<p style="white-space: pre-wrap">A list of headphone jack detect configuration register values:
 - hp-cfg[0]: HPSEL[1:0] of R48 (Additional Control 4).
 - hp-cfg[1]: {HPSWEN:HPSWPOL} of R24 (Additional Control 2).
 - hp-cfg[2]: {TOCLKSEL:TOEN} of R23 (Additional Control 1).</p>
</div>

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

### <code>wlf&#44;shared&#45;lrclk</code> — not listed as required here

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

<div id="dt-6d29b75fa1098da65190">
<p style="white-space: pre-wrap">If present, the LRCM bit of R24 (Additional control 2) gets set, indicating that ADCLRC and DACLRC pins will be disabled only when ADC (Left and Right) and DAC (Left and Right) are disabled. When WM8960 works on synchronize mode and DACLRC pin is used to supply frame clock, it will no frame clock for captrue unless enable DAC to enable DACLRC pin. If shared-lrclk is present, no need to enable DAC for captrue.</p>
</div>

<a id="dt-1d845f0617b4072cef77"></a>

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1ed24d3512fbe8ce2017">[<code>audio&#45;graph&#45;port&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/audio-graph-port.md#dt-root>)</span>

<a id="dt-a216b653a8bb94beac4f"></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>

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

    audio-codec@1a {
        compatible = "wlf,wm8960";
        reg = &lt;0x1a&gt;;
        clocks = &lt;&amp;clks 0&gt;;
        clock-names = "mclk";
        #sound-dai-cells = &lt;0&gt;;
        wlf,hp-cfg = &lt;3 2 3&gt;;
        wlf,gpio-cfg = &lt;1 3&gt;;
        wlf,shared-lrclk;
        DCVDD-supply = &lt;&amp;reg_audio&gt;;
        DBVDD-supply = &lt;&amp;reg_audio&gt;;
        AVDD-supply = &lt;&amp;reg_audio&gt;;
        SPKVDD1-supply = &lt;&amp;reg_audio&gt;;
        SPKVDD2-supply = &lt;&amp;reg_audio&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>
