← Documents Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

Renesas MSIOF SPI/I2S controller

MSIOF의 SoC별 compatible, chip-select·DMA·sync delay·FIFO와 SPI/I2S mode 조건을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

renesas,sh-msiof.yaml:1-198

MSIOF의 SoC별 compatible, chip-select·DMA·sync delay·FIFO와 SPI/I2S mode 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·interrupt·clock/DMA/reset 순서·수치·조건부 제약·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/renesas,sh-msiof.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Renesas MSIOF SPI / I2S controller
8
9 maintainers:
10 - Geert Uytterhoeven <geert+renesas@glider.be>
11
12 properties:
13 compatible:
14 oneOf:
15 - items:
16 - const: renesas,msiof-sh73a0 # SH-Mobile AG5
17 - const: renesas,sh-mobile-msiof # generic SH-Mobile compatible
18 # device
19 - items:
20 - enum:
21 - renesas,msiof-r8a7742 # RZ/G1H
22 - renesas,msiof-r8a7743 # RZ/G1M
23 - renesas,msiof-r8a7744 # RZ/G1N
24 - renesas,msiof-r8a7745 # RZ/G1E
25 - renesas,msiof-r8a77470 # RZ/G1C
26 - renesas,msiof-r8a7790 # R-Car H2
27 - renesas,msiof-r8a7791 # R-Car M2-W
28 - renesas,msiof-r8a7792 # R-Car V2H
29 - renesas,msiof-r8a7793 # R-Car M2-N
30 - renesas,msiof-r8a7794 # R-Car E2
31 - const: renesas,rcar-gen2-msiof # generic R-Car Gen2 and RZ/G1
32 # compatible device
33 - items:
34 - enum:
35 - renesas,msiof-r8a774a1 # RZ/G2M
36 - renesas,msiof-r8a774b1 # RZ/G2N
37 - renesas,msiof-r8a774c0 # RZ/G2E
38 - renesas,msiof-r8a774e1 # RZ/G2H
39 - renesas,msiof-r8a7795 # R-Car H3
40 - renesas,msiof-r8a7796 # R-Car M3-W
41 - renesas,msiof-r8a77961 # R-Car M3-W+
42 - renesas,msiof-r8a77965 # R-Car M3-N
43 - renesas,msiof-r8a77970 # R-Car V3M
44 - renesas,msiof-r8a77980 # R-Car V3H
45 - renesas,msiof-r8a77990 # R-Car E3
46 - renesas,msiof-r8a77995 # R-Car D3
47 - const: renesas,rcar-gen3-msiof # generic R-Car Gen3 and RZ/G2
48 # compatible device
49 - items:
50 - enum:
51 - renesas,msiof-r8a779a0 # R-Car V3U
52 - renesas,msiof-r8a779f0 # R-Car S4-8
53 - renesas,msiof-r8a779g0 # R-Car V4H
54 - renesas,msiof-r8a779h0 # R-Car V4M
55 - const: renesas,rcar-gen4-msiof # generic R-Car Gen4
56 # compatible device
57 - items:
58 - const: renesas,sh-msiof # deprecated
59
60 reg:
61 minItems: 1
62 maxItems: 2
63 oneOf:
64 - items:
65 - description: CPU and DMA engine registers
66 - items:
67 - description: CPU registers
68 - description: DMA engine registers
69
70 interrupts:
71 maxItems: 1
72
73 clocks:
74 maxItems: 1
75
76 power-domains:
77 maxItems: 1
78
79 resets:
80 maxItems: 1
81
82 num-cs:
83 description: |
84 Total number of chip selects (default is 1).
85 Up to 3 native chip selects are supported:
86 0: MSIOF_SYNC
87 1: MSIOF_SS1
88 2: MSIOF_SS2
89 Hardware limitations related to chip selects:
90 - Native chip selects are always deasserted in between transfers
91 that are part of the same message. Use cs-gpios to work around
92 this.
93 - All slaves using native chip selects must use the same spi-cs-high
94 configuration. Use cs-gpios to work around this.
95 - When using GPIO chip selects, at least one native chip select must
96 be left unused, as it will be driven anyway.
97 minimum: 1
98 maximum: 3
99 default: 1
100
101 dmas:
102 minItems: 2
103 maxItems: 4
104
105 dma-names:
106 minItems: 2
107 maxItems: 4
108 items:
109 enum: [ tx, rx ]
110
111 renesas,dtdl:
112 description: delay sync signal (setup) in transmit mode.
113 $ref: /schemas/types.yaml#/definitions/uint32
114 enum:
115 - 0 # no bit delay
116 - 50 # 0.5-clock-cycle delay
117 - 100 # 1-clock-cycle delay
118 - 150 # 1.5-clock-cycle delay
119 - 200 # 2-clock-cycle delay
120
121 renesas,syncdl:
122 description: delay sync signal (hold) in transmit mode
123 $ref: /schemas/types.yaml#/definitions/uint32
124 enum:
125 - 0 # no bit delay
126 - 50 # 0.5-clock-cycle delay
127 - 100 # 1-clock-cycle delay
128 - 150 # 1.5-clock-cycle delay
129 - 200 # 2-clock-cycle delay
130 - 300 # 3-clock-cycle delay
131
132 renesas,tx-fifo-size:
133 # deprecated for soctype-specific bindings
134 description: |
135 Override the default TX fifo size. Unit is words. Ignored if 0.
136 $ref: /schemas/types.yaml#/definitions/uint32
137 default: 64
138
139 renesas,rx-fifo-size:
140 # deprecated for soctype-specific bindings
141 description: |
142 Override the default RX fifo size. Unit is words. Ignored if 0.
143 $ref: /schemas/types.yaml#/definitions/uint32
144 default: 64
145
146 # for MSIOF-I2S
147 port:
148 $ref: ../sound/audio-graph-port.yaml#
149 unevaluatedProperties: false
150
151 required:
152 - compatible
153 - reg
154 - interrupts
155 - clocks
156 - power-domains
157
158 allOf:
159 # additional "required""
160 - if:
161 not:
162 properties:
163 compatible:
164 contains:
165 const: renesas,sh-mobile-msiof
166 then:
167 required:
168 - resets
169
170 # If it doesn't have "port" node, it is "MSIOF-SPI"
171 - if:
172 not:
173 required:
174 - port
175 then:
176 allOf:
177 - $ref: spi-controller.yaml#
178
179 unevaluatedProperties: false
180
181 examples:
182 - |
183 #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
184 #include <dt-bindings/interrupt-controller/arm-gic.h>
185 #include <dt-bindings/power/r8a7791-sysc.h>
186
187 msiof0: spi@e6e20000 {
188 compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
189 reg = <0xe6e20000 0x0064>;
190 interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
191 clocks = <&cpg CPG_MOD 000>;
192 dmas = <&dmac0 0x51>, <&dmac0 0x52>;
193 dma-names = "tx", "rx";
194 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
195 resets = <&cpg 0>;
196 #address-cells = <1>;
197 #size-cells = <0>;
198 };
199

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Renesas MSIOF SPI/I2S schema

