요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/omap-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SPI Controller on OMAP and K3 SoCs
maintainers:
- Aswath Govindraju <[email protected]>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
oneOf:
- items:
- enum:
- ti,am654-mcspi
- ti,am4372-mcspi
- const: ti,omap4-mcspi
- items:
- enum:
- ti,omap2-mcspi
- ti,omap4-mcspi
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
power-domains:
maxItems: 1
ti,spi-num-cs:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of chipselect supported by the instance.
minimum: 1
maximum: 4
ti,hwmods:
$ref: /schemas/types.yaml#/definitions/string
description:
Must be "mcspi<n>", n being the instance number (1-based).
This property is applicable only on legacy platforms mainly omap2/3
and ti81xx and should not be used on other platforms.
deprecated: true
ti,pindir-d0-out-d1-in:
description:
Select the D0 pin as output and D1 as input. The default is D0
as input and D1 as output.
type: boolean
dmas:
description:
List of DMA specifiers with the controller specific format as
described in the generic DMA client binding. A tx and rx
specifier is required for each chip select.
minItems: 1
maxItems: 8
dma-names:
description:
List of DMA request names. These strings correspond 1:1 with
the DMA specifiers listed in dmas. The string names is to be
"rxN" and "txN" for RX and TX requests, respectively. Where N
is the chip select number.
minItems: 1
maxItems: 8
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
if:
properties:
compatible:
enum:
- ti,omap2-mcspi
- ti,omap4-mcspi
then:
properties:
ti,hwmods:
items:
- pattern: "^mcspi([1-9])$"
else:
properties:
ti,hwmods: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h>
spi@2100000 {
compatible = "ti,am654-mcspi","ti,omap4-mcspi";
reg = <0x2100000 0x400>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&k3_clks 137 1>;
power-domains = <&k3_pds 137 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
dma-names = "tx0", "rx0";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
OMAP와 K3 McSPI schema
1-14이 GPL-2.0-only 또는 BSD-2-Clause YAML schema는 OMAP와 K3 SoC의 SPI controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/omap-spi.yaml#`, maintainer는 Aswath Govindraju입니다.
`spi-controller.yaml#`의 공통 SPI controller 속성을 상속합니다.
OMAP와 K3 compatible 조합
15-27AM654와 AM4372는 각각 `ti,am654-mcspi` 또는 `ti,am4372-mcspi` 다음에 fallback `ti,omap4-mcspi`를 둡니다. `ti,omap2-mcspi`와 `ti,omap4-mcspi`는 단일 compatible로도 사용할 수 있습니다.
Register, interrupt, clock와 power domain
28-39`reg`, `interrupts`, `clocks`, `power-domains`는 각각 최대 한 항목입니다.
Chip-select, legacy hwmod와 pin 방향
40-59`ti,spi-num-cs`는 controller instance가 지원하는 chip-select 수를 나타내는 `uint32`이며 범위는 1~4입니다.
Deprecated `ti,hwmods`는 `mcspi<n>` 형식의 hwmod 이름이며 n은 1부터 시작하는 instance 번호입니다. 이 속성은 주로 OMAP2/3와 TI81xx 같은 legacy platform에만 적용되고 다른 platform에서는 사용하면 안 됩니다.
Boolean `ti,pindir-d0-out-d1-in`은 D0을 output, D1을 input으로 선택합니다. 기본값은 반대로 D0 input, D1 output입니다.
Chip-select별 DMA specifier와 이름
60-76`dmas`는 generic DMA client binding 형식의 DMA specifier 목록입니다. Chip-select마다 TX와 RX specifier가 필요하며 전체 항목 수는 1~8개입니다.
`dma-names`는 `dmas`와 1:1로 대응하고 RX·TX request 이름은 각각 `rxN`, `txN` 형식입니다. N은 chip-select 번호이고 항목 수는 1~8개입니다.
필수 속성과 legacy 조건
77-100필수 속성은 `compatible`, `reg`, `interrupts`입니다. `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.
Compatible이 `ti,omap2-mcspi` 또는 `ti,omap4-mcspi`이면 `ti,hwmods` 값은 정규식 `^mcspi([1-9])$`과 일치해야 합니다. 그 외 compatible에서는 `ti,hwmods`를 사용할 수 없습니다.
AM654 McSPI 예제
101-117예제는 AM654 compatible과 OMAP4 fallback을 사용하고 GIC SPI interrupt 184, K3 clock과 exclusive power domain을 연결합니다. Chip-select 0의 TX/RX DMA request 이름은 `tx0`, `rx0`입니다.
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h>
spi@2100000 {
compatible = "ti,am654-mcspi","ti,omap4-mcspi";
reg = <0x2100000 0x400>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&k3_clks 137 1>;
power-domains = <&k3_pds 137 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
dma-names = "tx0", "rx0";
};
요약과 해설
omap-spi.yaml:1-117OMAP·K3 McSPI의 chip-select, legacy hwmod와 DMA naming을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·clock/DMA 순서·수치·예제 코드를 원형대로 유지합니다.