xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/timer/arm,arch_timer.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: ARM architected timer
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Marc Zyngier <marc.zyngier@arm.com>
11*4882a593Smuzhiyun  - Mark Rutland <mark.rutland@arm.com>
12*4882a593Smuzhiyundescription: |+
13*4882a593Smuzhiyun  ARM cores may have a per-core architected timer, which provides per-cpu timers,
14*4882a593Smuzhiyun  or a memory mapped architected timer, which provides up to 8 frames with a
15*4882a593Smuzhiyun  physical and optional virtual timer per frame.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun  The per-core architected timer is attached to a GIC to deliver its
18*4882a593Smuzhiyun  per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
19*4882a593Smuzhiyun  to deliver its interrupts via SPIs.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunproperties:
22*4882a593Smuzhiyun  compatible:
23*4882a593Smuzhiyun    oneOf:
24*4882a593Smuzhiyun      - items:
25*4882a593Smuzhiyun          - enum:
26*4882a593Smuzhiyun              - arm,cortex-a15-timer
27*4882a593Smuzhiyun          - enum:
28*4882a593Smuzhiyun              - arm,armv7-timer
29*4882a593Smuzhiyun      - items:
30*4882a593Smuzhiyun          - enum:
31*4882a593Smuzhiyun              - arm,armv7-timer
32*4882a593Smuzhiyun      - items:
33*4882a593Smuzhiyun          - enum:
34*4882a593Smuzhiyun              - arm,armv8-timer
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  interrupts:
37*4882a593Smuzhiyun    items:
38*4882a593Smuzhiyun      - description: secure timer irq
39*4882a593Smuzhiyun      - description: non-secure timer irq
40*4882a593Smuzhiyun      - description: virtual timer irq
41*4882a593Smuzhiyun      - description: hypervisor timer irq
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun  clock-frequency:
44*4882a593Smuzhiyun    description: The frequency of the main counter, in Hz. Should be present
45*4882a593Smuzhiyun      only where necessary to work around broken firmware which does not configure
46*4882a593Smuzhiyun      CNTFRQ on all CPUs to a uniform correct value. Use of this property is
47*4882a593Smuzhiyun      strongly discouraged; fix your firmware unless absolutely impossible.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  always-on:
50*4882a593Smuzhiyun    type: boolean
51*4882a593Smuzhiyun    description: If present, the timer is powered through an always-on power
52*4882a593Smuzhiyun      domain, therefore it never loses context.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun  allwinner,erratum-unknown1:
55*4882a593Smuzhiyun    type: boolean
56*4882a593Smuzhiyun    description: Indicates the presence of an erratum found in Allwinner SoCs,
57*4882a593Smuzhiyun      where reading certain values from the counter is unreliable. This also
58*4882a593Smuzhiyun      affects writes to the tval register, due to the implicit counter read.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun  fsl,erratum-a008585:
61*4882a593Smuzhiyun    type: boolean
62*4882a593Smuzhiyun    description: Indicates the presence of QorIQ erratum A-008585, which says
63*4882a593Smuzhiyun      that reading the counter is unreliable unless the same value is returned
64*4882a593Smuzhiyun      by back-to-back reads. This also affects writes to the tval register, due
65*4882a593Smuzhiyun      to the implicit counter read.
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun  hisilicon,erratum-161010101:
68*4882a593Smuzhiyun    type: boolean
69*4882a593Smuzhiyun    description: Indicates the presence of Hisilicon erratum 161010101, which
70*4882a593Smuzhiyun      says that reading the counters is unreliable in some cases, and reads may
71*4882a593Smuzhiyun      return a value 32 beyond the correct value. This also affects writes to
72*4882a593Smuzhiyun      the tval registers, due to the implicit counter read.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun  arm,cpu-registers-not-fw-configured:
75*4882a593Smuzhiyun    type: boolean
76*4882a593Smuzhiyun    description: Firmware does not initialize any of the generic timer CPU
77*4882a593Smuzhiyun      registers, which contain their architecturally-defined reset values. Only
78*4882a593Smuzhiyun      supported for 32-bit systems which follow the ARMv7 architected reset
79*4882a593Smuzhiyun      values.
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun  arm,no-tick-in-suspend:
82*4882a593Smuzhiyun    type: boolean
83*4882a593Smuzhiyun    description: The main counter does not tick when the system is in
84*4882a593Smuzhiyun      low-power system suspend on some SoCs. This behavior does not match the
85*4882a593Smuzhiyun      Architecture Reference Manual's specification that the system counter "must
86*4882a593Smuzhiyun      be implemented in an always-on power domain."
87*4882a593Smuzhiyun
88*4882a593Smuzhiyunrequired:
89*4882a593Smuzhiyun  - compatible
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunadditionalProperties: false
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunoneOf:
94*4882a593Smuzhiyun  - required:
95*4882a593Smuzhiyun      - interrupts
96*4882a593Smuzhiyun  - required:
97*4882a593Smuzhiyun      - interrupts-extended
98*4882a593Smuzhiyun
99*4882a593Smuzhiyunexamples:
100*4882a593Smuzhiyun  - |
101*4882a593Smuzhiyun    timer {
102*4882a593Smuzhiyun      compatible = "arm,cortex-a15-timer",
103*4882a593Smuzhiyun             "arm,armv7-timer";
104*4882a593Smuzhiyun      interrupts = <1 13 0xf08>,
105*4882a593Smuzhiyun             <1 14 0xf08>,
106*4882a593Smuzhiyun             <1 11 0xf08>,
107*4882a593Smuzhiyun             <1 10 0xf08>;
108*4882a593Smuzhiyun      clock-frequency = <100000000>;
109*4882a593Smuzhiyun    };
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun...
112