요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/spi-sifive.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SiFive SPI controller
maintainers:
- Pragnesh Patel <[email protected]>
- Paul Walmsley <[email protected]>
- Palmer Dabbelt <[email protected]>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
items:
- enum:
- sifive,fu540-c000-spi
- sifive,fu740-c000-spi
- const: sifive,spi0
description:
Should be "sifive,<chip>-spi" and "sifive,spi<version>".
Supported compatible strings are -
"sifive,fu540-c000-spi" and "sifive,fu740-c000-spi" for the SiFive SPI v0
as integrated onto the SiFive FU540 and FU740 chip resp, and "sifive,spi0"
for the SiFive SPI v0 IP block with no chip integration tweaks.
Please refer to sifive-blocks-ip-versioning.txt for details
SPI RTL that corresponds to the IP block version numbers can be found here -
https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/spi
reg:
minItems: 1
items:
- description: SPI registers region
- description: Memory mapped flash region
interrupts:
maxItems: 1
clocks:
maxItems: 1
description:
Must reference the frequency given to the controller
sifive,fifo-depth:
description:
Depth of hardware queues; defaults to 8
$ref: /schemas/types.yaml#/definitions/uint32
enum: [8]
default: 8
sifive,max-bits-per-word:
description:
Maximum bits per word; defaults to 8
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
default: 8
required:
- compatible
- reg
- interrupts
- clocks
unevaluatedProperties: false
examples:
- |
spi: spi@10040000 {
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
reg = <0x10040000 0x1000>, <0x20000000 0x10000000>;
interrupt-parent = <&plic>;
interrupts = <51>;
clocks = <&tlclk>;
#address-cells = <1>;
#size-cells = <0>;
sifive,fifo-depth = <8>;
sifive,max-bits-per-word = <8>;
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SiFive SPI v0 schema
1-16이 GPL-2.0 YAML schema는 SiFive SPI controller를 정의합니다. Maintainer는 Pragnesh Patel, Paul Walmsley, Palmer Dabbelt이며 공통 `spi-controller.yaml#`을 상속합니다.
Chip integration과 IP version compatible
17-35Compatible은 chip별 `sifive,fu540-c000-spi` 또는 `sifive,fu740-c000-spi`를 첫 항목으로, IP block version `sifive,spi0`을 둘째 항목으로 둡니다. 앞의 두 문자열은 각각 FU540·FU740에 통합된 SiFive SPI v0이고 `sifive,spi0`은 chip별 tweak가 없는 v0 IP block을 나타냅니다.
IP versioning 상세는 `sifive-blocks-ip-versioning.txt`를 참조합니다. Version 번호에 대응하는 SPI RTL은 `https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/spi`에서 확인할 수 있습니다.
Register 영역, interrupt와 입력 clock
36-50`reg`는 최소 한 항목이며 SPI register 영역 뒤에 선택적으로 memory-mapped flash 영역을 둡니다. `interrupts`와 `clocks`는 각각 최대 한 항목이고 clock은 controller에 공급되는 주파수를 참조해야 합니다.
FIFO depth와 word bit 수
51-72`sifive,fifo-depth`는 hardware queue 깊이이며 허용값과 기본값 모두 8입니다. `sifive,max-bits-per-word`는 word당 최대 bit 수로 0~8을 허용하고 기본값은 8입니다.
필수 속성은 `compatible`, `reg`, `interrupts`, `clocks`이며 `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.
FU540 SPI와 memory-mapped flash window
73-87예제의 `spi@10040000`은 FU540 통합 compatible과 `sifive,spi0` fallback을 사용합니다. 0x10040000 register 영역과 0x20000000 memory-mapped flash 영역, PLIC interrupt 51, `tlclk`, FIFO depth 8, word당 최대 8 bit를 지정합니다.
spi: spi@10040000 {
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
reg = <0x10040000 0x1000>, <0x20000000 0x10000000>;
interrupt-parent = <&plic>;
interrupts = <51>;
clocks = <&tlclk>;
#address-cells = <1>;
#size-cells = <0>;
sifive,fifo-depth = <8>;
sifive,max-bits-per-word = <8>;
};
...
요약과 해설
spi-sifive.yaml:1-87SiFive SPI v0의 chip·IP compatible, flash window와 FIFO·word 제한을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·URL·수치·예제 코드를 원형대로 유지합니다.