요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer/ingenic,tcu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ingenic SoCs Timer/Counter Unit (TCU)
description: |
For a description of the TCU hardware and drivers, have a look at
Documentation/arch/mips/ingenic-tcu.rst.
maintainers:
- Paul Cercueil <[email protected]>
select:
properties:
compatible:
contains:
enum:
- ingenic,jz4740-tcu
- ingenic,jz4725b-tcu
- ingenic,jz4760-tcu
- ingenic,jz4760b-tcu
- ingenic,jz4770-tcu
- ingenic,jz4780-tcu
- ingenic,x1000-tcu
required:
- compatible
properties:
$nodename:
pattern: "^timer@[0-9a-f]+$"
"#address-cells":
const: 1
"#size-cells":
const: 1
"#clock-cells":
const: 1
"#interrupt-cells":
const: 1
interrupt-controller: true
ranges: true
compatible:
oneOf:
- items:
- enum:
- ingenic,jz4740-tcu
- ingenic,jz4725b-tcu
- ingenic,jz4760-tcu
- ingenic,x1000-tcu
- const: simple-mfd
- items:
- enum:
- ingenic,jz4780-tcu
- ingenic,jz4770-tcu
- ingenic,jz4760b-tcu
- const: ingenic,jz4760-tcu
- const: simple-mfd
reg:
maxItems: 1
clocks:
items:
- description: RTC clock
- description: EXT clock
- description: PCLK clock
- description: TCU clock
minItems: 3
clock-names:
items:
- const: rtc
- const: ext
- const: pclk
- const: tcu
minItems: 3
interrupts:
items:
- description: TCU0 interrupt
- description: TCU1 interrupt
- description: TCU2 interrupt
minItems: 1
assigned-clocks:
minItems: 1
maxItems: 8
assigned-clock-parents:
minItems: 1
maxItems: 8
assigned-clock-rates:
minItems: 1
maxItems: 8
ingenic,pwm-channels-mask:
description: Bitmask of TCU channels reserved for PWM use.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x00
maximum: 0xff
default: 0xfc
patternProperties:
"^watchdog@[a-f0-9]+$":
type: object
$ref: /schemas/watchdog/watchdog.yaml#
unevaluatedProperties: false
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4740-watchdog
- ingenic,jz4780-watchdog
- items:
- enum:
- ingenic,jz4770-watchdog
- ingenic,jz4760b-watchdog
- ingenic,jz4760-watchdog
- ingenic,jz4725b-watchdog
- const: ingenic,jz4740-watchdog
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: wdt
required:
- compatible
- reg
- clocks
- clock-names
"^pwm@[a-f0-9]+$":
type: object
$ref: /schemas/pwm/pwm.yaml#
unevaluatedProperties: false
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4740-pwm
- ingenic,jz4725b-pwm
- ingenic,x1000-pwm
- items:
- enum:
- ingenic,jz4760-pwm
- ingenic,jz4760b-pwm
- ingenic,jz4770-pwm
- ingenic,jz4780-pwm
- const: ingenic,jz4740-pwm
reg:
maxItems: 1
clocks:
minItems: 6
maxItems: 8
clock-names:
items:
- const: timer0
- const: timer1
- const: timer2
- const: timer3
- const: timer4
- const: timer5
- const: timer6
- const: timer7
minItems: 6
required:
- compatible
- reg
- clocks
- clock-names
"^timer@[a-f0-9]+$":
type: object
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4725b-ost
- ingenic,jz4760b-ost
- items:
- const: ingenic,jz4760-ost
- const: ingenic,jz4725b-ost
- items:
- enum:
- ingenic,jz4780-ost
- ingenic,jz4770-ost
- const: ingenic,jz4760b-ost
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: ost
interrupts:
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
- interrupts
additionalProperties: false
required:
- "#clock-cells"
- "#interrupt-cells"
- interrupt-controller
- compatible
- reg
- clocks
- clock-names
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/ingenic,jz4770-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
tcu: timer@10002000 {
compatible = "ingenic,jz4770-tcu", "ingenic,jz4760-tcu", "simple-mfd";
reg = <0x10002000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x10002000 0x1000>;
#clock-cells = <1>;
clocks = <&cgu JZ4770_CLK_RTC>,
<&cgu JZ4770_CLK_EXT>,
<&cgu JZ4770_CLK_PCLK>;
clock-names = "rtc", "ext", "pclk";
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <27 26 25>;
watchdog: watchdog@0 {
compatible = "ingenic,jz4770-watchdog", "ingenic,jz4740-watchdog";
reg = <0x0 0xc>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
pwm: pwm@40 {
compatible = "ingenic,jz4770-pwm", "ingenic,jz4740-pwm";
reg = <0x40 0x80>;
#pwm-cells = <3>;
clocks = <&tcu TCU_CLK_TIMER0>,
<&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>,
<&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>,
<&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>,
<&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};
ost: timer@e0 {
compatible = "ingenic,jz4770-ost", "ingenic,jz4760b-ost";
reg = <0xe0 0x20>;
clocks = <&tcu TCU_CLK_OST>;
clock-names = "ost";
interrupts = <15>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Ingenic Timer/Counter Unit
1-15GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Ingenic SoC의 Timer/Counter Unit(TCU)을 정의합니다. TCU hardware와 driver에 관한 설명은 `Documentation/arch/mips/ingenic-tcu.rst`를 참고합니다. Maintainer는 Paul Cercueil입니다.
적용 대상 SoC
16-30이 스키마는 `compatible`에 JZ4740, JZ4725B, JZ4760, JZ4760B, JZ4770, JZ4780 또는 X1000 TCU compatible 중 하나가 포함된 node에 적용됩니다. 스키마 선택을 위해 `compatible` 속성이 반드시 있어야 합니다.
select:
properties:
compatible:
contains:
enum:
- ingenic,jz4740-tcu
- ingenic,jz4725b-tcu
- ingenic,jz4760-tcu
- ingenic,jz4760b-tcu
- ingenic,jz4770-tcu
- ingenic,jz4780-tcu
- ingenic,x1000-tcu
required:
- compatible
Parent node와 compatible fallback
31-67Node 이름은 `timer@<hex-address>` 형식입니다. `#address-cells`, `#size-cells`, `#clock-cells`, `#interrupt-cells`는 모두 1이며, TCU는 interrupt controller이자 clock provider이고 child address 변환용 `ranges`를 지원합니다. JZ4740·JZ4725B·JZ4760·X1000은 각 SoC TCU compatible 뒤에 `simple-mfd`를 둡니다. JZ4780·JZ4770·JZ4760B는 각 SoC compatible 뒤에 `ingenic,jz4760-tcu`, `simple-mfd` fallback을 순서대로 둡니다.
properties:
$nodename:
pattern: "^timer@[0-9a-f]+$"
"#address-cells":
const: 1
"#size-cells":
const: 1
"#clock-cells":
const: 1
"#interrupt-cells":
const: 1
interrupt-controller: true
ranges: true
compatible:
oneOf:
- items:
- enum:
- ingenic,jz4740-tcu
- ingenic,jz4725b-tcu
- ingenic,jz4760-tcu
- ingenic,x1000-tcu
- const: simple-mfd
- items:
- enum:
- ingenic,jz4780-tcu
- ingenic,jz4770-tcu
- ingenic,jz4760b-tcu
- const: ingenic,jz4760-tcu
- const: simple-mfd
Clock·interrupt와 PWM channel mask
68-112`reg`는 최대 한 영역입니다. `clocks`와 `clock-names`는 RTC, EXT, PCLK의 최소 세 항목을 순서대로 담고, SoC가 제공하면 네 번째 TCU clock을 추가합니다. `interrupts`는 TCU0, TCU1, TCU2 interrupt 중 최소 하나를 담습니다. `assigned-clocks`, `assigned-clock-parents`, `assigned-clock-rates`는 각각 1~8개를 허용합니다. `ingenic,pwm-channels-mask`는 PWM 전용으로 예약할 TCU channel의 8-bit mask이며 범위는 `0x00`~`0xff`, 기본값은 `0xfc`입니다.
reg:
maxItems: 1
clocks:
items:
- description: RTC clock
- description: EXT clock
- description: PCLK clock
- description: TCU clock
minItems: 3
clock-names:
items:
- const: rtc
- const: ext
- const: pclk
- const: tcu
minItems: 3
interrupts:
items:
- description: TCU0 interrupt
- description: TCU1 interrupt
- description: TCU2 interrupt
minItems: 1
assigned-clocks:
minItems: 1
maxItems: 8
assigned-clock-parents:
minItems: 1
maxItems: 8
assigned-clock-rates:
minItems: 1
maxItems: 8
ingenic,pwm-channels-mask:
description: Bitmask of TCU channels reserved for PWM use.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0x00
maximum: 0xff
default: 0xfc
Watchdog child node
113-147`watchdog@<offset>` child는 공통 watchdog schema를 따르며 다른 속성은 허용되지 않습니다. JZ4740과 JZ4780 watchdog은 독립 compatible을 사용합니다. JZ4770·JZ4760B·JZ4760·JZ4725B watchdog은 각 SoC compatible 뒤에 `ingenic,jz4740-watchdog` fallback을 둡니다. `reg`와 `clocks`는 각각 최대 한 항목이고 clock 이름은 `wdt`입니다. `compatible`, `reg`, `clocks`, `clock-names`가 모두 필수입니다.
patternProperties:
"^watchdog@[a-f0-9]+$":
type: object
$ref: /schemas/watchdog/watchdog.yaml#
unevaluatedProperties: false
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4740-watchdog
- ingenic,jz4780-watchdog
- items:
- enum:
- ingenic,jz4770-watchdog
- ingenic,jz4760b-watchdog
- ingenic,jz4760-watchdog
- ingenic,jz4725b-watchdog
- const: ingenic,jz4740-watchdog
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: wdt
required:
- compatible
- reg
- clocks
- clock-names
PWM child node
148-192`pwm@<offset>` child는 공통 PWM schema를 따르며 다른 속성은 허용되지 않습니다. JZ4740·JZ4725B·X1000 PWM은 독립 compatible을 사용하고, JZ4760·JZ4760B·JZ4770·JZ4780 PWM은 각 SoC compatible 뒤에 `ingenic,jz4740-pwm` fallback을 둡니다. `reg`는 최대 한 영역입니다. Clock은 `timer0`부터 `timer7`까지 순서대로 6~8개를 사용하며 `compatible`, `reg`, `clocks`, `clock-names`가 필수입니다.
"^pwm@[a-f0-9]+$":
type: object
$ref: /schemas/pwm/pwm.yaml#
unevaluatedProperties: false
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4740-pwm
- ingenic,jz4725b-pwm
- ingenic,x1000-pwm
- items:
- enum:
- ingenic,jz4760-pwm
- ingenic,jz4760b-pwm
- ingenic,jz4770-pwm
- ingenic,jz4780-pwm
- const: ingenic,jz4740-pwm
reg:
maxItems: 1
clocks:
minItems: 6
maxItems: 8
clock-names:
items:
- const: timer0
- const: timer1
- const: timer2
- const: timer3
- const: timer4
- const: timer5
- const: timer6
- const: timer7
minItems: 6
required:
- compatible
- reg
- clocks
- clock-names
OST timer child node
193-230`timer@<offset>` child는 OST를 나타냅니다. JZ4725B와 JZ4760B OST는 독립 compatible을 사용할 수 있습니다. JZ4760은 `ingenic,jz4725b-ost`로 fallback하고, JZ4780·JZ4770은 `ingenic,jz4760b-ost`로 fallback합니다. `reg`, `clocks`, `interrupts`는 각각 최대 한 항목이고 clock 이름은 `ost`입니다. 이 다섯 속성은 모두 필수이며 추가 속성은 허용되지 않습니다.
"^timer@[a-f0-9]+$":
type: object
properties:
compatible:
oneOf:
- enum:
- ingenic,jz4725b-ost
- ingenic,jz4760b-ost
- items:
- const: ingenic,jz4760-ost
- const: ingenic,jz4725b-ost
- items:
- enum:
- ingenic,jz4780-ost
- ingenic,jz4770-ost
- const: ingenic,jz4760b-ost
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: ost
interrupts:
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
- interrupts
additionalProperties: false
Parent 필수 속성
231-242TCU parent node에는 `#clock-cells`, `#interrupt-cells`, `interrupt-controller`, `compatible`, `reg`, `clocks`, `clock-names`, `interrupts`가 반드시 있어야 합니다. 스키마에 정의되지 않은 추가 parent 속성은 허용되지 않습니다.
required:
- "#clock-cells"
- "#interrupt-cells"
- interrupt-controller
- compatible
- reg
- clocks
- clock-names
- interrupts
additionalProperties: false
JZ4770 TCU parent 예제
243-266예제의 `tcu: timer@10002000`은 JZ4770 compatible 뒤에 JZ4760과 `simple-mfd` fallback을 둡니다. 0x1000-byte register 영역을 child bus로 노출하고 address·size cell을 각각 1로 설정합니다. RTC, EXT, PCLK 세 clock을 연결하며 clock provider와 interrupt controller를 선언합니다. `intc`를 parent로 사용해 TCU interrupt 27·26·25를 지정합니다.
examples:
- |
#include <dt-bindings/clock/ingenic,jz4770-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
tcu: timer@10002000 {
compatible = "ingenic,jz4770-tcu", "ingenic,jz4760-tcu", "simple-mfd";
reg = <0x10002000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x10002000 0x1000>;
#clock-cells = <1>;
clocks = <&cgu JZ4770_CLK_RTC>,
<&cgu JZ4770_CLK_EXT>,
<&cgu JZ4770_CLK_PCLK>;
clock-names = "rtc", "ext", "pclk";
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <27 26 25>;
Watchdog child 예제
267-274`watchdog@0` child는 JZ4770 watchdog과 JZ4740 fallback을 사용하고 offset 0x0의 0xc-byte 영역을 차지합니다. TCU의 `TCU_CLK_WDT` 출력을 `wdt` clock으로 연결합니다.
watchdog: watchdog@0 {
compatible = "ingenic,jz4770-watchdog", "ingenic,jz4740-watchdog";
reg = <0x0 0xc>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
PWM child 예제
275-292`pwm@40` child는 JZ4770 PWM과 JZ4740 fallback을 사용하고 offset 0x40의 0x80-byte 영역을 차지합니다. `#pwm-cells = <3>`을 선언하고 `TCU_CLK_TIMER0`부터 `TCU_CLK_TIMER7`까지 여덟 clock을 `timer0`~`timer7` 이름에 맞춰 연결합니다.
pwm: pwm@40 {
compatible = "ingenic,jz4770-pwm", "ingenic,jz4740-pwm";
reg = <0x40 0x80>;
#pwm-cells = <3>;
clocks = <&tcu TCU_CLK_TIMER0>,
<&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>,
<&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>,
<&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>,
<&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};
OST child 예제
293-302`ost: timer@e0` child는 JZ4770 OST와 JZ4760B fallback을 사용하고 offset 0xe0의 0x20-byte 영역을 차지합니다. `TCU_CLK_OST`를 `ost` clock으로 연결하고 interrupt 15를 지정합니다.
ost: timer@e0 {
compatible = "ingenic,jz4770-ost", "ingenic,jz4760b-ost";
reg = <0xe0 0x20>;
clocks = <&tcu TCU_CLK_OST>;
clock-names = "ost";
interrupts = <15>;
};
};
요약과 해설
ingenic,tcu.yaml:1-302Ingenic TCU parent provider와 watchdog·PWM·OST child node 구성을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.