# Texas Instruments divider clock

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

> Device-tree binding reference for Texas Instruments divider 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;divider&#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 It assumes a register-mapped adjustable clock rate divider
that does not gate and has only one input clock or parent.  By default the
value programmed into the register is one less than the actual divisor value.
E.g:</p>
<p style="white-space: pre-wrap">register value    actual divisor value
0                 1
1                 2
2                 3</p>
<p style="white-space: pre-wrap">This assumption may be modified by the following optional properties:</p>
<p style="white-space: pre-wrap">ti,index-starts-at-one - valid divisor values start at 1, not the default
of 0.  E.g:
register value    actual divisor value
1                 1
2                 2
3                 3</p>
<p style="white-space: pre-wrap">ti,index-power-of-two - valid divisor values are powers of two.  E.g:
register value    actual divisor value
0                 1
1                 2
2                 4</p>
<p style="white-space: pre-wrap">Additionally an array of valid dividers may be supplied like so:</p>
<p style="white-space: pre-wrap">ti,dividers = &lt;4&gt;, &lt;8&gt;, &lt;0&gt;, &lt;16&gt;;</p>
<p style="white-space: pre-wrap">Which will map the resulting values to a divisor table by their index:
register value    actual divisor value
0                 4
1                 8
2                 &lt;invalid divisor, skipped&gt;
3                 16</p>
<p style="white-space: pre-wrap">Any zero value in this array means the corresponding bit-value is invalid
and must not be used.</p>
<p style="white-space: pre-wrap">The binding must also provide the register to control the divider and
unless the divider array is provided, min and max dividers. Optionally
the number of bits to shift that mask, if necessary. If the shift value
is missing it is the same as supplying a zero shift.</p>
<p style="white-space: pre-wrap">This binding can also optionally provide support to the hardware autoidle
feature.</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>ti&#44;autoidle&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-clock/ti/ti-autoidle.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

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;ti&#44;divider&#45;clock&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;composite&#45;divider&#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

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

<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-9d9909f54aa9cbd16b30"></a>

### <code>ti&#44;dividers</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-f499695397733240b310">[<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>

<div id="dt-69c1b04e837570449c85">
<p style="white-space: pre-wrap">array of integers defining divisors</p>
</div>

<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 divider value</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-0328fd38fed3c4510304"></a>

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-194cf33c0b2d881e0fee">[<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-8fd3e00615013d07f1da">
<p style="white-space: pre-wrap">min divisor for dividing the input clock rate, only needed if the first divisor is offset from the default value (1)</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-652546ad9d7e319f8f63"><code>1</code></span>

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

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-59c39f1459e879bfd181">[<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-179c75d150b32eac0558">
<p style="white-space: pre-wrap">max divisor for dividing the input clock rate, only needed if ti,dividers is not defined.</p>
</div>

<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 divisor programming starts at 1, not zero, only valid if ti,dividers is not defined</p>
</div>

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

### <code>ti&#44;index&#45;power&#45;of&#45;two</code> — not listed as required here

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

<div id="dt-7dec12dc889adc94fcad">
<p style="white-space: pre-wrap">valid divisor programming must be a power of two, only valid if ti,dividers is not defined.</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            |</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 divider value to HW, only needed if the register compatible access requires this. As an example dra76x DPLL_GMAC H14 divider implements such behavior.</p>
</div>

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

## Rules triggered by another property (<code>dependentSchemas</code>)

<a id="dt-52ca8b79b265dfb0252f"></a>

### <code>ti&#44;dividers</code> — applies when this property is present

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

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

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

**<code>ti&#44;min&#45;div</code> — not listed as required here**

<code>false</code> — Not permitted by this property rule.

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

**<code>ti&#44;max&#45;div</code> — not listed as required here**

<code>false</code> — Not permitted by this property rule.

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

**<code>ti&#44;index&#45;power&#45;of&#45;two</code> — not listed as required here**

<code>false</code> — Not permitted by this property rule.

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

**<code>ti&#44;index&#45;starts&#45;at&#45;one</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-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">bus {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;

  clock-controller@190 {
    #clock-cells = &lt;0&gt;;
    compatible = "ti,divider-clock";
    clocks = &lt;&amp;dpll_usb_ck&gt;;
    ti,max-div = &lt;127&gt;;
    reg = &lt;0x190&gt;;
    ti,index-starts-at-one;
  };

  clock-controller@528 {
    #clock-cells = &lt;0&gt;;
    compatible = "ti,divider-clock";
    clocks = &lt;&amp;abe_clk&gt;;
    ti,bit-shift = &lt;24&gt;;
    reg = &lt;0x528&gt;;
    ti,max-div = &lt;2&gt;;
  };

  clock-controller@a40 {
    #clock-cells = &lt;0&gt;;
    compatible = "ti,composite-divider-clock";
    clocks = &lt;&amp;corex2_fck&gt;;
    ti,bit-shift = &lt;8&gt;;
    reg = &lt;0x0a40&gt;;
    ti,dividers = &lt;0&gt;, &lt;1&gt;, &lt;2&gt;, &lt;3&gt;, &lt;4&gt;, &lt;0&gt;, &lt;6&gt;, &lt;0&gt;, &lt;8&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>