1-11

이 GPL-2.0 YAML schema는 Renesas MSIOF SPI/I2S controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/renesas,sh-msiof.yaml#`, maintainer는 Geert Uytterhoeven입니다.

SH-Mobile과 R-Car Gen2 compatible

12-32

SH-Mobile AG5는 `renesas,msiof-sh73a0` 뒤에 generic SH-Mobile fallback `renesas,sh-mobile-msiof`를 둡니다.

R-Car Gen2와 RZ/G1은 `renesas,msiof-r8a7742`, `renesas,msiof-r8a7743`, `renesas,msiof-r8a7744`, `renesas,msiof-r8a7745`, `renesas,msiof-r8a77470`, `renesas,msiof-r8a7790`, `renesas,msiof-r8a7791`, `renesas,msiof-r8a7792`, `renesas,msiof-r8a7793`, `renesas,msiof-r8a7794` 중 하나 뒤에 generic fallback `renesas,rcar-gen2-msiof`를 둡니다.

R-Car Gen3·Gen4와 deprecated compatible

33-59

R-Car Gen3와 RZ/G2는 `renesas,msiof-r8a774a1`, `renesas,msiof-r8a774b1`, `renesas,msiof-r8a774c0`, `renesas,msiof-r8a774e1`, `renesas,msiof-r8a7795`, `renesas,msiof-r8a7796`, `renesas,msiof-r8a77961`, `renesas,msiof-r8a77965`, `renesas,msiof-r8a77970`, `renesas,msiof-r8a77980`, `renesas,msiof-r8a77990`, `renesas,msiof-r8a77995` 중 하나와 fallback `renesas,rcar-gen3-msiof`를 사용합니다.

