# ARM memory mapped architected timer

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

> Device-tree binding reference for ARM memory mapped 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&#95;mmio&#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 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 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-cc3709943397035582d2"></a>

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

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

**Item 1**

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;arm&#44;armv7&#45;timer&#45;mem&#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 control frame base address</p>
</div>

<a id="dt-2efe70314a961a652abe"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-01d9ce7fc56f712455be"></a> <span id="dt-94d3735d14e27e2d7df1"><code>1</code></span>, <span id="dt-0dda607ef98de398e3f7"><code>2</code></span>

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

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

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>1</code></span>

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

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

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

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

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

## Properties matching a name pattern (<code>patternProperties</code>)

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

### <code>&#94;frame&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression

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

<a id="dt-cc2eed94ada83e22e09e"></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-8e880304ac8397600828">
<p style="white-space: pre-wrap">A timer node has up to 8 frame sub-nodes, each with the following properties.</p>
</div>

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

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

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

**<code>frame&#45;number</code> — required here**

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

**Minimum value (<code>minimum</code>):** <span id="dt-4800b7b4f97d0c71b5b3"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-57197bf11c74b22c1e93"><code>7</code></span>

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

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

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

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

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

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

**Item 1**

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

<a id="dt-125d6f4c824fdc901a17"></a>

**Item 2**

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

<a id="dt-44a21df543c19a1a3515"></a>

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

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

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

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

<a id="dt-86d70fca3c268cc3fdc7"></a>

**Item 1**

> <div id="dt-e09c958da04f9b5d974f">
> <p style="white-space: pre-wrap">1st view base address</p>
> </div>

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

**Item 2**

> <div id="dt-55c38077fb4f005dae72">
> <p style="white-space: pre-wrap">2nd optional view base address</p>
> </div>

**Required in this object (<code>required</code>):** <a id="dt-8e30b5159cd2986e2773"></a> <span id="dt-3ca3caccc960ed4a0ea7"><code>&#34;frame&#45;number&#34;</code></span>, <span id="dt-0160195cdda8bc8b2859"><code>&#34;interrupts&#34;</code></span>, <span id="dt-31c31f8442a1d2584a06"><code>&#34;reg&#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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;size&#45;cells&#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">timer@f0000000 {
  compatible = "arm,armv7-timer-mem";
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;1&gt;;
  ranges = &lt;0 0xf0001000 0x1000&gt;;
  reg = &lt;0xf0000000 0x1000&gt;;
  clock-frequency = &lt;50000000&gt;;

  frame@0 {
    frame-number = &lt;0&gt;;
    interrupts = &lt;0 13 0x8&gt;,
           &lt;0 14 0x8&gt;;
    reg = &lt;0x0000 0x1000&gt;,
          &lt;0x1000 0x1000&gt;;
  };

  frame@2000 {
    frame-number = &lt;1&gt;;
    interrupts = &lt;0 15 0x8&gt;;
    reg = &lt;0x2000 0x1000&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>
