xref: /freebsd/sys/contrib/device-tree/Bindings/timer/samsung,exynos4210-mct.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
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:
22d5b0e70fSEmmanuel Vadot    oneOf:
23d5b0e70fSEmmanuel Vadot      - enum:
24c66ec88fSEmmanuel Vadot          - samsung,exynos4210-mct
25c66ec88fSEmmanuel Vadot          - samsung,exynos4412-mct
26d5b0e70fSEmmanuel Vadot      - items:
27d5b0e70fSEmmanuel Vadot          - enum:
287ef62cebSEmmanuel Vadot              - axis,artpec8-mct
29*01950c46SEmmanuel Vadot              - google,gs101-mct
30d5b0e70fSEmmanuel Vadot              - samsung,exynos3250-mct
31d5b0e70fSEmmanuel Vadot              - samsung,exynos5250-mct
32d5b0e70fSEmmanuel Vadot              - samsung,exynos5260-mct
33d5b0e70fSEmmanuel Vadot              - samsung,exynos5420-mct
34d5b0e70fSEmmanuel Vadot              - samsung,exynos5433-mct
35d5b0e70fSEmmanuel Vadot              - samsung,exynos850-mct
36d5b0e70fSEmmanuel Vadot              - tesla,fsd-mct
37d5b0e70fSEmmanuel Vadot          - const: samsung,exynos4210-mct
38c66ec88fSEmmanuel Vadot
396be33864SEmmanuel Vadot  clocks:
406be33864SEmmanuel Vadot    maxItems: 2
416be33864SEmmanuel Vadot
426be33864SEmmanuel Vadot  clock-names:
436be33864SEmmanuel Vadot    items:
44d5b0e70fSEmmanuel Vadot      - const: fin_pll
45d5b0e70fSEmmanuel Vadot      - const: mct
466be33864SEmmanuel Vadot
47c66ec88fSEmmanuel Vadot  reg:
48c66ec88fSEmmanuel Vadot    maxItems: 1
49c66ec88fSEmmanuel Vadot
507ef62cebSEmmanuel Vadot  samsung,frc-shared:
517ef62cebSEmmanuel Vadot    type: boolean
527ef62cebSEmmanuel Vadot    description: |
537ef62cebSEmmanuel Vadot      Indicates that the hardware requires that this processor share the
547ef62cebSEmmanuel Vadot      free-running counter with a different (main) processor.
557ef62cebSEmmanuel Vadot
567ef62cebSEmmanuel Vadot  samsung,local-timers:
577ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
587ef62cebSEmmanuel Vadot    minItems: 1
597ef62cebSEmmanuel Vadot    maxItems: 16
607ef62cebSEmmanuel Vadot    description: |
617ef62cebSEmmanuel Vadot      List of indices of local timers usable from this processor.
627ef62cebSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot  interrupts:
64c66ec88fSEmmanuel Vadot    description: |
65c66ec88fSEmmanuel Vadot      Interrupts should be put in specific order. This is, the local timer
66c66ec88fSEmmanuel Vadot      interrupts should be specified after the four global timer interrupts
67c66ec88fSEmmanuel Vadot      have been specified:
68c66ec88fSEmmanuel Vadot      0: Global Timer Interrupt 0
69c66ec88fSEmmanuel Vadot      1: Global Timer Interrupt 1
70c66ec88fSEmmanuel Vadot      2: Global Timer Interrupt 2
71c66ec88fSEmmanuel Vadot      3: Global Timer Interrupt 3
72c66ec88fSEmmanuel Vadot      4: Local Timer Interrupt 0
73c66ec88fSEmmanuel Vadot      5: Local Timer Interrupt 1
74c66ec88fSEmmanuel Vadot      6: ..
75c66ec88fSEmmanuel Vadot      7: ..
76c66ec88fSEmmanuel Vadot      i: Local Timer Interrupt n
77c66ec88fSEmmanuel Vadot      For MCT block that uses a per-processor interrupt for local timers, such
78c66ec88fSEmmanuel Vadot      as ones compatible with "samsung,exynos4412-mct", only one local timer
79c66ec88fSEmmanuel Vadot      interrupt might be specified, meaning that all local timers use the same
80c66ec88fSEmmanuel Vadot      per processor interrupt.
81c66ec88fSEmmanuel Vadot    minItems: 5               # 4 Global + 1 local
82c66ec88fSEmmanuel Vadot    maxItems: 20              # 4 Global + 16 local
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadotrequired:
85c66ec88fSEmmanuel Vadot  - compatible
866be33864SEmmanuel Vadot  - clock-names
876be33864SEmmanuel Vadot  - clocks
88c66ec88fSEmmanuel Vadot  - interrupts
89c66ec88fSEmmanuel Vadot  - reg
90c66ec88fSEmmanuel Vadot
91d5b0e70fSEmmanuel VadotallOf:
92d5b0e70fSEmmanuel Vadot  - if:
937ef62cebSEmmanuel Vadot      not:
947ef62cebSEmmanuel Vadot        properties:
957ef62cebSEmmanuel Vadot          compatible:
967ef62cebSEmmanuel Vadot            contains:
977ef62cebSEmmanuel Vadot              enum:
987ef62cebSEmmanuel Vadot                - axis,artpec8-mct
997ef62cebSEmmanuel Vadot    then:
1007ef62cebSEmmanuel Vadot      properties:
1017ef62cebSEmmanuel Vadot        samsung,local-timers: false
1027ef62cebSEmmanuel Vadot        samsung,frc-shared: false
1037ef62cebSEmmanuel Vadot  - if:
104d5b0e70fSEmmanuel Vadot      properties:
105d5b0e70fSEmmanuel Vadot        compatible:
106d5b0e70fSEmmanuel Vadot          contains:
107d5b0e70fSEmmanuel Vadot            const: samsung,exynos3250-mct
108d5b0e70fSEmmanuel Vadot    then:
109d5b0e70fSEmmanuel Vadot      properties:
110d5b0e70fSEmmanuel Vadot        interrupts:
111d5b0e70fSEmmanuel Vadot          minItems: 8
112d5b0e70fSEmmanuel Vadot          maxItems: 8
113d5b0e70fSEmmanuel Vadot
114d5b0e70fSEmmanuel Vadot  - if:
115d5b0e70fSEmmanuel Vadot      properties:
116d5b0e70fSEmmanuel Vadot        compatible:
117d5b0e70fSEmmanuel Vadot          contains:
118d5b0e70fSEmmanuel Vadot            const: samsung,exynos5250-mct
119d5b0e70fSEmmanuel Vadot    then:
120d5b0e70fSEmmanuel Vadot      properties:
121d5b0e70fSEmmanuel Vadot        interrupts:
122d5b0e70fSEmmanuel Vadot          minItems: 6
123d5b0e70fSEmmanuel Vadot          maxItems: 6
124d5b0e70fSEmmanuel Vadot
125d5b0e70fSEmmanuel Vadot  - if:
126d5b0e70fSEmmanuel Vadot      properties:
127d5b0e70fSEmmanuel Vadot        compatible:
128d5b0e70fSEmmanuel Vadot          contains:
129d5b0e70fSEmmanuel Vadot            enum:
1307ef62cebSEmmanuel Vadot              - axis,artpec8-mct
131*01950c46SEmmanuel Vadot              - google,gs101-mct
132d5b0e70fSEmmanuel Vadot              - samsung,exynos5260-mct
133d5b0e70fSEmmanuel Vadot              - samsung,exynos5420-mct
134d5b0e70fSEmmanuel Vadot              - samsung,exynos5433-mct
135d5b0e70fSEmmanuel Vadot              - samsung,exynos850-mct
136d5b0e70fSEmmanuel Vadot    then:
137d5b0e70fSEmmanuel Vadot      properties:
138d5b0e70fSEmmanuel Vadot        interrupts:
139d5b0e70fSEmmanuel Vadot          minItems: 12
140d5b0e70fSEmmanuel Vadot          maxItems: 12
141d5b0e70fSEmmanuel Vadot
142d5b0e70fSEmmanuel Vadot  - if:
143d5b0e70fSEmmanuel Vadot      properties:
144d5b0e70fSEmmanuel Vadot        compatible:
145d5b0e70fSEmmanuel Vadot          contains:
146d5b0e70fSEmmanuel Vadot            enum:
147d5b0e70fSEmmanuel Vadot              - tesla,fsd-mct
148d5b0e70fSEmmanuel Vadot    then:
149d5b0e70fSEmmanuel Vadot      properties:
150d5b0e70fSEmmanuel Vadot        interrupts:
151d5b0e70fSEmmanuel Vadot          minItems: 16
152d5b0e70fSEmmanuel Vadot          maxItems: 16
153d5b0e70fSEmmanuel Vadot
154c66ec88fSEmmanuel VadotadditionalProperties: false
155c66ec88fSEmmanuel Vadot
156c66ec88fSEmmanuel Vadotexamples:
157c66ec88fSEmmanuel Vadot  - |
158c66ec88fSEmmanuel Vadot    // In this example, the IP contains two local timers, using separate
159c66ec88fSEmmanuel Vadot    // interrupts, so two local timer interrupts have been specified,
160c66ec88fSEmmanuel Vadot    // in addition to four global timer interrupts.
1616be33864SEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
162c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
163c66ec88fSEmmanuel Vadot
164c66ec88fSEmmanuel Vadot    timer@10050000 {
165c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4210-mct";
166c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
1676be33864SEmmanuel Vadot        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
1686be33864SEmmanuel Vadot        clock-names = "fin_pll", "mct";
1696be33864SEmmanuel Vadot
170c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
171c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
172c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
173c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
174c66ec88fSEmmanuel Vadot                     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
175c66ec88fSEmmanuel Vadot                     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
176c66ec88fSEmmanuel Vadot    };
177c66ec88fSEmmanuel Vadot
178c66ec88fSEmmanuel Vadot  - |
179c66ec88fSEmmanuel Vadot    // In this example, the timer interrupts are connected to two separate
180c66ec88fSEmmanuel Vadot    // interrupt controllers. Hence, an interrupts-extended is needed.
1816be33864SEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
182c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
183c66ec88fSEmmanuel Vadot
184c66ec88fSEmmanuel Vadot    timer@101c0000 {
185c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4210-mct";
186c66ec88fSEmmanuel Vadot        reg = <0x101C0000 0x800>;
1876be33864SEmmanuel Vadot        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
1886be33864SEmmanuel Vadot        clock-names = "fin_pll", "mct";
1896be33864SEmmanuel Vadot
190c66ec88fSEmmanuel Vadot        interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
191c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
192c66ec88fSEmmanuel Vadot                              <&combiner 12 6>,
193c66ec88fSEmmanuel Vadot                              <&combiner 12 7>,
194c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
195c66ec88fSEmmanuel Vadot                              <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
196c66ec88fSEmmanuel Vadot    };
197c66ec88fSEmmanuel Vadot
198c66ec88fSEmmanuel Vadot  - |
199c66ec88fSEmmanuel Vadot    // In this example, the IP contains four local timers, but using
200c66ec88fSEmmanuel Vadot    // a per-processor interrupt to handle them. Only one first local
201c66ec88fSEmmanuel Vadot    // interrupt is specified.
2026be33864SEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
203c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
204c66ec88fSEmmanuel Vadot
205c66ec88fSEmmanuel Vadot    timer@10050000 {
206c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4412-mct";
207c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
2086be33864SEmmanuel Vadot        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
2096be33864SEmmanuel Vadot        clock-names = "fin_pll", "mct";
210c66ec88fSEmmanuel Vadot
211c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
212c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
213c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
214c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
215c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
216c66ec88fSEmmanuel Vadot    };
217c66ec88fSEmmanuel Vadot
218c66ec88fSEmmanuel Vadot  - |
219c66ec88fSEmmanuel Vadot    // In this example, the IP contains four local timers, but using
220c66ec88fSEmmanuel Vadot    // a per-processor interrupt to handle them. All the local timer
221c66ec88fSEmmanuel Vadot    // interrupts are specified.
2226be33864SEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
223c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot    timer@10050000 {
226c66ec88fSEmmanuel Vadot        compatible = "samsung,exynos4412-mct";
227c66ec88fSEmmanuel Vadot        reg = <0x10050000 0x800>;
2286be33864SEmmanuel Vadot        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
2296be33864SEmmanuel Vadot        clock-names = "fin_pll", "mct";
230c66ec88fSEmmanuel Vadot
231c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
232c66ec88fSEmmanuel Vadot                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
233c66ec88fSEmmanuel Vadot                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
234c66ec88fSEmmanuel Vadot                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
235c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
236c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
237c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
238c66ec88fSEmmanuel Vadot                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
239c66ec88fSEmmanuel Vadot    };
240