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