요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/spi/sprd,sc9860-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Spreadtrum SC9860 SPI Controller
maintainers:
- Orson Zhai <[email protected]>
- Baolin Wang <[email protected]>
- Chunyan Zhang <[email protected]>
properties:
compatible:
const: sprd,sc9860-spi
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: SPI clock
- description: SPI source (parent) clock
- description: SPI module enable clock
clock-names:
items:
- const: spi
- const: source
- const: enable
dmas:
maxItems: 2
dma-names:
items:
- const: rx_chn
- const: tx_chn
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
allOf:
- $ref: spi-controller.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi@70a00000 {
compatible = "sprd,sc9860-spi";
reg = <0x70a00000 0x1000>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>;
clock-names = "spi", "source", "enable";
dmas = <&apdma 11 11>, <&apdma 12 12>;
dma-names = "rx_chn", "tx_chn";
#address-cells = <1>;
#size-cells = <0>;
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Spreadtrum SC9860 SPI schema
1-13이 GPL-2.0-only 또는 BSD-2-Clause YAML schema는 Spreadtrum SC9860 SPI controller를 정의합니다. Maintainer는 Orson Zhai, Baolin Wang, Chunyan Zhang입니다.
Clock과 DMA channel 순서
14-43`compatible`은 `sprd,sc9860-spi`로 고정됩니다. `reg`와 `interrupts`는 각각 최대 한 항목입니다.
`clocks`는 SPI clock, SPI source(parent) clock, SPI module enable clock 순서의 세 항목이고 `clock-names`는 `spi`, `source`, `enable`입니다. `dmas`는 최대 두 항목이며 `dma-names`는 RX용 `rx_chn`, TX용 `tx_chn` 순서입니다.
필수 속성과 공통 schema
44-55필수 속성은 `compatible`, `reg`, `interrupts`, `clocks`, `clock-names`입니다. 공통 `spi-controller.yaml#`을 상속하고 `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.
SC9860 SPI0 clock·DMA 예제
56-72예제의 `spi@70a00000`은 GIC SPI 7, `clk_spi0`·26 MHz external source·AP APB gate 5 clock을 사용합니다. APDMA 11은 `rx_chn`, APDMA 12는 `tx_chn`입니다.
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi@70a00000 {
compatible = "sprd,sc9860-spi";
reg = <0x70a00000 0x1000>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>;
clock-names = "spi", "source", "enable";
dmas = <&apdma 11 11>, <&apdma 12 12>;
dma-names = "rx_chn", "tx_chn";
#address-cells = <1>;
#size-cells = <0>;
};
...
요약과 해설
sprd,sc9860-spi.yaml:1-72SC9860 SPI의 세 clock과 RX·TX DMA channel 순서를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·수치·예제 코드를 원형대로 유지합니다.