요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/spi-cadence.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence SPI controller
maintainers:
- Michal Simek <[email protected]>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
oneOf:
- enum:
- xlnx,zynq-spi-r1p6
- items:
- enum:
- xlnx,zynqmp-spi-r1p6
- xlnx,versal-net-spi-r1p6
- const: cdns,spi-r1p6
reg:
maxItems: 1
interrupts:
maxItems: 1
clock-names:
items:
- const: ref_clk
- const: pclk
clocks:
maxItems: 2
num-cs:
description: |
Number of chip selects used. If a decoder is used,
this will be the number of chip selects after the
decoder.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 4
default: 4
is-decoded-cs:
description: |
Flag to indicate whether decoder is used or not.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
default: 0
power-domains:
maxItems: 1
label:
description: Descriptive name of the SPI controller.
resets:
maxItems: 1
reset-names:
items:
- const: spi
required:
- compatible
- reg
- interrupts
- clock-names
- clocks
unevaluatedProperties: false
examples:
- |
spi@e0007000 {
compatible = "xlnx,zynq-spi-r1p6";
clock-names = "ref_clk", "pclk";
clocks = <&clkc 26>, <&clkc 35>;
interrupt-parent = <&intc>;
interrupts = <0 49 4>;
num-cs = <4>;
is-decoded-cs = <0>;
reg = <0xe0007000 0x1000>;
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
Cadence SPI schema
1-14이 GPL-2.0-only 또는 BSD-2-Clause YAML schema는 Cadence SPI controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/spi-cadence.yaml#`, maintainer는 Michal Simek입니다.
공통 `spi-controller.yaml#` 속성을 상속합니다.
Zynq, ZynqMP와 Versal compatible
15-25Zynq는 단독 `xlnx,zynq-spi-r1p6`를 사용합니다. ZynqMP와 Versal Net은 각각 `xlnx,zynqmp-spi-r1p6` 또는 `xlnx,versal-net-spi-r1p6` 뒤에 fallback `cdns,spi-r1p6`를 둡니다.
Register, interrupt와 clock
26-39`reg`와 `interrupts`는 각각 최대 한 항목입니다. `clock-names`는 `ref_clk`, `pclk` 순서이고 `clocks`는 최대 두 항목입니다.
Chip-select decoder와 추가 자원
40-69`num-cs`는 사용하는 chip-select 수입니다. Decoder를 사용하면 decoder 이후의 chip-select 수를 뜻하며 범위는 1~4, 기본값은 4입니다.
`is-decoded-cs`는 decoder 사용 여부를 나타내는 `uint32`이고 0 또는 1, 기본값은 0입니다. `power-domains`와 `resets`는 각각 최대 한 항목이며 `label`은 controller의 설명 이름입니다. `reset-names`의 항목은 `spi`입니다.
필수 속성과 추가 속성 제한
70-78필수 속성은 `compatible`, `reg`, `interrupts`, `clock-names`, `clocks`입니다. `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.
Zynq Cadence SPI 예제
79-91예제의 `spi@e0007000`은 `xlnx,zynq-spi-r1p6`, `ref_clk` 26, `pclk` 35, interrupt 49, chip-select 4개를 사용하고 decoder는 사용하지 않습니다. 마지막 `...`는 YAML document 종료 표기입니다.
spi@e0007000 {
compatible = "xlnx,zynq-spi-r1p6";
clock-names = "ref_clk", "pclk";
clocks = <&clkc 26>, <&clkc 35>;
interrupt-parent = <&intc>;
interrupts = <0 49 4>;
num-cs = <4>;
is-decoded-cs = <0>;
reg = <0xe0007000 0x1000>;
};
요약과 해설
spi-cadence.yaml:1-91Cadence SPI의 SoC compatible, clock, chip-select decoder와 reset 구성을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·표·수치·조건부 제약·예제 코드를 원형대로 유지합니다.