# The TI AM654x/J721E Common Platform Time Sync (CPTS) module

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

> Device-tree binding reference for The TI AM654x/J721E Common Platform Time Sync (CPTS) module.

<!-- 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;net&#47;ti&#44;k3&#45;am654&#45;cpts&#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;Siddharth Vadapalli &#60;s&#45;vadapalli&#64;ti&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Roger Quadros &#60;rogerq&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The TI AM654x/J721E CPTS module is used to facilitate host control of time
sync operations.
Main features of CPTS module are
- selection of multiple external clock sources
- Software control of time sync events via interrupt or polling
- 64-bit timestamp mode in ns with PPM and nudge adjustment.
- hardware timestamp push inputs (HWx_TS_PUSH)
- timestamp counter compare output (TS_COMP)
- timestamp counter bit output (TS_SYNC)
- periodic Generator function outputs (TS_GENFx)
- Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN)
- external hardware timestamp push inputs (HWx_TS_PUSH) timestamping</p>
<p style="white-space: pre-wrap"> Depending on integration it enables compliance with the IEEE 1588-2008
 standard for a precision clock synchronization protocol, Ethernet Enhanced
 Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time
 Measurement (PTM).</p>
<p style="white-space: pre-wrap">TI AM654x/J721E SoCs has several similar CPTS modules integrated into the
different parts of the system which could be synchronized with each other
- Main CPTS
- MCU CPSW CPTS with IEEE 1588-2008 support
- PCIe subsystem CPTS for PTM support</p>
<p style="white-space: pre-wrap">Depending on CPTS module integration and when CPTS is integral part of
another module (MCU CPSW for example) "compatible" and "reg" can
be omitted - parent module is fully responsible for CPTS enabling and
configuration.</p>
</div>

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

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

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**String pattern (<code>pattern</code>):** <span id="dt-0b2111a24a010949ece7"><code>&#34;&#94;cpts&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;&#34;</code></span>

<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;am65&#45;cpts&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;j721e&#45;cpts&#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">The physical base address and size of CPTS IO range</p>
</div>

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

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

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;cpts&#34;</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>

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">CPTS reference clock</p>
</div>

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

### <code>clock&#45;names</code> — 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;cpts&#34;</code></span>

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

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

<a id="dt-985aed94c3a5de8e946a"></a>

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

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

**Item 1**

> <div id="dt-094ee990c529b33ab668">
> <p style="white-space: pre-wrap">CPTS events interrupt</p>
> </div>

<a id="dt-8aa4fd7705c68de75d2b"></a>

### <code>interrupt&#45;names</code> — required here

<a id="dt-77e94e63ca0b20bb5ef1"></a>

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

<a id="dt-1198ecbdbe49337cf73e"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-7f7686a533ef09dda0b1"><code>&#34;cpts&#34;</code></span>

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

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

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

<a id="dt-12d2eb74181a2f7523ba"></a>

### <code>assigned&#45;clocks</code> — not listed as required here

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

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — not listed as required here

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

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

### <code>ti&#44;cpts&#45;ext&#45;ts&#45;inputs</code> — not listed as required here

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

**Maximum value (<code>maximum</code>):** <span id="dt-86711729105fae547bb3"><code>8</code></span>

<div id="dt-aaba051052391e216d1c">
<p style="white-space: pre-wrap">Number of hardware timestamp push inputs (HWx_TS_PUSH)</p>
</div>

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

### <code>ti&#44;cpts&#45;periodic&#45;outputs</code> — not listed as required here

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

**Maximum value (<code>maximum</code>):** <span id="dt-f7b2d6883a244dfdd685"><code>8</code></span>

<div id="dt-cb32eb4abf285fa40e75">
<p style="white-space: pre-wrap">Number of timestamp Generator function outputs (TS_GENFx)</p>
</div>

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

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

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

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

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

<div id="dt-b4f26ad2a2402b33c77d">
<p style="white-space: pre-wrap">The pair of HWx_TS_PUSH input and TS_GENFy output indexes used for
PPS events generation. Platform/board specific.</p>
</div>

<a id="dt-38d5c46addcc6792f5dd"></a>

### <code>refclk&#45;mux</code> — not listed as required here

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

<a id="dt-2105ce20cc4cb8e4146a"></a>

#### Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<div id="dt-49809160ccdae7a79d00">
<p style="white-space: pre-wrap">CPTS reference clock multiplexer clock</p>
</div>

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

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

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

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

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

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-5d4e1754db7434a2ccda"><code>8</code></span>

**Required in this object (<code>required</code>):** <a id="dt-9712b7c39dfca9dbc28d"></a> <span id="dt-18b814853d67cd132e9d"><code>&#34;clocks&#34;</code></span>

**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;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;interrupts&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;interrupt&#45;names&#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">#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

cpts@310d0000 {
    compatible = "ti,am65-cpts";
    reg = &lt;0x310d0000 0x400&gt;;
    reg-names = "cpts";
    clocks = &lt;&amp;main_cpts_mux&gt;;
    clock-names = "cpts";
    interrupts-extended = &lt;&amp;k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH&gt;;
    interrupt-names = "cpts";
    ti,cpts-periodic-outputs = &lt;6&gt;;
    ti,cpts-ext-ts-inputs = &lt;8&gt;;

    main_cpts_mux: refclk-mux {
        #clock-cells = &lt;0&gt;;
        clocks = &lt;&amp;k3_clks 118 5&gt;, &lt;&amp;k3_clks 118 11&gt;,
                 &lt;&amp;k3_clks 157 91&gt;, &lt;&amp;k3_clks 157 77&gt;,
                 &lt;&amp;k3_clks 157 102&gt;, &lt;&amp;k3_clks 157 80&gt;,
                 &lt;&amp;k3_clks 120 3&gt;, &lt;&amp;k3_clks 121 3&gt;;
        assigned-clocks = &lt;&amp;main_cpts_mux&gt;;
        assigned-clock-parents = &lt;&amp;k3_clks 118 11&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>
