xref: /linux/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
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:
225fe58019SKrzysztof Kozlowski    oneOf:
235fe58019SKrzysztof Kozlowski      - enum:
2465eba0dbSKrzysztof Kozlowski          - samsung,exynos4210-mct
2565eba0dbSKrzysztof Kozlowski          - samsung,exynos4412-mct
265fe58019SKrzysztof Kozlowski      - items:
275fe58019SKrzysztof Kozlowski          - enum:
2899b701fdSVincent Whitchurch              - axis,artpec8-mct
29*f253c9a1SPeter Griffin              - google,gs101-mct
305fe58019SKrzysztof Kozlowski              - samsung,exynos3250-mct
315fe58019SKrzysztof Kozlowski              - samsung,exynos5250-mct
325fe58019SKrzysztof Kozlowski              - samsung,exynos5260-mct
335fe58019SKrzysztof Kozlowski              - samsung,exynos5420-mct
345fe58019SKrzysztof Kozlowski              - samsung,exynos5433-mct
355fe58019SKrzysztof Kozlowski              - samsung,exynos850-mct
365fe58019SKrzysztof Kozlowski              - tesla,fsd-mct
375fe58019SKrzysztof Kozlowski          - const: samsung,exynos4210-mct
3865eba0dbSKrzysztof Kozlowski
396a1aa955SKrzysztof Kozlowski  clocks:
406a1aa955SKrzysztof Kozlowski    maxItems: 2
416a1aa955SKrzysztof Kozlowski
426a1aa955SKrzysztof Kozlowski  clock-names:
436a1aa955SKrzysztof Kozlowski    items:
44ee77ef0dSKrzysztof Kozlowski      - const: fin_pll
45ee77ef0dSKrzysztof Kozlowski      - const: mct
466a1aa955SKrzysztof Kozlowski
4765eba0dbSKrzysztof Kozlowski  reg:
4865eba0dbSKrzysztof Kozlowski    maxItems: 1
4965eba0dbSKrzysztof Kozlowski
5099b701fdSVincent Whitchurch  samsung,frc-shared:
5199b701fdSVincent Whitchurch    type: boolean
5299b701fdSVincent Whitchurch    description: |
5399b701fdSVincent Whitchurch      Indicates that the hardware requires that this processor share the
5499b701fdSVincent Whitchurch      free-running counter with a different (main) processor.
5599b701fdSVincent Whitchurch
5699b701fdSVincent Whitchurch  samsung,local-timers:
5799b701fdSVincent Whitchurch    $ref: /schemas/types.yaml#/definitions/uint32-array
5899b701fdSVincent Whitchurch    minItems: 1
5999b701fdSVincent Whitchurch    maxItems: 16
6099b701fdSVincent Whitchurch    description: |
6199b701fdSVincent Whitchurch      List of indices of local timers usable from this processor.
6299b701fdSVincent Whitchurch
6365eba0dbSKrzysztof Kozlowski  interrupts:
6465eba0dbSKrzysztof Kozlowski    description: |
6565eba0dbSKrzysztof Kozlowski      Interrupts should be put in specific order. This is, the local timer
6665eba0dbSKrzysztof Kozlowski      interrupts should be specified after the four global timer interrupts
6765eba0dbSKrzysztof Kozlowski      have been specified:
6865eba0dbSKrzysztof Kozlowski      0: Global Timer Interrupt 0
6965eba0dbSKrzysztof Kozlowski      1: Global Timer Interrupt 1
7065eba0dbSKrzysztof Kozlowski      2: Global Timer Interrupt 2
7165eba0dbSKrzysztof Kozlowski      3: Global Timer Interrupt 3
7265eba0dbSKrzysztof Kozlowski      4: Local Timer Interrupt 0
7365eba0dbSKrzysztof Kozlowski      5: Local Timer Interrupt 1
7465eba0dbSKrzysztof Kozlowski      6: ..
7565eba0dbSKrzysztof Kozlowski      7: ..
7665eba0dbSKrzysztof Kozlowski      i: Local Timer Interrupt n
7765eba0dbSKrzysztof Kozlowski      For MCT block that uses a per-processor interrupt for local timers, such
7865eba0dbSKrzysztof Kozlowski      as ones compatible with "samsung,exynos4412-mct", only one local timer
7965eba0dbSKrzysztof Kozlowski      interrupt might be specified, meaning that all local timers use the same
8065eba0dbSKrzysztof Kozlowski      per processor interrupt.
8165eba0dbSKrzysztof Kozlowski    minItems: 5               # 4 Global + 1 local
8265eba0dbSKrzysztof Kozlowski    maxItems: 20              # 4 Global + 16 local
8365eba0dbSKrzysztof Kozlowski
8465eba0dbSKrzysztof Kozlowskirequired:
8565eba0dbSKrzysztof Kozlowski  - compatible
866a1aa955SKrzysztof Kozlowski  - clock-names
876a1aa955SKrzysztof Kozlowski  - clocks
8865eba0dbSKrzysztof Kozlowski  - interrupts
8965eba0dbSKrzysztof Kozlowski  - reg
9065eba0dbSKrzysztof Kozlowski
915fe58019SKrzysztof KozlowskiallOf:
925fe58019SKrzysztof Kozlowski  - if:
9399b701fdSVincent Whitchurch      not:
9499b701fdSVincent Whitchurch        properties:
9599b701fdSVincent Whitchurch          compatible:
9699b701fdSVincent Whitchurch            contains:
9799b701fdSVincent Whitchurch              enum:
9899b701fdSVincent Whitchurch                - axis,artpec8-mct
9999b701fdSVincent Whitchurch    then:
10099b701fdSVincent Whitchurch      properties:
10199b701fdSVincent Whitchurch        samsung,local-timers: false
10299b701fdSVincent Whitchurch        samsung,frc-shared: false
10399b701fdSVincent Whitchurch  - if:
1045fe58019SKrzysztof Kozlowski      properties:
1055fe58019SKrzysztof Kozlowski        compatible:
1065fe58019SKrzysztof Kozlowski          contains:
1075fe58019SKrzysztof Kozlowski            const: samsung,exynos3250-mct
1085fe58019SKrzysztof Kozlowski    then:
1095fe58019SKrzysztof Kozlowski      properties:
1105fe58019SKrzysztof Kozlowski        interrupts:
1115fe58019SKrzysztof Kozlowski          minItems: 8
1125fe58019SKrzysztof Kozlowski          maxItems: 8
1135fe58019SKrzysztof Kozlowski
1145fe58019SKrzysztof Kozlowski  - if:
1155fe58019SKrzysztof Kozlowski      properties:
1165fe58019SKrzysztof Kozlowski        compatible:
1175fe58019SKrzysztof Kozlowski          contains:
1185fe58019SKrzysztof Kozlowski            const: samsung,exynos5250-mct
1195fe58019SKrzysztof Kozlowski    then:
1205fe58019SKrzysztof Kozlowski      properties:
1215fe58019SKrzysztof Kozlowski        interrupts:
1225fe58019SKrzysztof Kozlowski          minItems: 6
1235fe58019SKrzysztof Kozlowski          maxItems: 6
1245fe58019SKrzysztof Kozlowski
1255fe58019SKrzysztof Kozlowski  - if:
1265fe58019SKrzysztof Kozlowski      properties:
1275fe58019SKrzysztof Kozlowski        compatible:
1285fe58019SKrzysztof Kozlowski          contains:
1295fe58019SKrzysztof Kozlowski            enum:
13099b701fdSVincent Whitchurch              - axis,artpec8-mct
131*f253c9a1SPeter Griffin              - google,gs101-mct
1325fe58019SKrzysztof Kozlowski              - samsung,exynos5260-mct
1335fe58019SKrzysztof Kozlowski              - samsung,exynos5420-mct
1345fe58019SKrzysztof Kozlowski              - samsung,exynos5433-mct
1355fe58019SKrzysztof Kozlowski              - samsung,exynos850-mct
1365fe58019SKrzysztof Kozlowski    then:
1375fe58019SKrzysztof Kozlowski      properties:
1385fe58019SKrzysztof Kozlowski        interrupts:
1395fe58019SKrzysztof Kozlowski          minItems: 12
1405fe58019SKrzysztof Kozlowski          maxItems: 12
1415fe58019SKrzysztof Kozlowski
1425fe58019SKrzysztof Kozlowski  - if:
1435fe58019SKrzysztof Kozlowski      properties:
1445fe58019SKrzysztof Kozlowski        compatible:
1455fe58019SKrzysztof Kozlowski          contains:
1465fe58019SKrzysztof Kozlowski            enum:
1475fe58019SKrzysztof Kozlowski              - tesla,fsd-mct
1485fe58019SKrzysztof Kozlowski    then:
1495fe58019SKrzysztof Kozlowski      properties:
1505fe58019SKrzysztof Kozlowski        interrupts:
1515fe58019SKrzysztof Kozlowski          minItems: 16
1525fe58019SKrzysztof Kozlowski          maxItems: 16
1535fe58019SKrzysztof Kozlowski
1547f464532SRob HerringadditionalProperties: false
1557f464532SRob Herring
15665eba0dbSKrzysztof Kozlowskiexamples:
15765eba0dbSKrzysztof Kozlowski  - |
15865eba0dbSKrzysztof Kozlowski    // In this example, the IP contains two local timers, using separate
15965eba0dbSKrzysztof Kozlowski    // interrupts, so two local timer interrupts have been specified,
16065eba0dbSKrzysztof Kozlowski    // in addition to four global timer interrupts.
1616a1aa955SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
1624b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
16365eba0dbSKrzysztof Kozlowski
16465eba0dbSKrzysztof Kozlowski    timer@10050000 {
16565eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4210-mct";
16665eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
1676a1aa955SKrzysztof Kozlowski        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
1686a1aa955SKrzysztof Kozlowski        clock-names = "fin_pll", "mct";
1696a1aa955SKrzysztof Kozlowski
1704b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
1714b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
1724b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
1734b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
1744b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
1754b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
17665eba0dbSKrzysztof Kozlowski    };
17765eba0dbSKrzysztof Kozlowski
17865eba0dbSKrzysztof Kozlowski  - |
17965eba0dbSKrzysztof Kozlowski    // In this example, the timer interrupts are connected to two separate
18065eba0dbSKrzysztof Kozlowski    // interrupt controllers. Hence, an interrupts-extended is needed.
1816a1aa955SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
1824b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
18365eba0dbSKrzysztof Kozlowski
18465eba0dbSKrzysztof Kozlowski    timer@101c0000 {
18565eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4210-mct";
18665eba0dbSKrzysztof Kozlowski        reg = <0x101C0000 0x800>;
1876a1aa955SKrzysztof Kozlowski        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
1886a1aa955SKrzysztof Kozlowski        clock-names = "fin_pll", "mct";
1896a1aa955SKrzysztof Kozlowski
1904b73b6f7SKrzysztof Kozlowski        interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
1914b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
19265eba0dbSKrzysztof Kozlowski                              <&combiner 12 6>,
19365eba0dbSKrzysztof Kozlowski                              <&combiner 12 7>,
1944b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
1954b73b6f7SKrzysztof Kozlowski                              <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
19665eba0dbSKrzysztof Kozlowski    };
19765eba0dbSKrzysztof Kozlowski
19865eba0dbSKrzysztof Kozlowski  - |
19965eba0dbSKrzysztof Kozlowski    // In this example, the IP contains four local timers, but using
20065eba0dbSKrzysztof Kozlowski    // a per-processor interrupt to handle them. Only one first local
20165eba0dbSKrzysztof Kozlowski    // interrupt is specified.
2026a1aa955SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
2034b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
20465eba0dbSKrzysztof Kozlowski
20565eba0dbSKrzysztof Kozlowski    timer@10050000 {
20665eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4412-mct";
20765eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
2086a1aa955SKrzysztof Kozlowski        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
2096a1aa955SKrzysztof Kozlowski        clock-names = "fin_pll", "mct";
21065eba0dbSKrzysztof Kozlowski
2114b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
2124b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
2134b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
2144b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
2154b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
21665eba0dbSKrzysztof Kozlowski    };
21765eba0dbSKrzysztof Kozlowski
21865eba0dbSKrzysztof Kozlowski  - |
21965eba0dbSKrzysztof Kozlowski    // In this example, the IP contains four local timers, but using
22065eba0dbSKrzysztof Kozlowski    // a per-processor interrupt to handle them. All the local timer
22165eba0dbSKrzysztof Kozlowski    // interrupts are specified.
2226a1aa955SKrzysztof Kozlowski    #include <dt-bindings/clock/exynos4.h>
2234b73b6f7SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
22465eba0dbSKrzysztof Kozlowski
22565eba0dbSKrzysztof Kozlowski    timer@10050000 {
22665eba0dbSKrzysztof Kozlowski        compatible = "samsung,exynos4412-mct";
22765eba0dbSKrzysztof Kozlowski        reg = <0x10050000 0x800>;
2286a1aa955SKrzysztof Kozlowski        clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
2296a1aa955SKrzysztof Kozlowski        clock-names = "fin_pll", "mct";
23065eba0dbSKrzysztof Kozlowski
2314b73b6f7SKrzysztof Kozlowski        interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
2324b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
2334b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
2344b73b6f7SKrzysztof Kozlowski                     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
2354b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
2364b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
2374b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>,
2384b73b6f7SKrzysztof Kozlowski                     <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>;
23965eba0dbSKrzysztof Kozlowski    };
240