Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 | |
| 7 | title: Renesas R-Mobile/R-Car Timer Unit (TMU) |
| 8 | |
| 9 | maintainers: |
| 10 | - Geert Uytterhoeven <geert+renesas@glider.be> |
| 11 | - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| 12 | |
| 13 | description: |
| 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 | |
| 20 | properties: |
| 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 | - renesas,tmu-r8a779a0 # R-Car V3U |
| 40 | - renesas,tmu-r8a779f0 # R-Car S4-8 |
| 41 | - renesas,tmu-r8a779g0 # R-Car V4H |
Tom Rini | 762f85b | 2024-07-20 11:15:10 -0600 | [diff] [blame] | 42 | - renesas,tmu-r8a779h0 # R-Car V4M |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 43 | - const: renesas,tmu |
| 44 | |
| 45 | reg: |
| 46 | maxItems: 1 |
| 47 | |
| 48 | interrupts: |
| 49 | minItems: 2 |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 50 | items: |
| 51 | - description: Underflow interrupt, channel 0 |
| 52 | - description: Underflow interrupt, channel 1 |
| 53 | - description: Underflow interrupt, channel 2 |
| 54 | - description: Input capture interrupt, channel 2 |
| 55 | |
| 56 | interrupt-names: |
| 57 | minItems: 2 |
| 58 | items: |
| 59 | - const: tuni0 |
| 60 | - const: tuni1 |
| 61 | - const: tuni2 |
| 62 | - const: ticpi2 |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 63 | |
| 64 | clocks: |
| 65 | maxItems: 1 |
| 66 | |
| 67 | clock-names: |
| 68 | const: fck |
| 69 | |
| 70 | power-domains: |
| 71 | maxItems: 1 |
| 72 | |
| 73 | resets: |
| 74 | maxItems: 1 |
| 75 | |
| 76 | '#renesas,channels': |
| 77 | description: |
| 78 | Number of channels implemented by the timer. |
| 79 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 80 | enum: [ 2, 3 ] |
| 81 | default: 3 |
| 82 | |
| 83 | required: |
| 84 | - compatible |
| 85 | - reg |
| 86 | - interrupts |
| 87 | - clocks |
| 88 | - clock-names |
| 89 | - power-domains |
| 90 | |
| 91 | if: |
| 92 | not: |
| 93 | properties: |
| 94 | compatible: |
| 95 | contains: |
| 96 | enum: |
| 97 | - renesas,tmu-r8a7740 |
| 98 | - renesas,tmu-r8a7778 |
| 99 | - renesas,tmu-r8a7779 |
| 100 | then: |
| 101 | required: |
| 102 | - resets |
| 103 | |
| 104 | additionalProperties: false |
| 105 | |
| 106 | examples: |
| 107 | - | |
| 108 | #include <dt-bindings/clock/r8a7779-clock.h> |
| 109 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 110 | #include <dt-bindings/power/r8a7779-sysc.h> |
| 111 | tmu0: timer@ffd80000 { |
| 112 | compatible = "renesas,tmu-r8a7779", "renesas,tmu"; |
| 113 | reg = <0xffd80000 0x30>; |
| 114 | interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>, |
| 115 | <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>, |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 116 | <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>, |
| 117 | <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; |
| 118 | interrupt-names = "tuni0", "tuni1", "tuni2", "ticpi2"; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 119 | clocks = <&mstp0_clks R8A7779_CLK_TMU0>; |
| 120 | clock-names = "fck"; |
| 121 | power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; |
| 122 | #renesas,channels = <3>; |
| 123 | }; |