xref: /linux/Documentation/devicetree/bindings/timer/renesas,cmt.yaml (revision 525b296185b4b0abab0d35a7143fc5a99c385230)
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
77446e1a94SNiklas Söderlund              - renesas,r8a77961-cmt0     # 32-bit CMT0 on R-Car M3-W+
7841a05388SGeert Uytterhoeven              - renesas,r8a77965-cmt0     # 32-bit CMT0 on R-Car M3-N
7941a05388SGeert Uytterhoeven              - renesas,r8a77970-cmt0     # 32-bit CMT0 on R-Car V3M
8041a05388SGeert Uytterhoeven              - renesas,r8a77980-cmt0     # 32-bit CMT0 on R-Car V3H
8141a05388SGeert Uytterhoeven              - renesas,r8a77990-cmt0     # 32-bit CMT0 on R-Car E3
8241a05388SGeert Uytterhoeven              - renesas,r8a77995-cmt0     # 32-bit CMT0 on R-Car D3
83fe8324f3SWolfram Sang              - renesas,r8a779a0-cmt0     # 32-bit CMT0 on R-Car V3U
8441a05388SGeert Uytterhoeven          - const: renesas,rcar-gen3-cmt0 # 32-bit CMT0 on R-Car Gen3 and RZ/G2
8541a05388SGeert Uytterhoeven
8641a05388SGeert Uytterhoeven      - items:
8741a05388SGeert Uytterhoeven          - enum:
88*525b2961SWolfram Sang              - renesas,r8a779f0-cmt0     # 32-bit CMT0 on R-Car S4-8
89*525b2961SWolfram Sang          - const: renesas,rcar-gen4-cmt0 # 32-bit CMT0 on R-Car Gen4
90*525b2961SWolfram Sang
91*525b2961SWolfram Sang      - items:
92*525b2961SWolfram Sang          - enum:
9341a05388SGeert Uytterhoeven              - renesas,r8a774a1-cmt1     # 48-bit CMT on RZ/G2M
9441a05388SGeert Uytterhoeven              - renesas,r8a774b1-cmt1     # 48-bit CMT on RZ/G2N
9541a05388SGeert Uytterhoeven              - renesas,r8a774c0-cmt1     # 48-bit CMT on RZ/G2E
9651b705afSLad Prabhakar              - renesas,r8a774e1-cmt1     # 48-bit CMT on RZ/G2H
9741a05388SGeert Uytterhoeven              - renesas,r8a7795-cmt1      # 48-bit CMT on R-Car H3
9841a05388SGeert Uytterhoeven              - renesas,r8a7796-cmt1      # 48-bit CMT on R-Car M3-W
99446e1a94SNiklas Söderlund              - renesas,r8a77961-cmt1     # 48-bit CMT on R-Car M3-W+
10041a05388SGeert Uytterhoeven              - renesas,r8a77965-cmt1     # 48-bit CMT on R-Car M3-N
10141a05388SGeert Uytterhoeven              - renesas,r8a77970-cmt1     # 48-bit CMT on R-Car V3M
10241a05388SGeert Uytterhoeven              - renesas,r8a77980-cmt1     # 48-bit CMT on R-Car V3H
10341a05388SGeert Uytterhoeven              - renesas,r8a77990-cmt1     # 48-bit CMT on R-Car E3
10441a05388SGeert Uytterhoeven              - renesas,r8a77995-cmt1     # 48-bit CMT on R-Car D3
105fe8324f3SWolfram Sang              - renesas,r8a779a0-cmt1     # 48-bit CMT on R-Car V3U
10641a05388SGeert Uytterhoeven          - const: renesas,rcar-gen3-cmt1 # 48-bit CMT on R-Car Gen3 and RZ/G2
10741a05388SGeert Uytterhoeven
108*525b2961SWolfram Sang      - items:
109*525b2961SWolfram Sang          - enum:
110*525b2961SWolfram Sang              - renesas,r8a779f0-cmt1     # 48-bit CMT on R-Car S4-8
111*525b2961SWolfram Sang          - const: renesas,rcar-gen4-cmt1 # 48-bit CMT on R-Car Gen4
112*525b2961SWolfram Sang
11341a05388SGeert Uytterhoeven  reg:
11441a05388SGeert Uytterhoeven    maxItems: 1
11541a05388SGeert Uytterhoeven
11641a05388SGeert Uytterhoeven  interrupts:
11741a05388SGeert Uytterhoeven    minItems: 1
11841a05388SGeert Uytterhoeven    maxItems: 8
11941a05388SGeert Uytterhoeven
12041a05388SGeert Uytterhoeven  clocks:
12141a05388SGeert Uytterhoeven    maxItems: 1
12241a05388SGeert Uytterhoeven
12341a05388SGeert Uytterhoeven  clock-names:
12441a05388SGeert Uytterhoeven    const: fck
12541a05388SGeert Uytterhoeven
12641a05388SGeert Uytterhoeven  power-domains:
12741a05388SGeert Uytterhoeven    maxItems: 1
12841a05388SGeert Uytterhoeven
12941a05388SGeert Uytterhoeven  resets:
13041a05388SGeert Uytterhoeven    maxItems: 1
13141a05388SGeert Uytterhoeven
13241a05388SGeert Uytterhoevenrequired:
13341a05388SGeert Uytterhoeven  - compatible
13441a05388SGeert Uytterhoeven  - reg
13541a05388SGeert Uytterhoeven  - interrupts
13641a05388SGeert Uytterhoeven  - clocks
13741a05388SGeert Uytterhoeven  - clock-names
13841a05388SGeert Uytterhoeven  - power-domains
13941a05388SGeert Uytterhoeven
14041a05388SGeert UytterhoevenallOf:
14141a05388SGeert Uytterhoeven  - if:
14241a05388SGeert Uytterhoeven      properties:
14341a05388SGeert Uytterhoeven        compatible:
14441a05388SGeert Uytterhoeven          contains:
14541a05388SGeert Uytterhoeven            enum:
14641a05388SGeert Uytterhoeven              - renesas,rcar-gen2-cmt0
14741a05388SGeert Uytterhoeven              - renesas,rcar-gen3-cmt0
14841a05388SGeert Uytterhoeven    then:
14941a05388SGeert Uytterhoeven      properties:
15041a05388SGeert Uytterhoeven        interrupts:
15141a05388SGeert Uytterhoeven          minItems: 2
15241a05388SGeert Uytterhoeven          maxItems: 2
15341a05388SGeert Uytterhoeven
15441a05388SGeert Uytterhoeven  - if:
15541a05388SGeert Uytterhoeven      properties:
15641a05388SGeert Uytterhoeven        compatible:
15741a05388SGeert Uytterhoeven          contains:
15841a05388SGeert Uytterhoeven            enum:
15941a05388SGeert Uytterhoeven              - renesas,rcar-gen2-cmt1
16041a05388SGeert Uytterhoeven              - renesas,rcar-gen3-cmt1
16141a05388SGeert Uytterhoeven    then:
16241a05388SGeert Uytterhoeven      properties:
16341a05388SGeert Uytterhoeven        interrupts:
16441a05388SGeert Uytterhoeven          minItems: 8
16541a05388SGeert Uytterhoeven          maxItems: 8
16641a05388SGeert Uytterhoeven
16741a05388SGeert UytterhoevenadditionalProperties: false
16841a05388SGeert Uytterhoeven
16941a05388SGeert Uytterhoevenexamples:
17041a05388SGeert Uytterhoeven  - |
17141a05388SGeert Uytterhoeven    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
17241a05388SGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/arm-gic.h>
17341a05388SGeert Uytterhoeven    #include <dt-bindings/power/r8a7790-sysc.h>
17441a05388SGeert Uytterhoeven    cmt0: timer@ffca0000 {
17541a05388SGeert Uytterhoeven            compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
17641a05388SGeert Uytterhoeven            reg = <0xffca0000 0x1004>;
17741a05388SGeert Uytterhoeven            interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
17841a05388SGeert Uytterhoeven                         <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
17941a05388SGeert Uytterhoeven            clocks = <&cpg CPG_MOD 124>;
18041a05388SGeert Uytterhoeven            clock-names = "fck";
18141a05388SGeert Uytterhoeven            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
18241a05388SGeert Uytterhoeven            resets = <&cpg 124>;
18341a05388SGeert Uytterhoeven    };
18441a05388SGeert Uytterhoeven
18541a05388SGeert Uytterhoeven    cmt1: timer@e6130000 {
18641a05388SGeert Uytterhoeven            compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
18741a05388SGeert Uytterhoeven            reg = <0xe6130000 0x1004>;
18841a05388SGeert Uytterhoeven            interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
18941a05388SGeert Uytterhoeven                         <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
19041a05388SGeert Uytterhoeven                         <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
19141a05388SGeert Uytterhoeven                         <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
19241a05388SGeert Uytterhoeven                         <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
19341a05388SGeert Uytterhoeven                         <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
19441a05388SGeert Uytterhoeven                         <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
19541a05388SGeert Uytterhoeven                         <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
19641a05388SGeert Uytterhoeven            clocks = <&cpg CPG_MOD 329>;
19741a05388SGeert Uytterhoeven            clock-names = "fck";
19841a05388SGeert Uytterhoeven            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
19941a05388SGeert Uytterhoeven            resets = <&cpg 329>;
20041a05388SGeert Uytterhoeven    };
201