xref: /freebsd/sys/contrib/device-tree/Bindings/timer/mediatek,timer.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/timer/mediatek,timer.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: MediaTek SoC timers
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Matthias Brugger <matthias.bgg@gmail.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription:
13*01950c46SEmmanuel Vadot  MediaTek SoCs have different timers on different platforms,
14*01950c46SEmmanuel Vadot  CPUX (ARM/ARM64 System Timer), GPT (General Purpose Timer)
15*01950c46SEmmanuel Vadot  and SYST (System Timer).
16*01950c46SEmmanuel Vadot
17*01950c46SEmmanuel Vadotproperties:
18*01950c46SEmmanuel Vadot  compatible:
19*01950c46SEmmanuel Vadot    oneOf:
20*01950c46SEmmanuel Vadot      - items:
21*01950c46SEmmanuel Vadot          - enum:
22*01950c46SEmmanuel Vadot              - mediatek,mt6577-timer
23*01950c46SEmmanuel Vadot              - mediatek,mt6765-timer
24*01950c46SEmmanuel Vadot              - mediatek,mt6795-systimer
25*01950c46SEmmanuel Vadot      # GPT Timers
26*01950c46SEmmanuel Vadot      - items:
27*01950c46SEmmanuel Vadot          - enum:
28*01950c46SEmmanuel Vadot              - mediatek,mt2701-timer
29*01950c46SEmmanuel Vadot              - mediatek,mt6580-timer
30*01950c46SEmmanuel Vadot              - mediatek,mt6582-timer
31*01950c46SEmmanuel Vadot              - mediatek,mt6589-timer
32*01950c46SEmmanuel Vadot              - mediatek,mt7623-timer
33*01950c46SEmmanuel Vadot              - mediatek,mt8127-timer
34*01950c46SEmmanuel Vadot              - mediatek,mt8135-timer
35*01950c46SEmmanuel Vadot              - mediatek,mt8173-timer
36*01950c46SEmmanuel Vadot              - mediatek,mt8516-timer
37*01950c46SEmmanuel Vadot          - const: mediatek,mt6577-timer
38*01950c46SEmmanuel Vadot      # SYST Timers
39*01950c46SEmmanuel Vadot      - items:
40*01950c46SEmmanuel Vadot          - enum:
41*01950c46SEmmanuel Vadot              - mediatek,mt7629-timer
42*01950c46SEmmanuel Vadot              - mediatek,mt8183-timer
43*01950c46SEmmanuel Vadot              - mediatek,mt8186-timer
44*01950c46SEmmanuel Vadot              - mediatek,mt8188-timer
45*01950c46SEmmanuel Vadot              - mediatek,mt8192-timer
46*01950c46SEmmanuel Vadot              - mediatek,mt8195-timer
47*01950c46SEmmanuel Vadot              - mediatek,mt8365-systimer
48*01950c46SEmmanuel Vadot          - const: mediatek,mt6765-timer
49*01950c46SEmmanuel Vadot
50*01950c46SEmmanuel Vadot  reg:
51*01950c46SEmmanuel Vadot    maxItems: 1
52*01950c46SEmmanuel Vadot
53*01950c46SEmmanuel Vadot  interrupts:
54*01950c46SEmmanuel Vadot    maxItems: 1
55*01950c46SEmmanuel Vadot
56*01950c46SEmmanuel Vadot  clocks:
57*01950c46SEmmanuel Vadot    minItems: 1
58*01950c46SEmmanuel Vadot    items:
59*01950c46SEmmanuel Vadot      - description: Timer clock
60*01950c46SEmmanuel Vadot      - description: RTC or bus clock
61*01950c46SEmmanuel Vadot
62*01950c46SEmmanuel Vadot  clock-names:
63*01950c46SEmmanuel Vadot    minItems: 1
64*01950c46SEmmanuel Vadot    maxItems: 2
65*01950c46SEmmanuel Vadot
66*01950c46SEmmanuel Vadotrequired:
67*01950c46SEmmanuel Vadot  - compatible
68*01950c46SEmmanuel Vadot  - reg
69*01950c46SEmmanuel Vadot  - interrupts
70*01950c46SEmmanuel Vadot  - clocks
71*01950c46SEmmanuel Vadot
72*01950c46SEmmanuel VadotadditionalProperties: false
73*01950c46SEmmanuel Vadot
74*01950c46SEmmanuel Vadotexamples:
75*01950c46SEmmanuel Vadot  - |
76*01950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
77*01950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
78*01950c46SEmmanuel Vadot
79*01950c46SEmmanuel Vadot    timer@10008000 {
80*01950c46SEmmanuel Vadot      compatible = "mediatek,mt6577-timer";
81*01950c46SEmmanuel Vadot      reg = <0x10008000 0x80>;
82*01950c46SEmmanuel Vadot      interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>;
83*01950c46SEmmanuel Vadot      clocks = <&system_clk>;
84*01950c46SEmmanuel Vadot    };
85