요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/marvell,orion-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell Orion SPI controller
maintainers:
- Andrew Lunn <andrew@lunn.ch>
- Gregory CLEMENT <gregory.clement@bootlin.com>
allOf:
- $ref: /schemas/spi/spi-controller.yaml#
properties:
compatible:
oneOf:
- enum:
- marvell,orion-spi
- marvell,armada-380-spi # For ap80x and cp11x
- items:
- enum:
- marvell,armada-370-spi
- marvell,armada-375-spi
- marvell,armada-380-spi
- marvell,armada-390-spi
- marvell,armada-xp-spi
- const: marvell,orion-spi
cell-index:
description: Instance id for the SPI controller
deprecated: true
reg:
minItems: 1
items:
- description: control registers
- description: CS0 MBUS target/attribute registers for direct mode
- description: CS1 MBUS target/attribute registers for direct mode
- description: CS2 MBUS target/attribute registers for direct mode
- description: CS3 MBUS target/attribute registers for direct mode
- description: CS4 MBUS target/attribute registers for direct mode
- description: CS5 MBUS target/attribute registers for direct mode
- description: CS6 MBUS target/attribute registers for direct mode
- description: CS7 MBUS target/attribute registers for direct mode
clocks:
minItems: 1
maxItems: 2
clock-names:
items:
- const: core
- const: axi
interrupts:
maxItems: 1
required:
- compatible
- reg
- clocks
unevaluatedProperties: false
examples:
- |
spi@10600 {
compatible = "marvell,orion-spi";
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
reg = <0x10600 0x28>;
clocks = <&coreclk 0>;
interrupts = <23>;
};
- |
#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
bus {
#address-cells = <2>;
#size-cells = <1>;
spi@10600 {
compatible = "marvell,orion-spi";
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */
<MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */
<MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */
<MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */
<MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */
<MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */
<MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */
<MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */
<MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */
clocks = <&coreclk 0>;
interrupts = <23>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Marvell Orion SPI schema
1-15이 GPL-2.0-only 또는 BSD-2-Clause YAML schema는 Marvell Orion SPI controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/marvell,orion-spi.yaml#`이고 maintainer는 Andrew Lunn과 Gregory CLEMENT입니다.
`/schemas/spi/spi-controller.yaml#`의 공통 SPI controller 속성을 상속합니다.
Orion과 Armada compatible 조합
16-30단일 compatible로 `marvell,orion-spi` 또는 AP80x·CP11x용 `marvell,armada-380-spi`를 사용할 수 있습니다.
Armada 370, 375, 380, 390 또는 XP controller는 첫 문자열로 각 SoC의 `marvell,armada-*-spi`를 쓰고 둘째 fallback 문자열로 `marvell,orion-spi`를 둡니다.
Instance, register, clock과 interrupt
31-59`cell-index`는 SPI controller instance ID이지만 deprecated 속성입니다.
`reg`는 최소 한 항목을 요구합니다. 첫 항목은 control register이고, direct mode를 사용할 때 이어지는 여덟 항목은 CS0부터 CS7까지의 MBUS target/attribute register입니다.
`clocks`는 1~2개이며 `clock-names`는 순서대로 `core`, `axi`입니다. `interrupts`는 최대 한 항목입니다.
필수 속성과 추가 속성 제한
60-66필수 속성은 `compatible`, `reg`, `clocks`입니다. `unevaluatedProperties: false`이므로 상속된 공통 속성을 제외한 미정의 속성은 허용하지 않습니다.
일반 register와 MBUS direct mode 예제
67-102첫 예제는 address `0x10600`, control register 길이 `0x28`, core clock과 interrupt 23을 사용합니다.
spi@10600 {
compatible = "marvell,orion-spi";
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
reg = <0x10600 0x28>;
clocks = <&coreclk 0>;
interrupts = <23>;
};
둘째 예제는 `MBUS_ID()` macro로 control 영역과 CS0~CS7 direct-mode window를 각각 지정합니다. 각 chip-select window의 길이는 `0xffffffff`입니다.
#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
bus {
#address-cells = <2>;
#size-cells = <1>;
spi@10600 {
compatible = "marvell,orion-spi";
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */
<MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */
<MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */
<MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */
<MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */
<MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */
<MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */
<MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */
<MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */
clocks = <&coreclk 0>;
interrupts = <23>;
};
};
요약과 해설
marvell,orion-spi.yaml:1-102Orion·Armada compatible, MBUS direct-mode register와 clock binding을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·clock 순서·수치·예제 코드를 원형대로 유지합니다.