blob: ef5fbe9a77c7da8007ba8c60bfcd68d74d092cde [file] [log] [blame]
Marc Zyngier00752422012-01-19 13:53:50 +00001* ARM architected timer
2
Stephen Boydd53ef114c2013-07-18 16:59:29 -07003ARM cores may have a per-core architected timer, which provides per-cpu timers,
4or a memory mapped architected timer, which provides up to 8 frames with a
5physical and optional virtual timer per frame.
Marc Zyngier00752422012-01-19 13:53:50 +00006
Stephen Boydd53ef114c2013-07-18 16:59:29 -07007The per-core architected timer is attached to a GIC to deliver its
8per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
9to deliver its interrupts via SPIs.
Marc Zyngier00752422012-01-19 13:53:50 +000010
Stephen Boydd53ef114c2013-07-18 16:59:29 -070011** CP15 Timer node properties:
Marc Zyngier00752422012-01-19 13:53:50 +000012
Mark Rutlandc2b01e02012-11-20 11:44:15 +000013- compatible : Should at least contain one of
14 "arm,armv7-timer"
15 "arm,armv8-timer"
Marc Zyngier00752422012-01-19 13:53:50 +000016
17- interrupts : Interrupt list for secure, non-secure, virtual and
18 hypervisor timers, in that order.
19
Mark Rutland4155fc02015-03-20 17:57:47 +000020- clock-frequency : The frequency of the main counter, in Hz. Should be present
21 only where necessary to work around broken firmware which does not configure
22 CNTFRQ on all CPUs to a uniform correct value. Use of this property is
23 strongly discouraged; fix your firmware unless absolutely impossible.
Marc Zyngier00752422012-01-19 13:53:50 +000024
Lorenzo Pieralisi82a561942014-04-08 10:04:32 +010025- always-on : a boolean property. If present, the timer is powered through an
26 always-on power domain, therefore it never loses context.
27
Scott Wood22e43392016-09-22 03:35:15 -050028- fsl,erratum-a008585 : A boolean property. Indicates the presence of
29 QorIQ erratum A-008585, which says that reading the counter is
30 unreliable unless the same value is returned by back-to-back reads.
31 This also affects writes to the tval register, due to the implicit
32 counter read.
33
Doug Anderson65b57322014-10-08 00:33:47 -070034** Optional properties:
35
36- arm,cpu-registers-not-fw-configured : Firmware does not initialize
37 any of the generic timer CPU registers, which contain their
38 architecturally-defined reset values. Only supported for 32-bit
39 systems which follow the ARMv7 architected reset values.
40
41
Marc Zyngier00752422012-01-19 13:53:50 +000042Example:
43
44 timer {
45 compatible = "arm,cortex-a15-timer",
46 "arm,armv7-timer";
47 interrupts = <1 13 0xf08>,
48 <1 14 0xf08>,
49 <1 11 0xf08>,
50 <1 10 0xf08>;
51 clock-frequency = <100000000>;
52 };
Stephen Boydd53ef114c2013-07-18 16:59:29 -070053
54** Memory mapped timer node properties:
55
56- compatible : Should at least contain "arm,armv7-timer-mem".
57
Mark Rutland4155fc02015-03-20 17:57:47 +000058- clock-frequency : The frequency of the main counter, in Hz. Should be present
59 only when firmware has not configured the MMIO CNTFRQ registers.
Stephen Boydd53ef114c2013-07-18 16:59:29 -070060
61- reg : The control frame base address.
62
63Note that #address-cells, #size-cells, and ranges shall be present to ensure
64the CPU can address a frame's registers.
65
66A timer node has up to 8 frame sub-nodes, each with the following properties:
67
68- frame-number: 0 to 7.
69
70- interrupts : Interrupt list for physical and virtual timers in that order.
71 The virtual timer interrupt is optional.
72
73- reg : The first and second view base addresses in that order. The second view
74 base address is optional.
75
76- status : "disabled" indicates the frame is not available for use. Optional.
77
78Example:
79
80 timer@f0000000 {
81 compatible = "arm,armv7-timer-mem";
82 #address-cells = <1>;
83 #size-cells = <1>;
84 ranges;
85 reg = <0xf0000000 0x1000>;
86 clock-frequency = <50000000>;
87
88 frame@f0001000 {
89 frame-number = <0>
90 interrupts = <0 13 0x8>,
91 <0 14 0x8>;
92 reg = <0xf0001000 0x1000>,
93 <0xf0002000 0x1000>;
94 };
95
96 frame@f0003000 {
97 frame-number = <1>
98 interrupts = <0 15 0x8>;
99 reg = <0xf0003000 0x1000>;
100 status = "disabled";
101 };
102 };