xref: /linux/Documentation/devicetree/bindings/timer/renesas,cmt.yaml (revision fe8324f37cfebf72e2669e97b9d76ea9794d2972)
141a05388SGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
241a05388SGeert Uytterhoeven%YAML 1.2
341a05388SGeert Uytterhoeven---
441a05388SGeert Uytterhoeven$id: http://devicetree.org/schemas/timer/renesas,cmt.yaml#
541a05388SGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml#
641a05388SGeert Uytterhoeven
741a05388SGeert Uytterhoeventitle: Renesas Compare Match Timer (CMT)
841a05388SGeert Uytterhoeven
941a05388SGeert Uytterhoevenmaintainers:
1041a05388SGeert Uytterhoeven  - Geert Uytterhoeven <geert+renesas@glider.be>
1141a05388SGeert Uytterhoeven  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
1241a05388SGeert Uytterhoeven
1341a05388SGeert Uytterhoevendescription:
1441a05388SGeert Uytterhoeven  The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
1541a05388SGeert Uytterhoeven  inputs and programmable compare match.
1641a05388SGeert Uytterhoeven
1741a05388SGeert Uytterhoeven  Channels share hardware resources but their counter and compare match values
1841a05388SGeert Uytterhoeven  are independent. A particular CMT instance can implement only a subset of the
1941a05388SGeert Uytterhoeven  channels supported by the CMT model. Channel indices represent the hardware
2041a05388SGeert Uytterhoeven  position of the channel in the CMT and don't match the channel numbers in the
2141a05388SGeert Uytterhoeven  datasheets.
2241a05388SGeert Uytterhoeven
2341a05388SGeert Uytterhoevenproperties:
2441a05388SGeert Uytterhoeven  compatible:
2541a05388SGeert Uytterhoeven    oneOf:
2641a05388SGeert Uytterhoeven      - items:
2741a05388SGeert Uytterhoeven          - enum:
2841a05388SGeert Uytterhoeven              - renesas,r8a7740-cmt0      # 32-bit CMT0 on R-Mobile A1
2941a05388SGeert Uytterhoeven              - renesas,r8a7740-cmt1      # 48-bit CMT1 on R-Mobile A1
3041a05388SGeert Uytterhoeven              - renesas,r8a7740-cmt2      # 32-bit CMT2 on R-Mobile A1
3141a05388SGeert Uytterhoeven              - renesas,r8a7740-cmt3      # 32-bit CMT3 on R-Mobile A1
3241a05388SGeert Uytterhoeven              - renesas,r8a7740-cmt4      # 32-bit CMT4 on R-Mobile A1
3341a05388SGeert Uytterhoeven              - renesas,sh73a0-cmt0       # 32-bit CMT0 on SH-Mobile AG5
3441a05388SGeert Uytterhoeven              - renesas,sh73a0-cmt1       # 48-bit CMT1 on SH-Mobile AG5
3541a05388SGeert Uytterhoeven              - renesas,sh73a0-cmt2       # 32-bit CMT2 on SH-Mobile AG5
3641a05388SGeert Uytterhoeven              - renesas,sh73a0-cmt3       # 32-bit CMT3 on SH-Mobile AG5
3741a05388SGeert Uytterhoeven              - renesas,sh73a0-cmt4       # 32-bit CMT4 on SH-Mobile AG5
3841a05388SGeert Uytterhoeven
3941a05388SGeert Uytterhoeven      - items:
4041a05388SGeert Uytterhoeven          - enum:
4141a05388SGeert Uytterhoeven              - renesas,r8a73a4-cmt0      # 32-bit CMT0 on R-Mobile APE6
42e2cb4980SLad Prabhakar              - renesas,r8a7742-cmt0      # 32-bit CMT0 on RZ/G1H
4341a05388SGeert Uytterhoeven              - renesas,r8a7743-cmt0      # 32-bit CMT0 on RZ/G1M
4441a05388SGeert Uytterhoeven              - renesas,r8a7744-cmt0      # 32-bit CMT0 on RZ/G1N
4541a05388SGeert Uytterhoeven              - renesas,r8a7745-cmt0      # 32-bit CMT0 on RZ/G1E
4641a05388SGeert Uytterhoeven              - renesas,r8a77470-cmt0     # 32-bit CMT0 on RZ/G1C
4741a05388SGeert Uytterhoeven              - renesas,r8a7790-cmt0      # 32-bit CMT0 on R-Car H2
4841a05388SGeert Uytterhoeven              - renesas,r8a7791-cmt0      # 32-bit CMT0 on R-Car M2-W
4941a05388SGeert Uytterhoeven              - renesas,r8a7792-cmt0      # 32-bit CMT0 on R-Car V2H
5041a05388SGeert Uytterhoeven              - renesas,r8a7793-cmt0      # 32-bit CMT0 on R-Car M2-N
5141a05388SGeert Uytterhoeven              - renesas,r8a7794-cmt0      # 32-bit CMT0 on R-Car E2
5241a05388SGeert Uytterhoeven          - const: renesas,rcar-gen2-cmt0 # 32-bit CMT0 on R-Mobile APE6, R-Car Gen2 and RZ/G1
5341a05388SGeert Uytterhoeven
5441a05388SGeert Uytterhoeven      - items:
5541a05388SGeert Uytterhoeven          - enum:
5641a05388SGeert Uytterhoeven              - renesas,r8a73a4-cmt1      # 48-bit CMT1 on R-Mobile APE6
57e2cb4980SLad Prabhakar              - renesas,r8a7742-cmt1      # 48-bit CMT1 on RZ/G1H
5841a05388SGeert Uytterhoeven              - renesas,r8a7743-cmt1      # 48-bit CMT1 on RZ/G1M
5941a05388SGeert Uytterhoeven              - renesas,r8a7744-cmt1      # 48-bit CMT1 on RZ/G1N
6041a05388SGeert Uytterhoeven              - renesas,r8a7745-cmt1      # 48-bit CMT1 on RZ/G1E
6141a05388SGeert Uytterhoeven              - renesas,r8a77470-cmt1     # 48-bit CMT1 on RZ/G1C
6241a05388SGeert Uytterhoeven              - renesas,r8a7790-cmt1      # 48-bit CMT1 on R-Car H2
6341a05388SGeert Uytterhoeven              - renesas,r8a7791-cmt1      # 48-bit CMT1 on R-Car M2-W
6441a05388SGeert Uytterhoeven              - renesas,r8a7792-cmt1      # 48-bit CMT1 on R-Car V2H
6541a05388SGeert Uytterhoeven              - renesas,r8a7793-cmt1      # 48-bit CMT1 on R-Car M2-N
6641a05388SGeert Uytterhoeven              - renesas,r8a7794-cmt1      # 48-bit CMT1 on R-Car E2
6741a05388SGeert Uytterhoeven          - const: renesas,rcar-gen2-cmt1 # 48-bit CMT1 on R-Mobile APE6, R-Car Gen2 and RZ/G1
6841a05388SGeert Uytterhoeven
6941a05388SGeert Uytterhoeven      - items:
7041a05388SGeert Uytterhoeven          - enum:
7141a05388SGeert Uytterhoeven              - renesas,r8a774a1-cmt0     # 32-bit CMT0 on RZ/G2M
7241a05388SGeert Uytterhoeven              - renesas,r8a774b1-cmt0     # 32-bit CMT0 on RZ/G2N
7341a05388SGeert Uytterhoeven              - renesas,r8a774c0-cmt0     # 32-bit CMT0 on RZ/G2E
7451b705afSLad Prabhakar              - renesas,r8a774e1-cmt0     # 32-bit CMT0 on RZ/G2H
7541a05388SGeert Uytterhoeven              - renesas,r8a7795-cmt0      # 32-bit CMT0 on R-Car H3
7641a05388SGeert Uytterhoeven              - renesas,r8a7796-cmt0      # 32-bit CMT0 on R-Car M3-W
7741a05388SGeert Uytterhoeven              - renesas,r8a77965-cmt0     # 32-bit CMT0 on R-Car M3-N
7841a05388SGeert Uytterhoeven              - renesas,r8a77970-cmt0     # 32-bit CMT0 on R-Car V3M
7941a05388SGeert Uytterhoeven              - renesas,r8a77980-cmt0     # 32-bit CMT0 on R-Car V3H
8041a05388SGeert Uytterhoeven              - renesas,r8a77990-cmt0     # 32-bit CMT0 on R-Car E3
8141a05388SGeert Uytterhoeven              - renesas,r8a77995-cmt0     # 32-bit CMT0 on R-Car D3
82*fe8324f3SWolfram Sang              - renesas,r8a779a0-cmt0     # 32-bit CMT0 on R-Car V3U
8341a05388SGeert Uytterhoeven          - const: renesas,rcar-gen3-cmt0 # 32-bit CMT0 on R-Car Gen3 and RZ/G2
8441a05388SGeert Uytterhoeven
8541a05388SGeert Uytterhoeven      - items:
8641a05388SGeert Uytterhoeven          - enum:
8741a05388SGeert Uytterhoeven              - renesas,r8a774a1-cmt1     # 48-bit CMT on RZ/G2M
8841a05388SGeert Uytterhoeven              - renesas,r8a774b1-cmt1     # 48-bit CMT on RZ/G2N
8941a05388SGeert Uytterhoeven              - renesas,r8a774c0-cmt1     # 48-bit CMT on RZ/G2E
9051b705afSLad Prabhakar              - renesas,r8a774e1-cmt1     # 48-bit CMT on RZ/G2H
9141a05388SGeert Uytterhoeven              - renesas,r8a7795-cmt1      # 48-bit CMT on R-Car H3
9241a05388SGeert Uytterhoeven              - renesas,r8a7796-cmt1      # 48-bit CMT on R-Car M3-W
9341a05388SGeert Uytterhoeven              - renesas,r8a77965-cmt1     # 48-bit CMT on R-Car M3-N
9441a05388SGeert Uytterhoeven              - renesas,r8a77970-cmt1     # 48-bit CMT on R-Car V3M
9541a05388SGeert Uytterhoeven              - renesas,r8a77980-cmt1     # 48-bit CMT on R-Car V3H
9641a05388SGeert Uytterhoeven              - renesas,r8a77990-cmt1     # 48-bit CMT on R-Car E3
9741a05388SGeert Uytterhoeven              - renesas,r8a77995-cmt1     # 48-bit CMT on R-Car D3
98*fe8324f3SWolfram Sang              - renesas,r8a779a0-cmt1     # 48-bit CMT on R-Car V3U
9941a05388SGeert Uytterhoeven          - const: renesas,rcar-gen3-cmt1 # 48-bit CMT on R-Car Gen3 and RZ/G2
10041a05388SGeert Uytterhoeven
10141a05388SGeert Uytterhoeven  reg:
10241a05388SGeert Uytterhoeven    maxItems: 1
10341a05388SGeert Uytterhoeven
10441a05388SGeert Uytterhoeven  interrupts:
10541a05388SGeert Uytterhoeven    minItems: 1
10641a05388SGeert Uytterhoeven    maxItems: 8
10741a05388SGeert Uytterhoeven
10841a05388SGeert Uytterhoeven  clocks:
10941a05388SGeert Uytterhoeven    maxItems: 1
11041a05388SGeert Uytterhoeven
11141a05388SGeert Uytterhoeven  clock-names:
11241a05388SGeert Uytterhoeven    const: fck
11341a05388SGeert Uytterhoeven
11441a05388SGeert Uytterhoeven  power-domains:
11541a05388SGeert Uytterhoeven    maxItems: 1
11641a05388SGeert Uytterhoeven
11741a05388SGeert Uytterhoeven  resets:
11841a05388SGeert Uytterhoeven    maxItems: 1
11941a05388SGeert Uytterhoeven
12041a05388SGeert Uytterhoevenrequired:
12141a05388SGeert Uytterhoeven  - compatible
12241a05388SGeert Uytterhoeven  - reg
12341a05388SGeert Uytterhoeven  - interrupts
12441a05388SGeert Uytterhoeven  - clocks
12541a05388SGeert Uytterhoeven  - clock-names
12641a05388SGeert Uytterhoeven  - power-domains
12741a05388SGeert Uytterhoeven
12841a05388SGeert UytterhoevenallOf:
12941a05388SGeert Uytterhoeven  - if:
13041a05388SGeert Uytterhoeven      properties:
13141a05388SGeert Uytterhoeven        compatible:
13241a05388SGeert Uytterhoeven          contains:
13341a05388SGeert Uytterhoeven            enum:
13441a05388SGeert Uytterhoeven              - renesas,rcar-gen2-cmt0
13541a05388SGeert Uytterhoeven              - renesas,rcar-gen3-cmt0
13641a05388SGeert Uytterhoeven    then:
13741a05388SGeert Uytterhoeven      properties:
13841a05388SGeert Uytterhoeven        interrupts:
13941a05388SGeert Uytterhoeven          minItems: 2
14041a05388SGeert Uytterhoeven          maxItems: 2
14141a05388SGeert Uytterhoeven
14241a05388SGeert Uytterhoeven  - if:
14341a05388SGeert Uytterhoeven      properties:
14441a05388SGeert Uytterhoeven        compatible:
14541a05388SGeert Uytterhoeven          contains:
14641a05388SGeert Uytterhoeven            enum:
14741a05388SGeert Uytterhoeven              - renesas,rcar-gen2-cmt1
14841a05388SGeert Uytterhoeven              - renesas,rcar-gen3-cmt1
14941a05388SGeert Uytterhoeven    then:
15041a05388SGeert Uytterhoeven      properties:
15141a05388SGeert Uytterhoeven        interrupts:
15241a05388SGeert Uytterhoeven          minItems: 8
15341a05388SGeert Uytterhoeven          maxItems: 8
15441a05388SGeert Uytterhoeven
15541a05388SGeert UytterhoevenadditionalProperties: false
15641a05388SGeert Uytterhoeven
15741a05388SGeert Uytterhoevenexamples:
15841a05388SGeert Uytterhoeven  - |
15941a05388SGeert Uytterhoeven    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
16041a05388SGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/arm-gic.h>
16141a05388SGeert Uytterhoeven    #include <dt-bindings/power/r8a7790-sysc.h>
16241a05388SGeert Uytterhoeven    cmt0: timer@ffca0000 {
16341a05388SGeert Uytterhoeven            compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
16441a05388SGeert Uytterhoeven            reg = <0xffca0000 0x1004>;
16541a05388SGeert Uytterhoeven            interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
16641a05388SGeert Uytterhoeven                         <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
16741a05388SGeert Uytterhoeven            clocks = <&cpg CPG_MOD 124>;
16841a05388SGeert Uytterhoeven            clock-names = "fck";
16941a05388SGeert Uytterhoeven            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
17041a05388SGeert Uytterhoeven            resets = <&cpg 124>;
17141a05388SGeert Uytterhoeven    };
17241a05388SGeert Uytterhoeven
17341a05388SGeert Uytterhoeven    cmt1: timer@e6130000 {
17441a05388SGeert Uytterhoeven            compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
17541a05388SGeert Uytterhoeven            reg = <0xe6130000 0x1004>;
17641a05388SGeert Uytterhoeven            interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
17741a05388SGeert Uytterhoeven                         <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
17841a05388SGeert Uytterhoeven                         <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
17941a05388SGeert Uytterhoeven                         <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
18041a05388SGeert Uytterhoeven                         <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
18141a05388SGeert Uytterhoeven                         <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
18241a05388SGeert Uytterhoeven                         <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
18341a05388SGeert Uytterhoeven                         <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
18441a05388SGeert Uytterhoeven            clocks = <&cpg CPG_MOD 329>;
18541a05388SGeert Uytterhoeven            clock-names = "fck";
18641a05388SGeert Uytterhoeven            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
18741a05388SGeert Uytterhoeven            resets = <&cpg 329>;
18841a05388SGeert Uytterhoeven    };
189