요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/cdns,ttc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence TTC - Triple Timer Counter
maintainers:
- Michal Simek <[email protected]>
properties:
compatible:
const: cdns,ttc
reg:
maxItems: 1
interrupts:
maxItems: 3
description: |
A list of 3 interrupts; one per timer channel.
clocks:
maxItems: 1
power-domains:
maxItems: 1
timer-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Bit width of the timer, necessary if not 16.
"#pwm-cells":
const: 3
required:
- compatible
- reg
- clocks
allOf:
- if:
not:
required:
- "#pwm-cells"
then:
required:
- interrupts
additionalProperties: false
examples:
- |
ttc0: ttc0@f8001000 {
interrupt-parent = <&intc>;
interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
compatible = "cdns,ttc";
reg = <0xF8001000 0x1000>;
clocks = <&cpu_clk 3>;
timer-width = <32>;
};
- |
pwm: pwm@f8002000 {
compatible = "cdns,ttc";
reg = <0xf8002000 0x1000>;
clocks = <&cpu_clk 3>;
timer-width = <32>;
#pwm-cells = <3>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Cadence Triple Timer Counter
1-11GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Cadence TTC, 즉 Triple Timer Counter를 정의합니다. Maintainer는 Michal Simek입니다.
세 channel, timer width와 PWM cells
12-42`compatible`은 `cdns,ttc`, `reg`, `clocks`, `power-domains`는 각각 최대 한 항목입니다. `interrupts`는 timer channel마다 하나씩 최대 세 개입니다. `timer-width`는 기본 16-bit가 아닌 경우 필요한 timer bit width입니다. PWM provider로 사용할 때 `#pwm-cells`는 3입니다. 공통 필수 속성은 `compatible`, `reg`, `clocks`입니다.
properties:
compatible:
const: cdns,ttc
reg:
maxItems: 1
interrupts:
maxItems: 3
description: |
A list of 3 interrupts; one per timer channel.
clocks:
maxItems: 1
power-domains:
maxItems: 1
timer-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Bit width of the timer, necessary if not 16.
"#pwm-cells":
const: 3
required:
- compatible
- reg
- clocks
Timer 모드의 interrupt 요구
43-53`#pwm-cells`가 없으면 일반 timer mode이므로 `interrupts`가 반드시 필요합니다. PWM mode에서는 interrupt 요구가 적용되지 않습니다. 정의되지 않은 추가 속성은 허용되지 않습니다.
allOf:
- if:
not:
required:
- "#pwm-cells"
then:
required:
- interrupts
additionalProperties: false
32-bit timer와 PWM 예제
54-72첫 예제 `ttc0@f8001000`은 interrupt 10, 11, 12 세 개, `cpu_clk` index 3, 32-bit timer width를 지정합니다. 둘째 `pwm@f8002000`은 같은 32-bit width와 clock을 사용하고 `#pwm-cells = <3>`을 선언하며 interrupt는 생략합니다.
- |
ttc0: ttc0@f8001000 {
interrupt-parent = <&intc>;
interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
compatible = "cdns,ttc";
reg = <0xF8001000 0x1000>;
clocks = <&cpu_clk 3>;
timer-width = <32>;
};
- |
pwm: pwm@f8002000 {
compatible = "cdns,ttc";
reg = <0xf8002000 0x1000>;
clocks = <&cpu_clk 3>;
timer-width = <32>;
#pwm-cells = <3>;
};
요약과 해설
cdns,ttc.yaml:1-72Cadence TTC의 세 channel, 16·32-bit width와 PWM mode를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.