xref: /freebsd/sys/contrib/device-tree/Bindings/timer/renesas,tmu.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/timer/renesas,tmu.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: Renesas R-Mobile/R-Car Timer Unit (TMU)
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Geert Uytterhoeven <geert+renesas@glider.be>
115def4c47SEmmanuel Vadot  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
125def4c47SEmmanuel Vadot
135def4c47SEmmanuel Vadotdescription:
145def4c47SEmmanuel Vadot  The TMU is a 32-bit timer/counter with configurable clock inputs and
155def4c47SEmmanuel Vadot  programmable compare match.
165def4c47SEmmanuel Vadot
175def4c47SEmmanuel Vadot  Channels share hardware resources but their counter and compare match value
185def4c47SEmmanuel Vadot  are independent. The TMU hardware supports up to three channels.
195def4c47SEmmanuel Vadot
205def4c47SEmmanuel Vadotproperties:
215def4c47SEmmanuel Vadot  compatible:
225def4c47SEmmanuel Vadot    items:
235def4c47SEmmanuel Vadot      - enum:
245def4c47SEmmanuel Vadot          - renesas,tmu-r8a7740  # R-Mobile A1
255def4c47SEmmanuel Vadot          - renesas,tmu-r8a774a1 # RZ/G2M
265def4c47SEmmanuel Vadot          - renesas,tmu-r8a774b1 # RZ/G2N
275def4c47SEmmanuel Vadot          - renesas,tmu-r8a774c0 # RZ/G2E
285def4c47SEmmanuel Vadot          - renesas,tmu-r8a774e1 # RZ/G2H
295def4c47SEmmanuel Vadot          - renesas,tmu-r8a7778  # R-Car M1A
305def4c47SEmmanuel Vadot          - renesas,tmu-r8a7779  # R-Car H1
312eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a7795  # R-Car H3
322eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a7796  # R-Car M3-W
332eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a77961 # R-Car M3-W+
342eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a77965 # R-Car M3-N
355def4c47SEmmanuel Vadot          - renesas,tmu-r8a77970 # R-Car V3M
365def4c47SEmmanuel Vadot          - renesas,tmu-r8a77980 # R-Car V3H
372eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a77990 # R-Car E3
382eb4d8dcSEmmanuel Vadot          - renesas,tmu-r8a77995 # R-Car D3
395956d97fSEmmanuel Vadot          - renesas,tmu-r8a779a0 # R-Car V3U
407ef62cebSEmmanuel Vadot          - renesas,tmu-r8a779f0 # R-Car S4-8
41*8bab661aSEmmanuel Vadot          - renesas,tmu-r8a779g0 # R-Car V4H
425def4c47SEmmanuel Vadot      - const: renesas,tmu
435def4c47SEmmanuel Vadot
445def4c47SEmmanuel Vadot  reg:
455def4c47SEmmanuel Vadot    maxItems: 1
465def4c47SEmmanuel Vadot
475def4c47SEmmanuel Vadot  interrupts:
485def4c47SEmmanuel Vadot    minItems: 2
495def4c47SEmmanuel Vadot    maxItems: 3
505def4c47SEmmanuel Vadot
515def4c47SEmmanuel Vadot  clocks:
525def4c47SEmmanuel Vadot    maxItems: 1
535def4c47SEmmanuel Vadot
545def4c47SEmmanuel Vadot  clock-names:
555def4c47SEmmanuel Vadot    const: fck
565def4c47SEmmanuel Vadot
575def4c47SEmmanuel Vadot  power-domains:
585def4c47SEmmanuel Vadot    maxItems: 1
595def4c47SEmmanuel Vadot
605def4c47SEmmanuel Vadot  resets:
615def4c47SEmmanuel Vadot    maxItems: 1
625def4c47SEmmanuel Vadot
635def4c47SEmmanuel Vadot  '#renesas,channels':
645def4c47SEmmanuel Vadot    description:
655def4c47SEmmanuel Vadot      Number of channels implemented by the timer.
665def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
675def4c47SEmmanuel Vadot    enum: [ 2, 3 ]
685def4c47SEmmanuel Vadot    default: 3
695def4c47SEmmanuel Vadot
705def4c47SEmmanuel Vadotrequired:
715def4c47SEmmanuel Vadot  - compatible
725def4c47SEmmanuel Vadot  - reg
735def4c47SEmmanuel Vadot  - interrupts
745def4c47SEmmanuel Vadot  - clocks
755def4c47SEmmanuel Vadot  - clock-names
765def4c47SEmmanuel Vadot  - power-domains
775def4c47SEmmanuel Vadot
785def4c47SEmmanuel Vadotif:
795def4c47SEmmanuel Vadot  not:
805def4c47SEmmanuel Vadot    properties:
815def4c47SEmmanuel Vadot      compatible:
825def4c47SEmmanuel Vadot        contains:
835def4c47SEmmanuel Vadot          enum:
845def4c47SEmmanuel Vadot            - renesas,tmu-r8a7740
855def4c47SEmmanuel Vadot            - renesas,tmu-r8a7778
865def4c47SEmmanuel Vadot            - renesas,tmu-r8a7779
875def4c47SEmmanuel Vadotthen:
885def4c47SEmmanuel Vadot  required:
895def4c47SEmmanuel Vadot    - resets
905def4c47SEmmanuel Vadot
915def4c47SEmmanuel VadotadditionalProperties: false
925def4c47SEmmanuel Vadot
935def4c47SEmmanuel Vadotexamples:
945def4c47SEmmanuel Vadot  - |
955def4c47SEmmanuel Vadot    #include <dt-bindings/clock/r8a7779-clock.h>
965def4c47SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
975def4c47SEmmanuel Vadot    #include <dt-bindings/power/r8a7779-sysc.h>
985def4c47SEmmanuel Vadot    tmu0: timer@ffd80000 {
995def4c47SEmmanuel Vadot            compatible = "renesas,tmu-r8a7779", "renesas,tmu";
1005def4c47SEmmanuel Vadot            reg = <0xffd80000 0x30>;
1015def4c47SEmmanuel Vadot            interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
1025def4c47SEmmanuel Vadot                         <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
1035def4c47SEmmanuel Vadot                         <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
1045def4c47SEmmanuel Vadot            clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
1055def4c47SEmmanuel Vadot            clock-names = "fck";
1065def4c47SEmmanuel Vadot            power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
1075def4c47SEmmanuel Vadot            #renesas,channels = <3>;
1085def4c47SEmmanuel Vadot    };
109