요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer/xlnx,xps-timer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx LogiCORE IP AXI Timer
maintainers:
- Sean Anderson <sean.anderson@seco.com>
properties:
compatible:
contains:
const: xlnx,xps-timer-1.00.a
clocks:
maxItems: 1
clock-names:
const: s_axi_aclk
interrupts:
maxItems: 1
reg:
maxItems: 1
'#pwm-cells': true
xlnx,count-width:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [8, 16, 32]
default: 32
description:
The width of the counter(s), in bits.
xlnx,one-timer-only:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
description:
Whether only one timer is present in this block.
required:
- compatible
- reg
- xlnx,one-timer-only
allOf:
- if:
required:
- '#pwm-cells'
then:
allOf:
- required:
- clocks
- properties:
xlnx,one-timer-only:
const: 0
else:
required:
- interrupts
- if:
required:
- clocks
then:
required:
- clock-names
additionalProperties: false
examples:
- |
timer@800e0000 {
clock-names = "s_axi_aclk";
clocks = <&zynqmp_clk 71>;
compatible = "xlnx,xps-timer-1.00.a";
reg = <0x800e0000 0x10000>;
interrupts = <0 39 2>;
xlnx,count-width = <16>;
xlnx,one-timer-only = <0x0>;
};
timer@800f0000 {
#pwm-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&zynqmp_clk 71>;
compatible = "xlnx,xps-timer-1.00.a";
reg = <0x800e0000 0x10000>;
xlnx,count-width = <32>;
xlnx,one-timer-only = <0x0>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Xilinx LogiCORE IP AXI Timer
1-11GPL-2.0 또는 BSD-2-Clause 라이선스의 이 스키마는 Xilinx LogiCORE IP AXI Timer를 정의합니다. Maintainer는 Sean Anderson입니다.
Counter 폭과 timer 개수
12-48`compatible`에는 `xlnx,xps-timer-1.00.a`가 포함되어야 합니다. `clocks`, `interrupts`, `reg`는 각각 최대 한 항목이고 `clock-names`는 `s_axi_aclk`입니다. PWM provider로 사용할 때 `#pwm-cells`를 지정할 수 있습니다.
`xlnx,count-width`는 counter의 bit width로 8, 16, 32를 허용하며 기본값은 32입니다. `xlnx,one-timer-only`는 block에 timer가 하나만 있는지를 나타내는 uint32 값으로 0 또는 1을 허용합니다. `compatible`, `reg`, `xlnx,one-timer-only`가 공통 필수입니다.
properties:
compatible:
contains:
const: xlnx,xps-timer-1.00.a
clocks:
maxItems: 1
clock-names:
const: s_axi_aclk
interrupts:
maxItems: 1
reg:
maxItems: 1
'#pwm-cells': true
xlnx,count-width:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [8, 16, 32]
default: 32
description:
The width of the counter(s), in bits.
xlnx,one-timer-only:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
description:
Whether only one timer is present in this block.
required:
- compatible
- reg
- xlnx,one-timer-only
PWM·interrupt·clock 조건
49-71`#pwm-cells`가 있으면 `clocks`가 필수이고 `xlnx,one-timer-only`는 0이어야 하므로 두 timer가 모두 존재해야 합니다. PWM provider가 아니면 `interrupts`가 필수입니다. `clocks`를 제공할 때는 `clock-names`도 반드시 제공해야 합니다. 정의되지 않은 추가 속성은 허용하지 않습니다.
allOf:
- if:
required:
- '#pwm-cells'
then:
allOf:
- required:
- clocks
- properties:
xlnx,one-timer-only:
const: 0
else:
required:
- interrupts
- if:
required:
- clocks
then:
required:
- clock-names
additionalProperties: false
Interrupt timer와 PWM provider
72-92첫 예제 `timer@800e0000`은 `zynqmp_clk` index 71을 `s_axi_aclk`으로 연결하고 0x10000-byte register 영역, interrupt `<0 39 2>`, 16-bit counter, dual-timer 값 0을 지정합니다. 둘째 `timer@800f0000`은 `#pwm-cells = <0>`으로 PWM provider를 선언하고 같은 clock과 register 크기, 32-bit counter, dual-timer 값 0을 사용하며 interrupt는 지정하지 않습니다.
examples:
- |
timer@800e0000 {
clock-names = "s_axi_aclk";
clocks = <&zynqmp_clk 71>;
compatible = "xlnx,xps-timer-1.00.a";
reg = <0x800e0000 0x10000>;
interrupts = <0 39 2>;
xlnx,count-width = <16>;
xlnx,one-timer-only = <0x0>;
};
timer@800f0000 {
#pwm-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&zynqmp_clk 71>;
compatible = "xlnx,xps-timer-1.00.a";
reg = <0x800e0000 0x10000>;
xlnx,count-width = <32>;
xlnx,one-timer-only = <0x0>;
};
요약과 해설
xlnx,xps-timer.yaml:1-92Xilinx AXI timer의 counter 폭과 interrupt·PWM 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.