xref: /freebsd/sys/contrib/device-tree/Bindings/timer/samsung,exynos4210-mct.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2*c66ec88fSEmmanuel Vadot%YAML 1.2
3*c66ec88fSEmmanuel Vadot---
4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/samsung,exynos4210-mct.yaml#
5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadottitle: Samsung Exynos SoC Multi Core Timer (MCT)
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadotmaintainers:
10*c66ec88fSEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadotdescription: |+
13*c66ec88fSEmmanuel Vadot  The Samsung's Multi Core Timer (MCT) module includes two main blocks, the
14*c66ec88fSEmmanuel Vadot  global timer and CPU local timers. The global timer is a 64-bit free running
15*c66ec88fSEmmanuel Vadot  up-counter and can generate 4 interrupts when the counter reaches one of the
16*c66ec88fSEmmanuel Vadot  four preset counter values. The CPU local timers are 32-bit free running
17*c66ec88fSEmmanuel Vadot  down-counters and generate an interrupt when the counter expires. There is
18*c66ec88fSEmmanuel Vadot  one CPU local timer instantiated in MCT for every CPU in the system.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadotproperties:
21*c66ec88fSEmmanuel Vadot  compatible:
22*c66ec88fSEmmanuel Vadot    enum:
23*c66ec88fSEmmanuel Vadot      - samsung,exynos4210-mct
24*c66ec88fSEmmanuel Vadot      - samsung,exynos4412-mct
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadot  reg:
27*c66ec88fSEmmanuel Vadot    maxItems: 1
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot  interrupts:
30*c66ec88fSEmmanuel Vadot    description: |
31*c66ec88fSEmmanuel Vadot      Interrupts should be put in specific order. This is, the local timer
32*c66ec88fSEmmanuel Vadot      interrupts should be specified after the four global timer interrupts
33*c66ec88fSEmmanuel Vadot      have been specified:
34*c66ec88fSEmmanuel Vadot      0: Global Timer Interrupt 0
35*c66ec88fSEmmanuel Vadot      1: Global Timer Interrupt 1
36*c66ec88fSEmmanuel Vadot      2: Global Timer Interrupt 2
37*c66ec88fSEmmanuel Vadot      3: Global Timer Interrupt 3
38*c66ec88fSEmmanuel Vadot      4: Local Timer Interrupt 0
39*c66ec88fSEmmanuel Vadot      5: Local Timer Interrupt 1
40*c66ec88fSEmmanuel Vadot      6: ..
41*c66ec88fSEmmanuel Vadot      7: ..
42*c66ec88fSEmmanuel Vadot      i: Local Timer Interrupt n
43*c66ec88fSEmmanuel Vadot      For MCT block that uses a per-processor interrupt for local timers, such
44*c66ec88fSEmmanuel Vadot      as ones compatible with "samsung,exynos4412-mct", only one local timer
45*c66ec88fSEmmanuel Vadot      interrupt might be specified, meaning that all local timers use the same
46*c66ec88fSEmmanuel Vadot      per processor interrupt.
47*c66ec88fSEmmanuel Vadot    minItems: 5               # 4 Global + 1 local
48*c66ec88fSEmmanuel Vadot    maxItems: 20              # 4 Global + 16 local
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadotrequired:
51*c66ec88fSEmmanuel Vadot  - compatible
52*c66ec88fSEmmanuel Vadot  - interrupts
53*c66ec88fSEmmanuel Vadot  - reg
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel VadotadditionalProperties: false
56*c66ec88fSEmmanuel Vadot
57*c66ec88fSEmmanuel Vadotexamples:
58*c66ec88fSEmmanuel Vadot  - |
59*c66ec88fSEmmanuel Vadot    // In this example, the IP contains two local timers, using separate
60*c66ec88fSEmmanuel Vadot    // interrupts, so two local timer interrupts have been specified,
61*c66ec88fSEmmanuel Vadot    // in addition to four global timer interrupts.
62*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadot    timer@10050000 {
65*c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4210-mct";
66*c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
67*c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
68*c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
69*c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
70*c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
71*c66ec88fSEmmanuel Vadot                     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
72*c66ec88fSEmmanuel Vadot                     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
73*c66ec88fSEmmanuel Vadot    };
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel Vadot  - |
76*c66ec88fSEmmanuel Vadot    // In this example, the timer interrupts are connected to two separate
77*c66ec88fSEmmanuel Vadot    // interrupt controllers. Hence, an interrupts-extended is needed.
78*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
79*c66ec88fSEmmanuel Vadot
80*c66ec88fSEmmanuel Vadot    timer@101c0000 {
81*c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4210-mct";
82*c66ec88fSEmmanuel Vadot        reg = <0x101C0000 0x800>;
83*c66ec88fSEmmanuel Vadot        interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
84*c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
85*c66ec88fSEmmanuel Vadot                              <&combiner 12 6>,
86*c66ec88fSEmmanuel Vadot                              <&combiner 12 7>,
87*c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
88*c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
89*c66ec88fSEmmanuel Vadot    };
90*c66ec88fSEmmanuel Vadot
91*c66ec88fSEmmanuel Vadot  - |
92*c66ec88fSEmmanuel Vadot    // In this example, the IP contains four local timers, but using
93*c66ec88fSEmmanuel Vadot    // a per-processor interrupt to handle them. Only one first local
94*c66ec88fSEmmanuel Vadot    // interrupt is specified.
95*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel Vadot    timer@10050000 {
98*c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4412-mct";
99*c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
100*c66ec88fSEmmanuel Vadot
101*c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
102*c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
103*c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
104*c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
105*c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
106*c66ec88fSEmmanuel Vadot    };
107*c66ec88fSEmmanuel Vadot
108*c66ec88fSEmmanuel Vadot  - |
109*c66ec88fSEmmanuel Vadot    // In this example, the IP contains four local timers, but using
110*c66ec88fSEmmanuel Vadot    // a per-processor interrupt to handle them. All the local timer
111*c66ec88fSEmmanuel Vadot    // interrupts are specified.
112*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot    timer@10050000 {
115*c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4412-mct";
116*c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
117*c66ec88fSEmmanuel Vadot
118*c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
119*c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
120*c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
121*c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
122*c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
123*c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
124*c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
125*c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
126*c66ec88fSEmmanuel Vadot    };
127