R-Car Gen4는 `renesas,msiof-r8a779a0`, `renesas,msiof-r8a779f0`, `renesas,msiof-r8a779g0`, `renesas,msiof-r8a779h0` 중 하나 뒤에 fallback `renesas,rcar-gen4-msiof`를 둡니다. 단독 `renesas,sh-msiof` compatible은 deprecated입니다.

Register와 기본 실행 자원

60-81

`reg`는 한 항목 또는 두 항목입니다. 한 항목이면 CPU와 DMA engine register를 함께 나타내며, 두 항목이면 첫째가 CPU register, 둘째가 DMA engine register입니다.

`interrupts`, `clocks`, `power-domains`, `resets`는 각각 최대 한 항목입니다.

Native chip-select 제약

82-100

`num-cs`는 chip select 총수이며 범위는 1~3, 기본값은 1입니다. Native chip select 0은 `MSIOF_SYNC`, 1은 `MSIOF_SS1`, 2는 `MSIOF_SS2`에 대응합니다.

같은 message에 속한 transfer 사이에서도 native chip select는 항상 deassert되므로 이를 피하려면 `cs-gpios`를 사용해야 합니다. Native chip select를 쓰는 모든 slave는 동일한 `spi-cs-high` 설정을 사용해야 하며, 이 제약도 `cs-gpios`로 우회할 수 있습니다. GPIO chip select를 사용할 때도 hardware가 native line 하나를 구동하므로 native chip select를 최소 하나 사용하지 않은 채 남겨야 합니다.

DMA 항목과 이름

101-110

`dmas`와 `dma-names`는 각각 최소 두 항목, 최대 네 항목입니다. DMA 이름은 `tx` 또는 `rx`만 허용됩니다.

Sync delay, FIFO override와 I2S port

111-150

`renesas,dtdl`은 transmit mode에서 sync signal의 setup delay를 지정하는 `uint32`입니다. 값 0, 50, 100, 150, 200은 각각 bit delay 없음, 0.5, 1, 1.5, 2 clock cycle delay를 뜻합니다.

`renesas,syncdl`은 transmit mode에서 sync signal의 hold delay를 지정하며 값 0, 50, 100, 150, 200, 300은 각각 0, 0.5, 1, 1.5, 2, 3 clock cycle delay를 뜻합니다.

`renesas,tx-fifo-size`와 `renesas,rx-fifo-size`는 기본 TX/RX FIFO 크기를 word 단위로 덮어씁니다. 0이면 무시되고 기본값은 각각 64이며 SoC-type 전용 binding에서는 deprecated입니다.

MSIOF-I2S 용도의 `port`는 `../sound/audio-graph-port.yaml#`을 참조하고 평가되지 않은 추가 속성을 허용하지 않습니다.

필수 자원과 mode별 조건

151-180

공통 필수 속성은 `compatible`, `reg`, `interrupts`, `clocks`, `power-domains`입니다. Compatible에 `renesas,sh-mobile-msiof`가 포함되지 않으면 `resets`도 필수입니다.

`port` node가 없으면 이 장치는 MSIOF-SPI로 간주되고 `spi-controller.yaml#`을 상속합니다. `port`가 있으면 MSIOF-I2S 구성을 나타냅니다. `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.

R8A7791 MSIOF 예제

181-198

예제의 `msiof0: spi@e6e20000`은 `renesas,msiof-r8a7791`과 fallback `renesas,rcar-gen2-msiof`, register `<0xe6e20000 0x0064>`, GIC SPI 156, CPG module clock 000을 사용합니다.

DMAC0의 channel `0x51`, `0x52`는 `tx`, `rx`에 대응하며 always-on power domain `R8A7791_PD_ALWAYS_ON`과 reset 0을 연결합니다.

#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7791-sysc.h>

msiof0: spi@e6e20000 {
    compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
    reg = <0xe6e20000 0x0064>;
    interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&cpg CPG_MOD 000>;
    dmas = <&dmac0 0x51>, <&dmac0 0x52>;
    dma-names = "tx", "rx";
    power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
    resets = <&cpg 0>;
    #address-cells = <1>;
    #size-cells = <0>;
};