← Documents Documentation/devicetree/bindings/spi/marvell,orion-spi.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

Marvell Orion SPI controller

Orion·Armada compatible, MBUS direct-mode register와 clock binding을 설명합니다.

Source pathDocumentation/devicetree/bindings/spi/marvell,orion-spi.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

marvell,orion-spi.yaml:1-102

Orion·Armada compatible, MBUS direct-mode register와 clock binding을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·clock 순서·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/marvell,orion-spi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Marvell Orion SPI controller
8
9 maintainers:
10 - Andrew Lunn <[email protected]>
11 - Gregory CLEMENT <[email protected]>
12
13 allOf:
14 - $ref: /schemas/spi/spi-controller.yaml#
15
16 properties:
17 compatible:
18 oneOf:
19 - enum:
20 - marvell,orion-spi
21 - marvell,armada-380-spi # For ap80x and cp11x
22 - items:
23 - enum:
24 - marvell,armada-370-spi
25 - marvell,armada-375-spi
26 - marvell,armada-380-spi
27 - marvell,armada-390-spi
28 - marvell,armada-xp-spi
29 - const: marvell,orion-spi
30
31 cell-index:
32 description: Instance id for the SPI controller
33 deprecated: true
34
35 reg:
36 minItems: 1
37 items:
38 - description: control registers
39 - description: CS0 MBUS target/attribute registers for direct mode
40 - description: CS1 MBUS target/attribute registers for direct mode
41 - description: CS2 MBUS target/attribute registers for direct mode
42 - description: CS3 MBUS target/attribute registers for direct mode
43 - description: CS4 MBUS target/attribute registers for direct mode
44 - description: CS5 MBUS target/attribute registers for direct mode
45 - description: CS6 MBUS target/attribute registers for direct mode
46 - description: CS7 MBUS target/attribute registers for direct mode
47
48 clocks:
49 minItems: 1
50 maxItems: 2
51
52 clock-names:
53 items:
54 - const: core
55 - const: axi
56
57 interrupts:
58 maxItems: 1
59
60 required:
61 - compatible
62 - reg
63 - clocks
64
65 unevaluatedProperties: false
66
67 examples:
68 - |
69 spi@10600 {
70 compatible = "marvell,orion-spi";
71 #address-cells = <1>;
72 #size-cells = <0>;
73 cell-index = <0>;
74 reg = <0x10600 0x28>;
75 clocks = <&coreclk 0>;
76 interrupts = <23>;
77 };
78 - |
79 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
80
81 bus {
82 #address-cells = <2>;
83 #size-cells = <1>;
84
85 spi@10600 {
86 compatible = "marvell,orion-spi";
87 #address-cells = <1>;
88 #size-cells = <0>;
89 cell-index = <0>;
90 reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>, /* control */
91 <MBUS_ID(0x01, 0x1e) 0 0xffffffff>, /* CS0 */
92 <MBUS_ID(0x01, 0x5e) 0 0xffffffff>, /* CS1 */
93 <MBUS_ID(0x01, 0x9e) 0 0xffffffff>, /* CS2 */
94 <MBUS_ID(0x01, 0xde) 0 0xffffffff>, /* CS3 */
95 <MBUS_ID(0x01, 0x1f) 0 0xffffffff>, /* CS4 */
96 <MBUS_ID(0x01, 0x5f) 0 0xffffffff>, /* CS5 */
97 <MBUS_ID(0x01, 0x9f) 0 0xffffffff>, /* CS6 */
98 <MBUS_ID(0x01, 0xdf) 0 0xffffffff>; /* CS7 */
99 clocks = <&coreclk 0>;
100 interrupts = <23>;
101 };
102 };
103

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>;
    };
};