# SiFive Core Local Interruptor

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

> Device-tree binding reference for SiFive Core Local Interruptor.

<!-- 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;timer&#47;sifive&#44;clint&#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;Palmer Dabbelt &#60;palmer&#64;dabbelt&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Anup Patel &#60;anup&#46;patel&#64;wdc&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">SiFive (and other RISC-V) SOCs include an implementation of the SiFive Core Local Interruptor (CLINT) for M-mode timer and M-mode inter-processor interrupts. It directly connects to the timer and inter-processor interrupt lines of various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local interrupt controller is the parent interrupt controller for CLINT device. The clock frequency of CLINT is specified via "timebase-frequency" DT property of "/cpus" DT node. The "timebase-frequency" DT property is described in Documentation/devicetree/bindings/riscv/cpus.yaml
T-Head C906/C910 CPU cores include an implementation of CLINT too, however their implementation lacks a memory-mapped MTIME register, thus not compatible with SiFive ones.</p>
</div>

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

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

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

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

<a id="dt-39566f01414e34c67b85"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

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

**Rule 1**

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-3b212051dcd0fc641cd8"></a> <span id="dt-bd6e6716d05ec45653db"><code>&#34;canaan&#44;k210&#45;clint&#34;</code></span>, <span id="dt-3e7fb897881b12f43f81"><code>&#34;eswin&#44;eic7700&#45;clint&#34;</code></span>, <span id="dt-b7d19de74fd35364d49f"><code>&#34;sifive&#44;fu540&#45;c000&#45;clint&#34;</code></span>, <span id="dt-6cbdeefc52e7132bc62c"><code>&#34;spacemit&#44;k1&#45;clint&#34;</code></span>, <span id="dt-fd88adda17227ca32776"><code>&#34;spacemit&#44;k3&#45;clint&#34;</code></span>, <span id="dt-f0dfbb755d86acc4c265"><code>&#34;starfive&#44;jh7100&#45;clint&#34;</code></span>, <span id="dt-fd90c4a6b4c12fdce245"><code>&#34;starfive&#44;jh7110&#45;clint&#34;</code></span>, <span id="dt-e2dcb0e367ca5c3b7bca"><code>&#34;starfive&#44;jh8100&#45;clint&#34;</code></span>, <span id="dt-8f172ba5f5ba57694b17"><code>&#34;tenstorrent&#44;blackhole&#45;clint&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;sifive&#44;clint0&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> <a id="dt-4c3e118873fbaedb5de2"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b02d8860067795c00ae4"></a>
>
> **Item 1**
>
> > This rule adds no constraints.
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;sifive&#44;clint2&#34;</code></span>
>
> <div id="dt-4b64ce44adfe069638c4">
> <p style="white-space: pre-wrap">SiFive CLINT v2 is the HRT that supports the Zicntr. The control of sifive,clint2 differs from that of sifive,clint0, making them incompatible.</p>
> </div>

<a id="dt-39cb5b72c94e12bd53ea"></a>

**Rule 3**

> <a id="dt-e626d61e9d5d76cc48f9"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-6b46935eab08de6d1f0a"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-9d5b9f6fd2f9759f6e43"></a> <span id="dt-73fb2f4b762df7b35870"><code>&#34;allwinner&#44;sun20i&#45;d1&#45;clint&#34;</code></span>, <span id="dt-4f2dd487e4b2e6e79827"><code>&#34;sophgo&#44;cv1800b&#45;clint&#34;</code></span>, <span id="dt-dba59cbb664a09df0380"><code>&#34;sophgo&#44;cv1812h&#45;clint&#34;</code></span>, <span id="dt-7337bb6973adc8f5010d"><code>&#34;sophgo&#44;sg2002&#45;clint&#34;</code></span>, <span id="dt-2a4824de128057522b89"><code>&#34;thead&#44;th1520&#45;clint&#34;</code></span>
>
> <a id="dt-5ea82ea034747ba6da29"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-e9c55cb91230c7ee5a28"><code>&#34;thead&#44;c900&#45;clint&#34;</code></span>

<a id="dt-61219c29f99de6d21702"></a>

**Rule 4**

