xref: /linux/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml (revision 7f464532b05dadc8f96acdda7093334c863e7a06)
165eba0dbSKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0
265eba0dbSKrzysztof Kozlowski%YAML 1.2
365eba0dbSKrzysztof Kozlowski---
465eba0dbSKrzysztof Kozlowski$id: http://devicetree.org/schemas/timer/samsung,exynos4210-mct.yaml#
565eba0dbSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
665eba0dbSKrzysztof Kozlowski
765eba0dbSKrzysztof Kozlowskititle: Samsung Exynos SoC Multi Core Timer (MCT)
865eba0dbSKrzysztof Kozlowski
965eba0dbSKrzysztof Kozlowskimaintainers:
1065eba0dbSKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
1165eba0dbSKrzysztof Kozlowski
1265eba0dbSKrzysztof Kozlowskidescription: |+
1365eba0dbSKrzysztof Kozlowski  The Samsung's Multi Core Timer (MCT) module includes two main blocks, the
1465eba0dbSKrzysztof Kozlowski  global timer and CPU local timers. The global timer is a 64-bit free running
1565eba0dbSKrzysztof Kozlowski  up-counter and can generate 4 interrupts when the counter reaches one of the
1665eba0dbSKrzysztof Kozlowski  four preset counter values. The CPU local timers are 32-bit free running
1765eba0dbSKrzysztof Kozlowski  down-counters and generate an interrupt when the counter expires. There is
1865eba0dbSKrzysztof Kozlowski  one CPU local timer instantiated in MCT for every CPU in the system.
1965eba0dbSKrzysztof Kozlowski
2065eba0dbSKrzysztof Kozlowskiproperties:
2165eba0dbSKrzysztof Kozlowski  compatible:
2265eba0dbSKrzysztof Kozlowski    enum:
2365eba0dbSKrzysztof Kozlowski      - samsung,exynos4210-mct
2465eba0dbSKrzysztof Kozlowski      - samsung,exynos4412-mct
2565eba0dbSKrzysztof Kozlowski
2665eba0dbSKrzysztof Kozlowski  reg:
2765eba0dbSKrzysztof Kozlowski    maxItems: 1
2865eba0dbSKrzysztof Kozlowski
2965eba0dbSKrzysztof Kozlowski  interrupts:
3065eba0dbSKrzysztof Kozlowski    description: |
3165eba0dbSKrzysztof Kozlowski      Interrupts should be put in specific order. This is, the local timer
3265eba0dbSKrzysztof Kozlowski      interrupts should be specified after the four global timer interrupts
3365eba0dbSKrzysztof Kozlowski      have been specified:
3465eba0dbSKrzysztof Kozlowski      0: Global Timer Interrupt 0
3565eba0dbSKrzysztof Kozlowski      1: Global Timer Interrupt 1
3665eba0dbSKrzysztof Kozlowski      2: Global Timer Interrupt 2
3765eba0dbSKrzysztof Kozlowski      3: Global Timer Interrupt 3
3865eba0dbSKrzysztof Kozlowski      4: Local Timer Interrupt 0
3965eba0dbSKrzysztof Kozlowski      5: Local Timer Interrupt 1
4065eba0dbSKrzysztof Kozlowski      6: ..
4165eba0dbSKrzysztof Kozlowski      7: ..
4265eba0dbSKrzysztof Kozlowski      i: Local Timer Interrupt n
4365eba0dbSKrzysztof Kozlowski      For MCT block that uses a per-processor interrupt for local timers, such
4465eba0dbSKrzysztof Kozlowski      as ones compatible with "samsung,exynos4412-mct", only one local timer
4565eba0dbSKrzysztof Kozlowski      interrupt might be specified, meaning that all local timers use the same
4665eba0dbSKrzysztof Kozlowski      per processor interrupt.
4765eba0dbSKrzysztof Kozlowski    minItems: 5               # 4 Global + 1 local
4865eba0dbSKrzysztof Kozlowski    maxItems: 20              # 4 Global + 16 local
4965eba0dbSKrzysztof Kozlowski
5065eba0dbSKrzysztof Kozlowskirequired:
5165eba0dbSKrzysztof Kozlowski  - compatible
5265eba0dbSKrzysztof Kozlowski  - interrupts
5365eba0dbSKrzysztof Kozlowski  - reg
5465eba0dbSKrzysztof Kozlowski
55*7f464532SRob HerringadditionalProperties: false
56*7f464532SRob Herring
5765eba0dbSKrzysztof Kozlowskiexamples:
5865eba0dbSKrzysztof Kozlowski  - |
5965eba0dbSKrzysztof Kozlowski    // In this example, the IP contains two local timers, using separate
6065eba0dbSKrzysztof Kozlowski    // interrupts, so two local timer interrupts have been specified,
6165eba0dbSKrzysztof Kozlowski    // in addition to four global timer interrupts.
624b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
6365eba0dbSKrzysztof Kozlowski
6465eba0dbSKrzysztof Kozlowski    timer@10050000 {
6565eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4210-mct";
6665eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
674b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
684b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
694b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
704b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
714b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
724b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
7365eba0dbSKrzysztof Kozlowski    };
7465eba0dbSKrzysztof Kozlowski
7565eba0dbSKrzysztof Kozlowski  - |
7665eba0dbSKrzysztof Kozlowski    // In this example, the timer interrupts are connected to two separate
7765eba0dbSKrzysztof Kozlowski    // interrupt controllers. Hence, an interrupts-extended is needed.
784b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
7965eba0dbSKrzysztof Kozlowski
8065eba0dbSKrzysztof Kozlowski    timer@101c0000 {
8165eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4210-mct";
8265eba0dbSKrzysztof Kozlowski        reg = <0x101C0000 0x800>;
834b73b6f7SKrzysztof Kozlowski        interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
844b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
8565eba0dbSKrzysztof Kozlowski                              <&combiner 12 6>,
8665eba0dbSKrzysztof Kozlowski                              <&combiner 12 7>,
874b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
884b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
8965eba0dbSKrzysztof Kozlowski    };
9065eba0dbSKrzysztof Kozlowski
9165eba0dbSKrzysztof Kozlowski  - |
9265eba0dbSKrzysztof Kozlowski    // In this example, the IP contains four local timers, but using
9365eba0dbSKrzysztof Kozlowski    // a per-processor interrupt to handle them. Only one first local
9465eba0dbSKrzysztof Kozlowski    // interrupt is specified.
954b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
9665eba0dbSKrzysztof Kozlowski
9765eba0dbSKrzysztof Kozlowski    timer@10050000 {
9865eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4412-mct";
9965eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
10065eba0dbSKrzysztof Kozlowski
1014b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
1024b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
1034b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
1044b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
1054b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
10665eba0dbSKrzysztof Kozlowski    };
10765eba0dbSKrzysztof Kozlowski
10865eba0dbSKrzysztof Kozlowski  - |
10965eba0dbSKrzysztof Kozlowski    // In this example, the IP contains four local timers, but using
11065eba0dbSKrzysztof Kozlowski    // a per-processor interrupt to handle them. All the local timer
11165eba0dbSKrzysztof Kozlowski    // interrupts are specified.
1124b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
11365eba0dbSKrzysztof Kozlowski
11465eba0dbSKrzysztof Kozlowski    timer@10050000 {
11565eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4412-mct";
11665eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
11765eba0dbSKrzysztof Kozlowski
1184b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
1194b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
1204b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
1214b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
1224b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
1234b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
1244b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
1254b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
12665eba0dbSKrzysztof Kozlowski    };
127