xref: /freebsd/sys/contrib/device-tree/Bindings/timer/renesas,tmu.yaml (revision 77013d11e6483b970af25e13c9b892075742f7e5)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/timer/renesas,tmu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas R-Mobile/R-Car Timer Unit (TMU)
8
9maintainers:
10  - Geert Uytterhoeven <geert+renesas@glider.be>
11  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
12
13description:
14  The TMU is a 32-bit timer/counter with configurable clock inputs and
15  programmable compare match.
16
17  Channels share hardware resources but their counter and compare match value
18  are independent. The TMU hardware supports up to three channels.
19
20properties:
21  compatible:
22    items:
23      - enum:
24          - renesas,tmu-r8a7740  # R-Mobile A1
25          - renesas,tmu-r8a774a1 # RZ/G2M
26          - renesas,tmu-r8a774b1 # RZ/G2N
27          - renesas,tmu-r8a774c0 # RZ/G2E
28          - renesas,tmu-r8a774e1 # RZ/G2H
29          - renesas,tmu-r8a7778  # R-Car M1A
30          - renesas,tmu-r8a7779  # R-Car H1
31          - renesas,tmu-r8a7795  # R-Car H3
32          - renesas,tmu-r8a7796  # R-Car M3-W
33          - renesas,tmu-r8a77961 # R-Car M3-W+
34          - renesas,tmu-r8a77965 # R-Car M3-N
35          - renesas,tmu-r8a77970 # R-Car V3M
36          - renesas,tmu-r8a77980 # R-Car V3H
37          - renesas,tmu-r8a77990 # R-Car E3
38          - renesas,tmu-r8a77995 # R-Car D3
39      - const: renesas,tmu
40
41  reg:
42    maxItems: 1
43
44  interrupts:
45    minItems: 2
46    maxItems: 3
47
48  clocks:
49    maxItems: 1
50
51  clock-names:
52    const: fck
53
54  power-domains:
55    maxItems: 1
56
57  resets:
58    maxItems: 1
59
60  '#renesas,channels':
61    description:
62      Number of channels implemented by the timer.
63    $ref: /schemas/types.yaml#/definitions/uint32
64    enum: [ 2, 3 ]
65    default: 3
66
67required:
68  - compatible
69  - reg
70  - interrupts
71  - clocks
72  - clock-names
73  - power-domains
74
75if:
76  not:
77    properties:
78      compatible:
79        contains:
80          enum:
81            - renesas,tmu-r8a7740
82            - renesas,tmu-r8a7778
83            - renesas,tmu-r8a7779
84then:
85  required:
86    - resets
87
88additionalProperties: false
89
90examples:
91  - |
92    #include <dt-bindings/clock/r8a7779-clock.h>
93    #include <dt-bindings/interrupt-controller/arm-gic.h>
94    #include <dt-bindings/power/r8a7779-sysc.h>
95    tmu0: timer@ffd80000 {
96            compatible = "renesas,tmu-r8a7779", "renesas,tmu";
97            reg = <0xffd80000 0x30>;
98            interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
99                         <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
100                         <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
101            clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
102            clock-names = "fck";
103            power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
104            #renesas,channels = <3>;
105    };
106