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 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 93446e1a94SNiklas Söderlund - renesas,r8a77961-cmt1 # 48-bit CMT on R-Car M3-W+ 9441a05388SGeert Uytterhoeven - renesas,r8a77965-cmt1 # 48-bit CMT on R-Car M3-N 9541a05388SGeert Uytterhoeven - renesas,r8a77970-cmt1 # 48-bit CMT on R-Car V3M 9641a05388SGeert Uytterhoeven - renesas,r8a77980-cmt1 # 48-bit CMT on R-Car V3H 9741a05388SGeert Uytterhoeven - renesas,r8a77990-cmt1 # 48-bit CMT on R-Car E3 9841a05388SGeert Uytterhoeven - renesas,r8a77995-cmt1 # 48-bit CMT on R-Car D3 9941a05388SGeert Uytterhoeven - const: renesas,rcar-gen3-cmt1 # 48-bit CMT on R-Car Gen3 and RZ/G2 10041a05388SGeert Uytterhoeven 101525b2961SWolfram Sang - items: 102525b2961SWolfram Sang - enum: 1034abb3859SGeert Uytterhoeven - renesas,r8a779a0-cmt0 # 32-bit CMT0 on R-Car V3U 1044abb3859SGeert Uytterhoeven - renesas,r8a779f0-cmt0 # 32-bit CMT0 on R-Car S4-8 10583571a43SWolfram Sang - renesas,r8a779g0-cmt0 # 32-bit CMT0 on R-Car V4H 106*ed53d391SGeert Uytterhoeven - renesas,r8a779h0-cmt0 # 32-bit CMT0 on R-Car V4M 1074abb3859SGeert Uytterhoeven - const: renesas,rcar-gen4-cmt0 # 32-bit CMT0 on R-Car Gen4 1084abb3859SGeert Uytterhoeven 1094abb3859SGeert Uytterhoeven - items: 1104abb3859SGeert Uytterhoeven - enum: 111bd0ed737SWolfram Sang - renesas,r8a779a0-cmt1 # 48-bit CMT on R-Car V3U 112525b2961SWolfram Sang - renesas,r8a779f0-cmt1 # 48-bit CMT on R-Car S4-8 11383571a43SWolfram Sang - renesas,r8a779g0-cmt1 # 48-bit CMT on R-Car V4H 114*ed53d391SGeert Uytterhoeven - renesas,r8a779h0-cmt1 # 48-bit CMT on R-Car V4M 115525b2961SWolfram Sang - const: renesas,rcar-gen4-cmt1 # 48-bit CMT on R-Car Gen4 116525b2961SWolfram Sang 11741a05388SGeert Uytterhoeven reg: 11841a05388SGeert Uytterhoeven maxItems: 1 11941a05388SGeert Uytterhoeven 12041a05388SGeert Uytterhoeven interrupts: 12141a05388SGeert Uytterhoeven minItems: 1 12241a05388SGeert Uytterhoeven maxItems: 8 12341a05388SGeert Uytterhoeven 12441a05388SGeert Uytterhoeven clocks: 12541a05388SGeert Uytterhoeven maxItems: 1 12641a05388SGeert Uytterhoeven 12741a05388SGeert Uytterhoeven clock-names: 12841a05388SGeert Uytterhoeven const: fck 12941a05388SGeert Uytterhoeven 13041a05388SGeert Uytterhoeven power-domains: 13141a05388SGeert Uytterhoeven maxItems: 1 13241a05388SGeert Uytterhoeven 13341a05388SGeert Uytterhoeven resets: 13441a05388SGeert Uytterhoeven maxItems: 1 13541a05388SGeert Uytterhoeven 13641a05388SGeert Uytterhoevenrequired: 13741a05388SGeert Uytterhoeven - compatible 13841a05388SGeert Uytterhoeven - reg 13941a05388SGeert Uytterhoeven - interrupts 14041a05388SGeert Uytterhoeven - clocks 14141a05388SGeert Uytterhoeven - clock-names 14241a05388SGeert Uytterhoeven - power-domains 14341a05388SGeert Uytterhoeven 14441a05388SGeert UytterhoevenallOf: 14541a05388SGeert Uytterhoeven - if: 14641a05388SGeert Uytterhoeven properties: 14741a05388SGeert Uytterhoeven compatible: 14841a05388SGeert Uytterhoeven contains: 14941a05388SGeert Uytterhoeven enum: 15041a05388SGeert Uytterhoeven - renesas,rcar-gen2-cmt0 15141a05388SGeert Uytterhoeven - renesas,rcar-gen3-cmt0 1524abb3859SGeert Uytterhoeven - renesas,rcar-gen4-cmt0 15341a05388SGeert Uytterhoeven then: 15441a05388SGeert Uytterhoeven properties: 15541a05388SGeert Uytterhoeven interrupts: 15641a05388SGeert Uytterhoeven minItems: 2 15741a05388SGeert Uytterhoeven maxItems: 2 15841a05388SGeert Uytterhoeven 15941a05388SGeert Uytterhoeven - if: 16041a05388SGeert Uytterhoeven properties: 16141a05388SGeert Uytterhoeven compatible: 16241a05388SGeert Uytterhoeven contains: 16341a05388SGeert Uytterhoeven enum: 16441a05388SGeert Uytterhoeven - renesas,rcar-gen2-cmt1 16541a05388SGeert Uytterhoeven - renesas,rcar-gen3-cmt1 1664abb3859SGeert Uytterhoeven - renesas,rcar-gen4-cmt1 16741a05388SGeert Uytterhoeven then: 16841a05388SGeert Uytterhoeven properties: 16941a05388SGeert Uytterhoeven interrupts: 17041a05388SGeert Uytterhoeven minItems: 8 17141a05388SGeert Uytterhoeven maxItems: 8 17241a05388SGeert Uytterhoeven 17341a05388SGeert UytterhoevenadditionalProperties: false 17441a05388SGeert Uytterhoeven 17541a05388SGeert Uytterhoevenexamples: 17641a05388SGeert Uytterhoeven - | 17741a05388SGeert Uytterhoeven #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 17841a05388SGeert Uytterhoeven #include <dt-bindings/interrupt-controller/arm-gic.h> 17941a05388SGeert Uytterhoeven #include <dt-bindings/power/r8a7790-sysc.h> 18041a05388SGeert Uytterhoeven cmt0: timer@ffca0000 { 18141a05388SGeert Uytterhoeven compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0"; 18241a05388SGeert Uytterhoeven reg = <0xffca0000 0x1004>; 18341a05388SGeert Uytterhoeven interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, 18441a05388SGeert Uytterhoeven <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; 18541a05388SGeert Uytterhoeven clocks = <&cpg CPG_MOD 124>; 18641a05388SGeert Uytterhoeven clock-names = "fck"; 18741a05388SGeert Uytterhoeven power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 18841a05388SGeert Uytterhoeven resets = <&cpg 124>; 18941a05388SGeert Uytterhoeven }; 19041a05388SGeert Uytterhoeven 19141a05388SGeert Uytterhoeven cmt1: timer@e6130000 { 19241a05388SGeert Uytterhoeven compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1"; 19341a05388SGeert Uytterhoeven reg = <0xe6130000 0x1004>; 19441a05388SGeert Uytterhoeven interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, 19541a05388SGeert Uytterhoeven <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, 19641a05388SGeert Uytterhoeven <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, 19741a05388SGeert Uytterhoeven <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, 19841a05388SGeert Uytterhoeven <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, 19941a05388SGeert Uytterhoeven <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, 20041a05388SGeert Uytterhoeven <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, 20141a05388SGeert Uytterhoeven <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; 20241a05388SGeert Uytterhoeven clocks = <&cpg CPG_MOD 329>; 20341a05388SGeert Uytterhoeven clock-names = "fck"; 20441a05388SGeert Uytterhoeven power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 20541a05388SGeert Uytterhoeven resets = <&cpg 329>; 20641a05388SGeert Uytterhoeven }; 207