# ARM architected timer

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

> Device-tree binding reference for ARM architected timer.

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


<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;arm&#44;arch&#95;timer&#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;Marc Zyngier &#60;marc&#46;zyngier&#64;arm&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Mark Rutland &#60;mark&#46;rutland&#64;arm&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">ARM cores may have a per-core architected timer, which provides per-cpu timers,
or a memory mapped architected timer, which provides up to 8 frames with a
physical and optional virtual timer per frame.</p>
<p style="white-space: pre-wrap">The per-core architected timer is attached to a GIC to deliver its
per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
to deliver its interrupts via SPIs.</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**
>
> > **Exact value (<code>const</code>):** <span id="dt-5deec2612224d8d915da"><code>&#34;arm&#44;cortex&#45;a15&#45;timer&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;arm&#44;armv7&#45;timer&#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**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-aa1230b5a2b80f9fb387"></a> <span id="dt-49b534c9c8948cfc8034"><code>&#34;arm&#44;armv7&#45;timer&#34;</code></span>, <span id="dt-93451931f534c9a92fb4"><code>&#34;arm&#44;armv8&#45;timer&#34;</code></span>

<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**
>
> > **Exact value (<code>const</code>):** <span id="dt-b4cf31a5f463012e1429"><code>&#34;arm&#44;armv8&#45;timer&#34;</code></span>
>
> <a id="dt-5ea82ea034747ba6da29"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-e9c55cb91230c7ee5a28"><code>&#34;arm&#44;armv7&#45;timer&#34;</code></span>

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

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

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

<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">secure timer irq</p>
> </div>

<a id="dt-14fdf3275cf454d3c593"></a>

**Item 2**

> <div id="dt-f26fcb0c97f34db34fe4">
> <p style="white-space: pre-wrap">non-secure timer irq</p>
> </div>

<a id="dt-6825e597892563d56556"></a>

**Item 3**

> <div id="dt-2c85367ad575dfda8b35">
> <p style="white-space: pre-wrap">virtual timer irq</p>
> </div>

<a id="dt-0e24ebf428e547e00816"></a>

**Item 4**

> <div id="dt-aa4f93a6c04967e709f9">
> <p style="white-space: pre-wrap">hypervisor timer irq</p>
> </div>

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

**Item 5**

> <div id="dt-69853563c80e815c6939">
> <p style="white-space: pre-wrap">hypervisor virtual timer irq</p>
> </div>

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

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

<a id="dt-7c87f4c4d6ae5b67cb69"></a>

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

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

**Rule 1**

> **Minimum number of items (<code>minItems</code>):** <span id="dt-94cb19e7c04527816242"><code>2</code></span>
>
> <a id="dt-884cf2259e7919782d91"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-ae566b1863c35904fd78"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-70b44ca6c048c5d3a3af"><code>&#34;phys&#34;</code></span>
>
> <a id="dt-d549e6d900c0ad79ba7c"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-0ea26d5a82284fddd203"><code>&#34;virt&#34;</code></span>
>
> <a id="dt-ff4970bac801c0f78f25"></a>
>
> **Item 3**
>
> > **Exact value (<code>const</code>):** <span id="dt-adb6d00832cf46adc510"><code>&#34;hyp&#45;phys&#34;</code></span>
>
> <a id="dt-7b195f49121953381547"></a>
>
> **Item 4**
>
> > **Exact value (<code>const</code>):** <span id="dt-c477d1f94709513d3f06"><code>&#34;hyp&#45;virt&#34;</code></span>

<a id="dt-49450ca309f7fa677720"></a>

**Rule 2**

