xref: /freebsd/sys/contrib/device-tree/Bindings/timer/arm,arch_timer.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/arm,arch_timer.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: ARM architected timer
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Marc Zyngier <marc.zyngier@arm.com>
11c66ec88fSEmmanuel Vadot  - Mark Rutland <mark.rutland@arm.com>
12c66ec88fSEmmanuel Vadotdescription: |+
13c66ec88fSEmmanuel Vadot  ARM cores may have a per-core architected timer, which provides per-cpu timers,
14c66ec88fSEmmanuel Vadot  or a memory mapped architected timer, which provides up to 8 frames with a
15c66ec88fSEmmanuel Vadot  physical and optional virtual timer per frame.
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot  The per-core architected timer is attached to a GIC to deliver its
18c66ec88fSEmmanuel Vadot  per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
19c66ec88fSEmmanuel Vadot  to deliver its interrupts via SPIs.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadotproperties:
22c66ec88fSEmmanuel Vadot  compatible:
23c66ec88fSEmmanuel Vadot    oneOf:
24c66ec88fSEmmanuel Vadot      - items:
25*7ef62cebSEmmanuel Vadot          - const: arm,cortex-a15-timer
26*7ef62cebSEmmanuel Vadot          - const: arm,armv7-timer
27c66ec88fSEmmanuel Vadot      - items:
28c66ec88fSEmmanuel Vadot          - enum:
29c66ec88fSEmmanuel Vadot              - arm,armv7-timer
30c66ec88fSEmmanuel Vadot              - arm,armv8-timer
31*7ef62cebSEmmanuel Vadot      - items:
32*7ef62cebSEmmanuel Vadot          - const: arm,armv8-timer
33*7ef62cebSEmmanuel Vadot          - const: arm,armv7-timer
34c66ec88fSEmmanuel Vadot
35c66ec88fSEmmanuel Vadot  interrupts:
362eb4d8dcSEmmanuel Vadot    minItems: 1
37c66ec88fSEmmanuel Vadot    items:
38c66ec88fSEmmanuel Vadot      - description: secure timer irq
39c66ec88fSEmmanuel Vadot      - description: non-secure timer irq
40c66ec88fSEmmanuel Vadot      - description: virtual timer irq
41c66ec88fSEmmanuel Vadot      - description: hypervisor timer irq
422eb4d8dcSEmmanuel Vadot      - description: hypervisor virtual timer irq
432eb4d8dcSEmmanuel Vadot
442eb4d8dcSEmmanuel Vadot  interrupt-names:
452eb4d8dcSEmmanuel Vadot    oneOf:
462eb4d8dcSEmmanuel Vadot      - minItems: 2
472eb4d8dcSEmmanuel Vadot        items:
482eb4d8dcSEmmanuel Vadot          - const: phys
492eb4d8dcSEmmanuel Vadot          - const: virt
502eb4d8dcSEmmanuel Vadot          - const: hyp-phys
512eb4d8dcSEmmanuel Vadot          - const: hyp-virt
522eb4d8dcSEmmanuel Vadot      - minItems: 3
532eb4d8dcSEmmanuel Vadot        items:
542eb4d8dcSEmmanuel Vadot          - const: sec-phys
552eb4d8dcSEmmanuel Vadot          - const: phys
562eb4d8dcSEmmanuel Vadot          - const: virt
572eb4d8dcSEmmanuel Vadot          - const: hyp-phys
582eb4d8dcSEmmanuel Vadot          - const: hyp-virt
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot  clock-frequency:
61c66ec88fSEmmanuel Vadot    description: The frequency of the main counter, in Hz. Should be present
62c66ec88fSEmmanuel Vadot      only where necessary to work around broken firmware which does not configure
63c66ec88fSEmmanuel Vadot      CNTFRQ on all CPUs to a uniform correct value. Use of this property is
64c66ec88fSEmmanuel Vadot      strongly discouraged; fix your firmware unless absolutely impossible.
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot  always-on:
67c66ec88fSEmmanuel Vadot    type: boolean
68c66ec88fSEmmanuel Vadot    description: If present, the timer is powered through an always-on power
69c66ec88fSEmmanuel Vadot      domain, therefore it never loses context.
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot  allwinner,erratum-unknown1:
72c66ec88fSEmmanuel Vadot    type: boolean
73c66ec88fSEmmanuel Vadot    description: Indicates the presence of an erratum found in Allwinner SoCs,
74c66ec88fSEmmanuel Vadot      where reading certain values from the counter is unreliable. This also
75c66ec88fSEmmanuel Vadot      affects writes to the tval register, due to the implicit counter read.
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel Vadot  fsl,erratum-a008585:
78c66ec88fSEmmanuel Vadot    type: boolean
79c66ec88fSEmmanuel Vadot    description: Indicates the presence of QorIQ erratum A-008585, which says
80c66ec88fSEmmanuel Vadot      that reading the counter is unreliable unless the same value is returned
81c66ec88fSEmmanuel Vadot      by back-to-back reads. This also affects writes to the tval register, due
82c66ec88fSEmmanuel Vadot      to the implicit counter read.
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot  hisilicon,erratum-161010101:
85c66ec88fSEmmanuel Vadot    type: boolean
86c66ec88fSEmmanuel Vadot    description: Indicates the presence of Hisilicon erratum 161010101, which
87c66ec88fSEmmanuel Vadot      says that reading the counters is unreliable in some cases, and reads may
88c66ec88fSEmmanuel Vadot      return a value 32 beyond the correct value. This also affects writes to
89c66ec88fSEmmanuel Vadot      the tval registers, due to the implicit counter read.
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot  arm,cpu-registers-not-fw-configured:
92c66ec88fSEmmanuel Vadot    type: boolean
93c66ec88fSEmmanuel Vadot    description: Firmware does not initialize any of the generic timer CPU
94c66ec88fSEmmanuel Vadot      registers, which contain their architecturally-defined reset values. Only
95c66ec88fSEmmanuel Vadot      supported for 32-bit systems which follow the ARMv7 architected reset
96c66ec88fSEmmanuel Vadot      values.
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot  arm,no-tick-in-suspend:
99c66ec88fSEmmanuel Vadot    type: boolean
100c66ec88fSEmmanuel Vadot    description: The main counter does not tick when the system is in
101c66ec88fSEmmanuel Vadot      low-power system suspend on some SoCs. This behavior does not match the
102c66ec88fSEmmanuel Vadot      Architecture Reference Manual's specification that the system counter "must
103c66ec88fSEmmanuel Vadot      be implemented in an always-on power domain."
104c66ec88fSEmmanuel Vadot
105c66ec88fSEmmanuel Vadotrequired:
106c66ec88fSEmmanuel Vadot  - compatible
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel VadotadditionalProperties: false
109c66ec88fSEmmanuel Vadot
110c66ec88fSEmmanuel VadotoneOf:
111c66ec88fSEmmanuel Vadot  - required:
112c66ec88fSEmmanuel Vadot      - interrupts
113c66ec88fSEmmanuel Vadot  - required:
114c66ec88fSEmmanuel Vadot      - interrupts-extended
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadotexamples:
117c66ec88fSEmmanuel Vadot  - |
118c66ec88fSEmmanuel Vadot    timer {
119c66ec88fSEmmanuel Vadot      compatible = "arm,cortex-a15-timer",
120c66ec88fSEmmanuel Vadot             "arm,armv7-timer";
121c66ec88fSEmmanuel Vadot      interrupts = <1 13 0xf08>,
122c66ec88fSEmmanuel Vadot             <1 14 0xf08>,
123c66ec88fSEmmanuel Vadot             <1 11 0xf08>,
124c66ec88fSEmmanuel Vadot             <1 10 0xf08>;
125c66ec88fSEmmanuel Vadot      clock-frequency = <100000000>;
126c66ec88fSEmmanuel Vadot    };
127c66ec88fSEmmanuel Vadot
128c66ec88fSEmmanuel Vadot...
129