Renesas Compare Match Timer (CMT)
Schema identifier ($id): "http://devicetree.org/schemas/timer/renesas,cmt.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Geert Uytterhoeven <geert+renesas@glider.be>", "Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>"
The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock inputs and programmable compare match. Channels share hardware resources but their counter and compare match values are independent. A particular CMT instance can implement only a subset of the channels supported by the CMT model. Channel indices represent the hardware position of the channel in the CMT and don't match the channel numbers in the datasheets.
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a7740-cmt0","renesas,r8a7740-cmt1","renesas,r8a7740-cmt2","renesas,r8a7740-cmt3","renesas,r8a7740-cmt4","renesas,sh73a0-cmt0","renesas,sh73a0-cmt1","renesas,sh73a0-cmt2","renesas,sh73a0-cmt3","renesas,sh73a0-cmt4"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a73a4-cmt0","renesas,r8a7742-cmt0","renesas,r8a7743-cmt0","renesas,r8a7744-cmt0","renesas,r8a7745-cmt0","renesas,r8a77470-cmt0","renesas,r8a7790-cmt0","renesas,r8a7791-cmt0","renesas,r8a7792-cmt0","renesas,r8a7793-cmt0","renesas,r8a7794-cmt0"Item 2
Exact value (
const):"renesas,rcar-gen2-cmt0"
Rule 3
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a73a4-cmt1","renesas,r8a7742-cmt1","renesas,r8a7743-cmt1","renesas,r8a7744-cmt1","renesas,r8a7745-cmt1","renesas,r8a77470-cmt1","renesas,r8a7790-cmt1","renesas,r8a7791-cmt1","renesas,r8a7792-cmt1","renesas,r8a7793-cmt1","renesas,r8a7794-cmt1"Item 2
Exact value (
const):"renesas,rcar-gen2-cmt1"
Rule 4
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a774a1-cmt0","renesas,r8a774b1-cmt0","renesas,r8a774c0-cmt0","renesas,r8a774e1-cmt0","renesas,r8a7795-cmt0","renesas,r8a7796-cmt0","renesas,r8a77961-cmt0","renesas,r8a77965-cmt0","renesas,r8a77970-cmt0","renesas,r8a77980-cmt0","renesas,r8a77990-cmt0","renesas,r8a77995-cmt0"Item 2
Exact value (
const):"renesas,rcar-gen3-cmt0"
Rule 5
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a774a1-cmt1","renesas,r8a774b1-cmt1","renesas,r8a774c0-cmt1","renesas,r8a774e1-cmt1","renesas,r8a7795-cmt1","renesas,r8a7796-cmt1","renesas,r8a77961-cmt1","renesas,r8a77965-cmt1","renesas,r8a77970-cmt1","renesas,r8a77980-cmt1","renesas,r8a77990-cmt1","renesas,r8a77995-cmt1"Item 2
Exact value (
const):"renesas,rcar-gen3-cmt1"
Rule 6
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a779a0-cmt0","renesas,r8a779f0-cmt0","renesas,r8a779g0-cmt0","renesas,r8a779h0-cmt0"Item 2
Exact value (
const):"renesas,rcar-gen4-cmt0"
Rule 7
Array item rules (
items)Item 1
Allowed values (
enum):"renesas,r8a779a0-cmt1","renesas,r8a779f0-cmt1","renesas,r8a779g0-cmt1","renesas,r8a779h0-cmt1"Item 2
Exact value (
const):"renesas,rcar-gen4-cmt1"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 8
clocks — required here #
Maximum number of items (maxItems): 1
clock-names — required here #
Exact value (const): "fck"
power-domains — required here #
Maximum number of items (maxItems): 1
resets — not listed as required here #
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "power-domains"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"renesas,rcar-gen2-cmt0","renesas,rcar-gen3-cmt0","renesas,rcar-gen4-cmt0"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereMinimum number of items (
minItems):2Maximum number of items (
maxItems):2
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"renesas,rcar-gen2-cmt1","renesas,rcar-gen3-cmt1","renesas,rcar-gen4-cmt1"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required hereMinimum number of items (
minItems):8Maximum number of items (
maxItems):8
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7790-sysc.h>
cmt0: timer@ffca0000 {
compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
reg = <0xffca0000 0x1004>;
interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 124>;
clock-names = "fck";
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
resets = <&cpg 124>;
};
cmt1: timer@e6130000 {
compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
reg = <0xe6130000 0x1004>;
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 329>;
clock-names = "fck";
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
resets = <&cpg 329>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 28: 32-bit CMT0 on R-Mobile A1
Line 29: 48-bit CMT1 on R-Mobile A1
Line 30: 32-bit CMT2 on R-Mobile A1
Line 31: 32-bit CMT3 on R-Mobile A1
Line 32: 32-bit CMT4 on R-Mobile A1
Line 33: 32-bit CMT0 on SH-Mobile AG5
Line 34: 48-bit CMT1 on SH-Mobile AG5
Line 35: 32-bit CMT2 on SH-Mobile AG5
Line 36: 32-bit CMT3 on SH-Mobile AG5
Line 37: 32-bit CMT4 on SH-Mobile AG5
Line 41: 32-bit CMT0 on R-Mobile APE6
Line 42: 32-bit CMT0 on RZ/G1H
Line 43: 32-bit CMT0 on RZ/G1M
Line 44: 32-bit CMT0 on RZ/G1N
Line 45: 32-bit CMT0 on RZ/G1E
Line 46: 32-bit CMT0 on RZ/G1C
Line 47: 32-bit CMT0 on R-Car H2
Line 48: 32-bit CMT0 on R-Car M2-W
Line 49: 32-bit CMT0 on R-Car V2H
Line 50: 32-bit CMT0 on R-Car M2-N
Line 51: 32-bit CMT0 on R-Car E2
Line 52: 32-bit CMT0 on R-Mobile APE6, R-Car Gen2 and RZ/G1
Line 56: 48-bit CMT1 on R-Mobile APE6
Line 57: 48-bit CMT1 on RZ/G1H
Line 58: 48-bit CMT1 on RZ/G1M
Line 59: 48-bit CMT1 on RZ/G1N
Line 60: 48-bit CMT1 on RZ/G1E
Line 61: 48-bit CMT1 on RZ/G1C
Line 62: 48-bit CMT1 on R-Car H2
Line 63: 48-bit CMT1 on R-Car M2-W
Line 64: 48-bit CMT1 on R-Car V2H
Line 65: 48-bit CMT1 on R-Car M2-N
Line 66: 48-bit CMT1 on R-Car E2
Line 67: 48-bit CMT1 on R-Mobile APE6, R-Car Gen2 and RZ/G1
Line 71: 32-bit CMT0 on RZ/G2M
Line 72: 32-bit CMT0 on RZ/G2N
Line 73: 32-bit CMT0 on RZ/G2E
Line 74: 32-bit CMT0 on RZ/G2H
Line 75: 32-bit CMT0 on R-Car H3
Line 76: 32-bit CMT0 on R-Car M3-W
Line 77: 32-bit CMT0 on R-Car M3-W+
Line 78: 32-bit CMT0 on R-Car M3-N
Line 79: 32-bit CMT0 on R-Car V3M
Line 80: 32-bit CMT0 on R-Car V3H
Line 81: 32-bit CMT0 on R-Car E3
Line 82: 32-bit CMT0 on R-Car D3
Line 83: 32-bit CMT0 on R-Car Gen3 and RZ/G2
Line 87: 48-bit CMT on RZ/G2M
Line 88: 48-bit CMT on RZ/G2N
Line 89: 48-bit CMT on RZ/G2E
Line 90: 48-bit CMT on RZ/G2H
Line 91: 48-bit CMT on R-Car H3
Line 92: 48-bit CMT on R-Car M3-W
Line 93: 48-bit CMT on R-Car M3-W+
Line 94: 48-bit CMT on R-Car M3-N
Line 95: 48-bit CMT on R-Car V3M
Line 96: 48-bit CMT on R-Car V3H
Line 97: 48-bit CMT on R-Car E3
Line 98: 48-bit CMT on R-Car D3
Line 99: 48-bit CMT on R-Car Gen3 and RZ/G2
Line 103: 32-bit CMT0 on R-Car V3U
Line 104: 32-bit CMT0 on R-Car S4-8
Line 105: 32-bit CMT0 on R-Car V4H
Line 106: 32-bit CMT0 on R-Car V4M
Line 107: 32-bit CMT0 on R-Car Gen4
Line 111: 48-bit CMT on R-Car V3U
Line 112: 48-bit CMT on R-Car S4-8
Line 113: 48-bit CMT on R-Car V4H
Line 114: 48-bit CMT on R-Car V4M
Line 115: 48-bit CMT on R-Car Gen4