← Documents Documentation/devicetree/bindings/timer/renesas,tmu.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

Renesas R-Mobile/R-Car Timer Unit

Renesas TMU의 channel interrupt·fck과 SoC별 reset 조건을 설명합니다.

Source pathDocumentation/devicetree/bindings/timer/renesas,tmu.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

renesas,tmu.yaml:1-136

Renesas TMU의 channel interrupt·fck과 SoC별 reset 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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 <[email protected]>
11 - Laurent Pinchart <[email protected]>
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-r8a73a4 # R-Mobile APE6
25 - renesas,tmu-r8a7740 # R-Mobile A1
26 - renesas,tmu-r8a7742 # RZ/G1H
27 - renesas,tmu-r8a7743 # RZ/G1M
28 - renesas,tmu-r8a7744 # RZ/G1N
29 - renesas,tmu-r8a7745 # RZ/G1E
30 - renesas,tmu-r8a77470 # RZ/G1C
31 - renesas,tmu-r8a774a1 # RZ/G2M
32 - renesas,tmu-r8a774b1 # RZ/G2N
33 - renesas,tmu-r8a774c0 # RZ/G2E
34 - renesas,tmu-r8a774e1 # RZ/G2H
35 - renesas,tmu-r8a7778 # R-Car M1A
36 - renesas,tmu-r8a7779 # R-Car H1
37 - renesas,tmu-r8a7790 # R-Car H2
38 - renesas,tmu-r8a7791 # R-Car M2-W
39 - renesas,tmu-r8a7792 # R-Car V2H
40 - renesas,tmu-r8a7793 # R-Car M2-N
41 - renesas,tmu-r8a7794 # R-Car E2
42 - renesas,tmu-r8a7795 # R-Car H3
43 - renesas,tmu-r8a7796 # R-Car M3-W
44 - renesas,tmu-r8a77961 # R-Car M3-W+
45 - renesas,tmu-r8a77965 # R-Car M3-N
46 - renesas,tmu-r8a77970 # R-Car V3M
47 - renesas,tmu-r8a77980 # R-Car V3H
48 - renesas,tmu-r8a77990 # R-Car E3
49 - renesas,tmu-r8a77995 # R-Car D3
50 - renesas,tmu-r8a779a0 # R-Car V3U
51 - renesas,tmu-r8a779f0 # R-Car S4-8
52 - renesas,tmu-r8a779g0 # R-Car V4H
53 - renesas,tmu-r8a779h0 # R-Car V4M
54 - const: renesas,tmu
55
56 reg:
57 maxItems: 1
58
59 interrupts:
60 minItems: 2
61 items:
62 - description: Underflow interrupt, channel 0
63 - description: Underflow interrupt, channel 1
64 - description: Underflow interrupt, channel 2
65 - description: Input capture interrupt, channel 2
66
67 interrupt-names:
68 minItems: 2
69 items:
70 - const: tuni0
71 - const: tuni1
72 - const: tuni2
73 - const: ticpi2
74
75 clocks:
76 maxItems: 1
77
78 clock-names:
79 const: fck
80
81 power-domains:
82 maxItems: 1
83
84 resets:
85 maxItems: 1
86
87 '#renesas,channels':
88 description:
89 Number of channels implemented by the timer.
90 $ref: /schemas/types.yaml#/definitions/uint32
91 enum: [ 2, 3 ]
92 default: 3
93
94 required:
95 - compatible
96 - reg
97 - interrupts
98 - interrupt-names
99 - clocks
100 - clock-names
101 - power-domains
102
103 if:
104 not:
105 properties:
106 compatible:
107 contains:
108 enum:
109 - renesas,tmu-r8a73a4
110 - renesas,tmu-r8a7740
111 - renesas,tmu-r8a7778
112 - renesas,tmu-r8a7779
113 then:
114 required:
115 - resets
116
117 additionalProperties: false
118
119 examples:
120 - |
121 #include <dt-bindings/clock/r8a7779-clock.h>
122 #include <dt-bindings/interrupt-controller/arm-gic.h>
123 #include <dt-bindings/power/r8a7779-sysc.h>
124 tmu0: timer@ffd80000 {
125 compatible = "renesas,tmu-r8a7779", "renesas,tmu";
126 reg = <0xffd80000 0x30>;
127 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
128 <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
129 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
130 <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
131 interrupt-names = "tuni0", "tuni1", "tuni2", "ticpi2";
132 clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
133 clock-names = "fck";
134 power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
135 #renesas,channels = <3>;
136 };
137

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Renesas R-Mobile/R-Car TMU

1-19

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Renesas R-Mobile/R-Car Timer Unit(TMU)을 정의합니다. TMU는 clock input을 설정하고 compare match를 programming할 수 있는 32-bit timer/counter입니다. Channel은 hardware resource를 공유하지만 counter와 compare match 값은 독립적이며 hardware는 최대 세 channel을 지원합니다. Maintainer는 Geert Uytterhoeven와 Laurent Pinchart입니다.

R-Mobile·RZ/G·R-Car compatible

20-55

R-Mobile APE6·A1, RZ/G1·G2, R-Car M1A·H1과 R-Car Gen2~Gen4의 각 SoC는 목록의 SoC별 `renesas,tmu-*` compatible 뒤에 generic `renesas,tmu` fallback을 둡니다. 목록에는 R-Car V3U, S4-8, V4H, V4M까지 포함됩니다.

