# Texas Instruments mux clock

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Clock bindings / ti_

> Device-tree binding reference for Texas Instruments mux clock.

<!-- SPDX-License-Identifier: GPL-2.0-only -->


<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;clock&#47;ti&#47;ti&#44;mux&#45;clock&#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;Tero Kristo &#60;kristo&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This clock assumes a register-mapped multiplexer with multiple inpt clock
signals or parents, one of which can be selected as output. This clock does
not gate or adjust the parent rate via a divider or multiplier.</p>
<p style="white-space: pre-wrap">By default the "clocks" property lists the parents in the same order
as they are programmed into the register.  E.g:</p>
<pre><code>  clocks = &lt;&amp;foo_clock&gt;, &lt;&amp;bar_clock&gt;, &lt;&amp;baz_clock&gt;;</code></pre>
<p style="white-space: pre-wrap">Results in programming the register as follows:</p>
<p style="white-space: pre-wrap">register value   selected parent clock
0                foo_clock
1                bar_clock
2                baz_clock</p>
<p style="white-space: pre-wrap">Some clock controller IPs do not allow a value of zero to be programmed
into the register, instead indexing begins at 1.  The optional property
"index-starts-at-one" modified the scheme as follows:</p>
<p style="white-space: pre-wrap">register value   selected clock parent
1                foo_clock
2                bar_clock
3                baz_clock</p>
<p style="white-space: pre-wrap">The binding must provide the register to control the mux. Optionally
the number of bits to shift the control field in the register can be
supplied. If the shift value is missing it is the same as supplying
a zero shift.</p>
</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;ti&#44;mux&#45;clock&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;composite&#45;mux&#45;clock&#34;</code></span>

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

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

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

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

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

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

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-48bdbc8ce79b7a10c6b6"><code>1</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-973e79f34917a35059a7"></a>

### <code>ti&#44;bit&#45;shift</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-c8897b27b616e5877dc0">[<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-14d915b95039ad0bff8a">
<p style="white-space: pre-wrap">Number of bits to shift the bit-mask</p>
</div>

**Maximum value (<code>maximum</code>):** <span id="dt-5744b368070531b42111"><code>31</code></span>

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

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

### <code>ti&#44;index&#45;starts&#45;at&#45;one</code> — not listed as required here

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

<div id="dt-772656932e7b34312787">
<p style="white-space: pre-wrap">Valid input select programming starts at 1, not zero</p>
</div>

<a id="dt-375cf4225571ced9ba46"></a>

### <code>ti&#44;set&#45;rate&#45;parent</code> — not listed as required here

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

<div id="dt-c15d7f632d68753644ce">
<p style="white-space: pre-wrap">clk_set_rate is propagated to parent clock, not supported by the composite-mux-clock subtype.</p>
</div>

<a id="dt-1580eb59de250e2e6029"></a>

### <code>ti&#44;latch&#45;bit</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-6e1d958acf7b7e6f3be9">[<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-dd8ab35a940ba0e5981f">
<p style="white-space: pre-wrap">Latch the mux value to HW, only needed if the register access requires this. As an example, dra7x DPLL_GMAC H14 muxing implements such behavior.</p>
</div>

**Maximum value (<code>maximum</code>):** <span id="dt-17845e477a02774683af"><code>31</code></span>

<a id="dt-158e3f6339df9dc0e448"></a>

## Condition (<code>if</code>)

> <a id="dt-0c7b6d12024f922c1b96"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-824fdc441f7c94ae56ca"></a>
>
> #### <code>compatible</code> — not listed as required here
>
> <a id="dt-8239149d6c8b0a5dabbe"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-0259836b095562054cc8"><code>&#34;ti&#44;composite&#45;mux&#45;clock&#34;</code></span>

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

## When the condition matches (<code>then</code>)

> <a id="dt-d3da345ec82b9041251c"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-0afbc1d057e7deaf1b94"></a>
>
> #### <code>ti&#44;set&#45;rate&#45;parent</code> — not listed as required here
>
> <code>false</code> — Not permitted by this property 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;&#35;clock&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;reg&#34;</code></span>

<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-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">bus {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;

  clock-controller@110 {
    compatible = "ti,mux-clock";
    reg = &lt;0x0110&gt;;
    #clock-cells = &lt;0&gt;;
    clocks = &lt;&amp;virt_12000000_ck&gt;, &lt;&amp;virt_13000000_ck&gt;, &lt;&amp;virt_16800000_ck&gt;;
    ti,index-starts-at-one;
    ti,set-rate-parent;
  };

  clock-controller@120 {
    compatible = "ti,composite-mux-clock";
    reg = &lt;0x0120&gt;;
    #clock-cells = &lt;0&gt;;
    clocks = &lt;&amp;core_96m_fck&gt;, &lt;&amp;mcbsp_clks&gt;;
    ti,bit-shift = &lt;4&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</span></p>

</details>