> **Minimum number of items (<code>minItems</code>):** <span id="dt-3896a531ace6248bdf5a"><code>3</code></span>
>
> <a id="dt-3f5226d3358b9f7233cd"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-168695c518f0a2b5192f"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-219a5f51cbccd7444454"><code>&#34;sec&#45;phys&#34;</code></span>
>
> <a id="dt-74dea7eca44399918292"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-94b431338a76fa9ae249"><code>&#34;phys&#34;</code></span>
>
> <a id="dt-c5cfc6a5b382577118b4"></a>
>
> **Item 3**
>
> > **Exact value (<code>const</code>):** <span id="dt-6c8a800bce3050ac216d"><code>&#34;virt&#34;</code></span>
>
> <a id="dt-49e904b35cf148fa04a1"></a>
>
> **Item 4**
>
> > **Exact value (<code>const</code>):** <span id="dt-4bf52f3885a7adec6bc2"><code>&#34;hyp&#45;phys&#34;</code></span>
>
> <a id="dt-aca97ad6b05856b2ff86"></a>
>
> **Item 5**
>
> > **Exact value (<code>const</code>):** <span id="dt-dd43f1495844a45fcc37"><code>&#34;hyp&#45;virt&#34;</code></span>

<a id="dt-0298421e73bc073162cc"></a>

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

<div id="dt-a8bced0e066c3e53744b">
<p style="white-space: pre-wrap">The frequency of the main counter, in Hz. Should be present only where necessary to work around broken firmware which does not configure CNTFRQ on all CPUs to a uniform correct value. Use of this property is strongly discouraged; fix your firmware unless absolutely impossible.</p>
</div>

<a id="dt-316602e8f86fc0297a04"></a>

### <code>always&#45;on</code> — not listed as required here

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

<div id="dt-30d4a035249fd2bb8703">
<p style="white-space: pre-wrap">If present, the timer is powered through an always-on power domain, therefore it never loses context.</p>
</div>

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

### <code>allwinner&#44;erratum&#45;unknown1</code> — not listed as required here

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

<div id="dt-c3812098b6d31d947588">
<p style="white-space: pre-wrap">Indicates the presence of an erratum found in Allwinner SoCs, where reading certain values from the counter is unreliable. This also affects writes to the tval register, due to the implicit counter read.</p>
</div>

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

### <code>fsl&#44;erratum&#45;a008585</code> — not listed as required here

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

<div id="dt-d5de18da0778953dc640">
<p style="white-space: pre-wrap">Indicates the presence of QorIQ erratum A-008585, which says that reading the counter is unreliable unless the same value is returned by back-to-back reads. This also affects writes to the tval register, due to the implicit counter read.</p>
</div>

<a id="dt-90691eba792df49d663b"></a>

### <code>hisilicon&#44;erratum&#45;161010101</code> — not listed as required here

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

<div id="dt-d0437c88e7a8b1f3246c">
<p style="white-space: pre-wrap">Indicates the presence of Hisilicon erratum 161010101, which says that reading the counters is unreliable in some cases, and reads may return a value 32 beyond the correct value. This also affects writes to the tval registers, due to the implicit counter read.</p>
</div>

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

### <code>arm&#44;cpu&#45;registers&#45;not&#45;fw&#45;configured</code> — not listed as required here

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

<div id="dt-a4cfc22b42063fc1c637">
<p style="white-space: pre-wrap">Firmware does not initialize any of the generic timer CPU registers, which contain their architecturally-defined reset values. Only supported for 32-bit systems which follow the ARMv7 architected reset values.</p>
</div>

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

### <code>arm&#44;no&#45;tick&#45;in&#45;suspend</code> — not listed as required here

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

<div id="dt-7b19e5d39ce43e2266e4">
<p style="white-space: pre-wrap">The main counter does not tick when the system is in low-power system suspend on some SoCs. This behavior does not match the Architecture Reference Manual's specification that the system counter "must be implemented in an always-on power domain."</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#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-51356188806d31ca2021"></a>

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

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

### Rule 1

> **Required in this object (<code>required</code>):** <a id="dt-48cc38ffec184df79a62"></a> <span id="dt-bbd3b687ebb435349af2"><code>&#34;interrupts&#34;</code></span>

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

### Rule 2

> **Required in this object (<code>required</code>):** <a id="dt-686ce4562589647d257c"></a> <span id="dt-8060cb7221f215eec82f"><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 {
  compatible = "arm,cortex-a15-timer",
         "arm,armv7-timer";
  interrupts = &lt;1 13 0xf08&gt;,
         &lt;1 14 0xf08&gt;,
         &lt;1 11 0xf08&gt;,
         &lt;1 10 0xf08&gt;;
  clock-frequency = &lt;100000000&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</span></p>

</details>