> <a id="dt-a1b1c435b08c85ff96c7"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-4758c8f9c99bfa28b10c"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-4c3894ced8f7125f7050"><code>&#34;sifive&#44;clint0&#34;</code></span>
>
> <a id="dt-c99d921c49bf15e79633"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-9e0f2ef968dd632f09b7"><code>&#34;riscv&#44;clint0&#34;</code></span>
>
> **Deprecated (<code>deprecated</code>):** <span id="dt-ba05b6c8f32e17e92b62"><code>true</code></span>
>
> <div id="dt-2e7dbd5da540c0c7ff41">
> <p style="white-space: pre-wrap">For the QEMU virt machine only</p>
> </div>

<div id="dt-e84064a2d568e9bcb9c3">
<p style="white-space: pre-wrap">Should be "&lt;vendor&gt;,&lt;chip&gt;-clint", followed by "sifive,clint&lt;version&gt;" when compatible with a SiFive CLINT.  Please refer to sifive-blocks-ip-versioning.txt for details regarding the latter.</p>
</div>

<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-bb6bf440c9aa134fafb2"></a>

### <code>interrupts&#45;extended</code> — required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-17ac127356ee8de84b32"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-0fa45bd7e7f39b9405fc"><code>4095</code></span>

<a id="dt-21b91e6b837f96ab43e0"></a>

### <code>sifive&#44;fine&#45;ctr&#45;bits</code> — not listed as required here

**Maximum value (<code>maximum</code>):** <span id="dt-9a6534d1d403388577f5"><code>15</code></span>

<div id="dt-dfe406612604d8e6e668">
<p style="white-space: pre-wrap">The width in bits of the fine counter.</p>
</div>

<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;sifive&#44;clint2&#34;</code></span>

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

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

> **Required in this object (<code>required</code>):** <a id="dt-824165741bab07e919e7"></a> <span id="dt-0be16f81402541b26aff"><code>&#34;sifive&#44;fine&#45;ctr&#45;bits&#34;</code></span>

<a id="dt-6f6ab6f7f4b3f2f2f0a8"></a>

## When the condition does not match (<code>else</code>)

> <a id="dt-cf075a4b84ee9b101feb"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-694c5d9149d23dccda6f"></a>
>
> #### <code>sifive&#44;fine&#45;ctr&#45;bits</code> — not listed as required here
>
> <code>false</code> — Not permitted by this property rule.

<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.

**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;interrupts&#45;extended&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">timer@2000000 {
  compatible = "sifive,fu540-c000-clint", "sifive,clint0";
  interrupts-extended = &lt;&amp;cpu1intc 3&gt;, &lt;&amp;cpu1intc 7&gt;,
                        &lt;&amp;cpu2intc 3&gt;, &lt;&amp;cpu2intc 7&gt;,
                        &lt;&amp;cpu3intc 3&gt;, &lt;&amp;cpu3intc 7&gt;,
                        &lt;&amp;cpu4intc 3&gt;, &lt;&amp;cpu4intc 7&gt;;
  reg = &lt;0x2000000 0x10000&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>

<p id="dt-comment-1"><strong>Line 32:</strong> <span> Canaan Kendryte K210</span></p>

<p id="dt-comment-2"><strong>Line 33:</strong> <span> ESWIN EIC7700</span></p>

<p id="dt-comment-3"><strong>Line 34:</strong> <span> SiFive FU540</span></p>

<p id="dt-comment-4"><strong>Line 35:</strong> <span> SpacemiT K1</span></p>

<p id="dt-comment-5"><strong>Line 36:</strong> <span> SpacemiT K3</span></p>

<p id="dt-comment-6"><strong>Line 37:</strong> <span> StarFive JH7100</span></p>

<p id="dt-comment-7"><strong>Line 38:</strong> <span> StarFive JH7110</span></p>

<p id="dt-comment-8"><strong>Line 39:</strong> <span> StarFive JH8100</span></p>

<p id="dt-comment-9"><strong>Line 40:</strong> <span> Tenstorrent Blackhole</span></p>

<p id="dt-comment-10"><strong>Line 41:</strong> <span> SiFive CLINT v0 IP block</span></p>

<p id="dt-comment-11"><strong>Line 44:</strong> <span> SiFive CLINT v2 IP block</span></p>

</details>
