xref: /openbmc/linux/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
14d2bb3e6SRob Herring# SPDX-License-Identifier: GPL-2.0
24d2bb3e6SRob Herring%YAML 1.2
34d2bb3e6SRob Herring---
44d2bb3e6SRob Herring$id: http://devicetree.org/schemas/timer/arm,arch_timer.yaml#
54d2bb3e6SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
64d2bb3e6SRob Herring
74d2bb3e6SRob Herringtitle: ARM architected timer
84d2bb3e6SRob Herring
94d2bb3e6SRob Herringmaintainers:
104d2bb3e6SRob Herring  - Marc Zyngier <marc.zyngier@arm.com>
114d2bb3e6SRob Herring  - Mark Rutland <mark.rutland@arm.com>
124d2bb3e6SRob Herringdescription: |+
134d2bb3e6SRob Herring  ARM cores may have a per-core architected timer, which provides per-cpu timers,
144d2bb3e6SRob Herring  or a memory mapped architected timer, which provides up to 8 frames with a
154d2bb3e6SRob Herring  physical and optional virtual timer per frame.
164d2bb3e6SRob Herring
174d2bb3e6SRob Herring  The per-core architected timer is attached to a GIC to deliver its
184d2bb3e6SRob Herring  per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
194d2bb3e6SRob Herring  to deliver its interrupts via SPIs.
204d2bb3e6SRob Herring
214d2bb3e6SRob Herringproperties:
224d2bb3e6SRob Herring  compatible:
234d2bb3e6SRob Herring    oneOf:
244d2bb3e6SRob Herring      - items:
25*90c46d12SJean-Philippe Brucker          - const: arm,cortex-a15-timer
26*90c46d12SJean-Philippe Brucker          - const: arm,armv7-timer
274d2bb3e6SRob Herring      - items:
284d2bb3e6SRob Herring          - enum:
294d2bb3e6SRob Herring              - arm,armv7-timer
304d2bb3e6SRob Herring              - arm,armv8-timer
31*90c46d12SJean-Philippe Brucker      - items:
32*90c46d12SJean-Philippe Brucker          - const: arm,armv8-timer
33*90c46d12SJean-Philippe Brucker          - const: arm,armv7-timer
344d2bb3e6SRob Herring
354d2bb3e6SRob Herring  interrupts:
36a6cf39fbSHector Martin    minItems: 1
374d2bb3e6SRob Herring    items:
384d2bb3e6SRob Herring      - description: secure timer irq
394d2bb3e6SRob Herring      - description: non-secure timer irq
404d2bb3e6SRob Herring      - description: virtual timer irq
414d2bb3e6SRob Herring      - description: hypervisor timer irq
42a6cf39fbSHector Martin      - description: hypervisor virtual timer irq
43a6cf39fbSHector Martin
44a6cf39fbSHector Martin  interrupt-names:
45a6cf39fbSHector Martin    oneOf:
46a6cf39fbSHector Martin      - minItems: 2
47a6cf39fbSHector Martin        items:
48a6cf39fbSHector Martin          - const: phys
49a6cf39fbSHector Martin          - const: virt
50a6cf39fbSHector Martin          - const: hyp-phys
51a6cf39fbSHector Martin          - const: hyp-virt
52a6cf39fbSHector Martin      - minItems: 3
53a6cf39fbSHector Martin        items:
54a6cf39fbSHector Martin          - const: sec-phys
55a6cf39fbSHector Martin          - const: phys
56a6cf39fbSHector Martin          - const: virt
57a6cf39fbSHector Martin          - const: hyp-phys
58a6cf39fbSHector Martin          - const: hyp-virt
594d2bb3e6SRob Herring
604d2bb3e6SRob Herring  clock-frequency:
614d2bb3e6SRob Herring    description: The frequency of the main counter, in Hz. Should be present
624d2bb3e6SRob Herring      only where necessary to work around broken firmware which does not configure
634d2bb3e6SRob Herring      CNTFRQ on all CPUs to a uniform correct value. Use of this property is
644d2bb3e6SRob Herring      strongly discouraged; fix your firmware unless absolutely impossible.
654d2bb3e6SRob Herring
664d2bb3e6SRob Herring  always-on:
674d2bb3e6SRob Herring    type: boolean
684d2bb3e6SRob Herring    description: If present, the timer is powered through an always-on power
694d2bb3e6SRob Herring      domain, therefore it never loses context.
704d2bb3e6SRob Herring
71c54030b1SSamuel Holland  allwinner,erratum-unknown1:
72c54030b1SSamuel Holland    type: boolean
73c54030b1SSamuel Holland    description: Indicates the presence of an erratum found in Allwinner SoCs,
74c54030b1SSamuel Holland      where reading certain values from the counter is unreliable. This also
75c54030b1SSamuel Holland      affects writes to the tval register, due to the implicit counter read.
76c54030b1SSamuel Holland
774d2bb3e6SRob Herring  fsl,erratum-a008585:
784d2bb3e6SRob Herring    type: boolean
794d2bb3e6SRob Herring    description: Indicates the presence of QorIQ erratum A-008585, which says
804d2bb3e6SRob Herring      that reading the counter is unreliable unless the same value is returned
814d2bb3e6SRob Herring      by back-to-back reads. This also affects writes to the tval register, due
824d2bb3e6SRob Herring      to the implicit counter read.
834d2bb3e6SRob Herring
844d2bb3e6SRob Herring  hisilicon,erratum-161010101:
854d2bb3e6SRob Herring    type: boolean
864d2bb3e6SRob Herring    description: Indicates the presence of Hisilicon erratum 161010101, which
874d2bb3e6SRob Herring      says that reading the counters is unreliable in some cases, and reads may
884d2bb3e6SRob Herring      return a value 32 beyond the correct value. This also affects writes to
894d2bb3e6SRob Herring      the tval registers, due to the implicit counter read.
904d2bb3e6SRob Herring
914d2bb3e6SRob Herring  arm,cpu-registers-not-fw-configured:
924d2bb3e6SRob Herring    type: boolean
934d2bb3e6SRob Herring    description: Firmware does not initialize any of the generic timer CPU
944d2bb3e6SRob Herring      registers, which contain their architecturally-defined reset values. Only
954d2bb3e6SRob Herring      supported for 32-bit systems which follow the ARMv7 architected reset
964d2bb3e6SRob Herring      values.
974d2bb3e6SRob Herring
984d2bb3e6SRob Herring  arm,no-tick-in-suspend:
994d2bb3e6SRob Herring    type: boolean
1004d2bb3e6SRob Herring    description: The main counter does not tick when the system is in
1014d2bb3e6SRob Herring      low-power system suspend on some SoCs. This behavior does not match the
1024d2bb3e6SRob Herring      Architecture Reference Manual's specification that the system counter "must
1034d2bb3e6SRob Herring      be implemented in an always-on power domain."
1044d2bb3e6SRob Herring
1054d2bb3e6SRob Herringrequired:
1064d2bb3e6SRob Herring  - compatible
1074d2bb3e6SRob Herring
1087f464532SRob HerringadditionalProperties: false
1097f464532SRob Herring
1104d2bb3e6SRob HerringoneOf:
1114d2bb3e6SRob Herring  - required:
1124d2bb3e6SRob Herring      - interrupts
1134d2bb3e6SRob Herring  - required:
1144d2bb3e6SRob Herring      - interrupts-extended
1154d2bb3e6SRob Herring
1164d2bb3e6SRob Herringexamples:
1174d2bb3e6SRob Herring  - |
1184d2bb3e6SRob Herring    timer {
1194d2bb3e6SRob Herring      compatible = "arm,cortex-a15-timer",
1204d2bb3e6SRob Herring             "arm,armv7-timer";
1214d2bb3e6SRob Herring      interrupts = <1 13 0xf08>,
1224d2bb3e6SRob Herring             <1 14 0xf08>,
1234d2bb3e6SRob Herring             <1 11 0xf08>,
1244d2bb3e6SRob Herring             <1 10 0xf08>;
1254d2bb3e6SRob Herring      clock-frequency = <100000000>;
1264d2bb3e6SRob Herring    };
1274d2bb3e6SRob Herring
1284d2bb3e6SRob Herring...
129