properties:
  compatible:
    items:
      - enum:
          - renesas,tmu-r8a73a4  # R-Mobile APE6
          - renesas,tmu-r8a7740  # R-Mobile A1
          - renesas,tmu-r8a7742  # RZ/G1H
          - renesas,tmu-r8a7743  # RZ/G1M
          - renesas,tmu-r8a7744  # RZ/G1N
          - renesas,tmu-r8a7745  # RZ/G1E
          - renesas,tmu-r8a77470 # RZ/G1C
          - renesas,tmu-r8a774a1 # RZ/G2M
          - renesas,tmu-r8a774b1 # RZ/G2N
          - renesas,tmu-r8a774c0 # RZ/G2E
          - renesas,tmu-r8a774e1 # RZ/G2H
          - renesas,tmu-r8a7778  # R-Car M1A
          - renesas,tmu-r8a7779  # R-Car H1
          - renesas,tmu-r8a7790  # R-Car H2
          - renesas,tmu-r8a7791  # R-Car M2-W
          - renesas,tmu-r8a7792  # R-Car V2H
          - renesas,tmu-r8a7793  # R-Car M2-N
          - renesas,tmu-r8a7794  # R-Car E2
          - renesas,tmu-r8a7795  # R-Car H3
          - renesas,tmu-r8a7796  # R-Car M3-W
          - renesas,tmu-r8a77961 # R-Car M3-W+
          - renesas,tmu-r8a77965 # R-Car M3-N
          - renesas,tmu-r8a77970 # R-Car V3M
          - renesas,tmu-r8a77980 # R-Car V3H
          - renesas,tmu-r8a77990 # R-Car E3
          - renesas,tmu-r8a77995 # R-Car D3
          - renesas,tmu-r8a779a0 # R-Car V3U
          - renesas,tmu-r8a779f0 # R-Car S4-8
          - renesas,tmu-r8a779g0 # R-Car V4H
          - renesas,tmu-r8a779h0 # R-Car V4M
      - const: renesas,tmu

Channel interrupt와 fck

56-102

`reg`, `clocks`, `power-domains`, 선택적인 `resets`는 각각 최대 한 항목입니다. `interrupts`와 `interrupt-names`는 최소 두 항목이며 hardware 순서로 channel 0·1·2 underflow interrupt인 `tuni0`, `tuni1`, `tuni2`와 channel 2 input capture interrupt인 `ticpi2`를 사용합니다. Clock 이름은 `fck`입니다.

`#renesas,channels`는 timer가 실제 구현한 channel 수를 나타내는 uint32이며 2 또는 3을 허용하고 기본값은 3입니다. `compatible`, `reg`, `interrupts`, `interrupt-names`, `clocks`, `clock-names`, `power-domains`가 필수입니다.

  reg:
    maxItems: 1

  interrupts:
    minItems: 2
    items:
      - description: Underflow interrupt, channel 0
      - description: Underflow interrupt, channel 1
      - description: Underflow interrupt, channel 2
      - description: Input capture interrupt, channel 2

  interrupt-names:
    minItems: 2
    items:
      - const: tuni0
      - const: tuni1
      - const: tuni2
      - const: ticpi2

  clocks:
    maxItems: 1

  clock-names:
    const: fck

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  '#renesas,channels':
    description:
      Number of channels implemented by the timer.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [ 2, 3 ]
    default: 3

required:
  - compatible
  - reg
  - interrupts
  - interrupt-names
  - clocks
  - clock-names
  - power-domains

구형 TMU의 reset 예외

103-118

Compatible 목록에 `renesas,tmu-r8a73a4`, `renesas,tmu-r8a7740`, `renesas,tmu-r8a7778`, `renesas,tmu-r8a7779` 중 하나도 없으면 `resets`가 추가로 필수입니다. 추가 속성은 허용되지 않습니다.

if:
  not:
    properties:
      compatible:
        contains:
          enum:
            - renesas,tmu-r8a73a4
            - renesas,tmu-r8a7740
            - renesas,tmu-r8a7778
            - renesas,tmu-r8a7779
then:
  required:
    - resets

additionalProperties: false

R-Car H1 TMU0 예제

119-136

예제는 `timer@ffd80000`에 R-Car H1 compatible과 generic fallback, 0x30-byte register 영역을 지정합니다. GIC SPI 32~34는 channel 0~2 underflow, GIC SPI 35는 channel 2 input capture interrupt이며 모두 level-high입니다. `R8A7779_CLK_TMU0` clock을 `fck`으로 연결하고 always-on power domain과 channel 수 3을 지정합니다. R-Car H1은 reset 예외이므로 `resets`가 없습니다.

examples:
  - |
    #include <dt-bindings/clock/r8a7779-clock.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a7779-sysc.h>
    tmu0: timer@ffd80000 {
        compatible = "renesas,tmu-r8a7779", "renesas,tmu";
        reg = <0xffd80000 0x30>;
        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "tuni0", "tuni1", "tuni2", "ticpi2";
        clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
        clock-names = "fck";
        power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
        #renesas,channels = <3>;
    };