← Documents Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

SPI peripheral properties

SPI peripheral별 chip-select, bus width, timing, stacked·parallel memory 속성을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

spi-peripheral-props.yaml:1-131

SPI peripheral별 chip-select, bus width, timing, stacked·parallel memory 속성을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-peripheral-props.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Peripheral-specific properties for a SPI bus.
8
9 description:
10 Many SPI controllers need to add properties to peripheral devices. They could
11 be common properties like spi-max-frequency, spi-cs-high, etc. or they could
12 be controller specific like delay in clock or data lines, etc. These
13 properties need to be defined in the peripheral node because they are
14 per-peripheral and there can be multiple peripherals attached to a
15 controller. All those properties are listed here. The controller specific
16 properties should go in their own separate schema that should be referenced
17 from here.
18
19 maintainers:
20 - Mark Brown <[email protected]>
21
22 properties:
23 reg:
24 minItems: 1
25 maxItems: 256
26 items:
27 items:
28 - minimum: 0
29 maximum: 256
30 description:
31 Chip select used by the device.
32
33 spi-cs-high:
34 $ref: /schemas/types.yaml#/definitions/flag
35 description:
36 The device requires the chip select active high.
37
38 spi-lsb-first:
39 $ref: /schemas/types.yaml#/definitions/flag
40 description:
41 The device requires the LSB first mode.
42
43 spi-max-frequency:
44 $ref: /schemas/types.yaml#/definitions/uint32
45 description:
46 Maximum SPI clocking speed of the device in Hz.
47
48 spi-cs-setup-delay-ns:
49 description:
50 Delay in nanoseconds to be introduced by the controller after CS is
51 asserted.
52
53 spi-cs-hold-delay-ns:
54 description:
55 Delay in nanoseconds to be introduced by the controller before CS is
56 de-asserted.
57
58 spi-cs-inactive-delay-ns:
59 description:
60 Delay in nanoseconds to be introduced by the controller after CS is
61 de-asserted.
62
63 spi-rx-bus-width:
64 description:
65 Bus width to the SPI bus used for read transfers.
66 If 0 is provided, then no RX will be possible on this device.
67 $ref: /schemas/types.yaml#/definitions/uint32
68 enum: [0, 1, 2, 4, 8]
69 default: 1
70
71 spi-rx-delay-us:
72 description:
73 Delay, in microseconds, after a read transfer.
74
75 rx-sample-delay-ns:
76 description: SPI Rx sample delay offset, unit is nanoseconds.
77 The delay from the default sample time before the actual
78 sample of the rxd input signal occurs.
79
80 spi-tx-bus-width:
81 description:
82 Bus width to the SPI bus used for write transfers.
83 If 0 is provided, then no TX will be possible on this device.
84 $ref: /schemas/types.yaml#/definitions/uint32
85 enum: [0, 1, 2, 4, 8]
86 default: 1
87
88 spi-tx-delay-us:
89 description:
90 Delay, in microseconds, after a write transfer.
91
92 stacked-memories:
93 description: Several SPI memories can be wired in stacked mode.
94 This basically means that either a device features several chip
95 selects, or that different devices must be seen as a single
96 bigger chip. This basically doubles (or more) the total address
97 space with only a single additional wire, while still needing
98 to repeat the commands when crossing a chip boundary. The size of
99 each chip should be provided as members of the array.
100 $ref: /schemas/types.yaml#/definitions/uint64-array
101 minItems: 2
102 maxItems: 4
103
104 parallel-memories:
105 description: Several SPI memories can be wired in parallel mode.
106 The devices are physically on a different buses but will always
107 act synchronously as each data word is spread across the
108 different memories (eg. even bits are stored in one memory, odd
109 bits in the other). This basically doubles the address space and
110 the throughput while greatly complexifying the wiring because as
111 many busses as devices must be wired. The size of each chip should
112 be provided as members of the array.
113 $ref: /schemas/types.yaml#/definitions/uint64-array
114 minItems: 2
115 maxItems: 4
116
117 st,spi-midi-ns:
118 deprecated: true
119 description: |
120 Only for STM32H7, (Master Inter-Data Idleness) minimum time
121 delay in nanoseconds inserted between two consecutive data frames.
122
123 # The controller specific properties go here.
124 allOf:
125 - $ref: arm,pl022-peripheral-props.yaml#
126 - $ref: cdns,qspi-nor-peripheral-props.yaml#
127 - $ref: fsl,dspi-peripheral-props.yaml#
128 - $ref: samsung,spi-peripheral-props.yaml#
129 - $ref: nvidia,tegra210-quad-peripheral-props.yaml#
130
131 additionalProperties: true
132

3. 한국어 전문 번역

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

Peripheral별 SPI 속성의 위치

1-21

이 schema는 SPI bus의 peripheral-specific property를 모읍니다. `spi-max-frequency`, `spi-cs-high` 같은 공통 속성뿐 아니라 clock 또는 data line delay 같은 controller-specific 속성도 peripheral마다 다르므로 peripheral node에 둬야 합니다.

한 controller에 여러 peripheral이 연결될 수 있습니다. Controller-specific property는 별도 schema에 정의하고 이 schema에서 참조해야 하며 maintainer는 Mark Brown입니다.

Chip select, bit 순서와 최대 주파수

22-47

`reg`는 device가 사용하는 chip select를 나타내며 1~256개 항목을 허용합니다. 각 값의 범위는 0~256입니다. `spi-cs-high`는 chip select가 active-high여야 함을, `spi-lsb-first`는 LSB-first mode가 필요함을 나타내는 flag입니다.

`spi-max-frequency`는 Hz 단위의 `uint32` 값으로 device의 최대 SPI clock 속도를 지정합니다.

Chip-select timing 지연

48-62

`spi-cs-setup-delay-ns`는 CS assert 뒤 controller가 삽입할 지연, `spi-cs-hold-delay-ns`는 CS de-assert 전에 삽입할 지연, `spi-cs-inactive-delay-ns`는 CS de-assert 뒤 삽입할 지연을 각각 nanosecond 단위로 지정합니다.

RX bus width와 sample 지연

63-79

`spi-rx-bus-width`는 read transfer의 bus width이며 0, 1, 2, 4, 8 중 하나입니다. 기본값은 1이고 0이면 해당 device에서 RX가 불가능합니다. `spi-rx-delay-us`는 read transfer 뒤의 microsecond 지연입니다.

`rx-sample-delay-ns`는 기본 sample time부터 실제 `rxd` 입력을 sample할 때까지의 offset을 nanosecond 단위로 지정합니다.

TX bus width와 transfer 후 지연

80-91

`spi-tx-bus-width`는 write transfer의 bus width이며 0, 1, 2, 4, 8 중 하나입니다. 기본값은 1이고 0이면 해당 device에서 TX가 불가능합니다. `spi-tx-delay-us`는 write transfer 뒤의 microsecond 지연입니다.

Stacked·parallel memory와 controller 확장

92-131

`stacked-memories`는 여러 chip select를 가진 device 또는 여러 device를 하나의 더 큰 chip처럼 보이게 연결합니다. 추가 wire 하나로 전체 주소 공간을 두 배 이상 늘릴 수 있지만 chip 경계를 넘을 때 command를 반복해야 합니다. 각 chip size를 2~4개 `uint64` array 항목으로 제공합니다.

`parallel-memories`는 물리적으로 서로 다른 bus의 memory들이 각 data word를 나눠 저장하면서 항상 동기적으로 동작하게 합니다. 예를 들어 한 memory는 even bit, 다른 memory는 odd bit를 저장합니다. 주소 공간과 throughput은 늘지만 device 수만큼 bus wiring이 필요해 복잡해지며 각 chip size를 2~4개 항목으로 제공합니다.

Deprecated `st,spi-midi-ns`는 STM32H7에서 연속 data frame 사이에 삽입하는 Master Inter-Data Idleness 최소 시간을 nanosecond로 지정합니다. Controller별 속성은 `arm,pl022-peripheral-props.yaml#`, `cdns,qspi-nor-peripheral-props.yaml#`, `fsl,dspi-peripheral-props.yaml#`, `samsung,spi-peripheral-props.yaml#`, `nvidia,tegra210-quad-peripheral-props.yaml#`을 참조합니다. `additionalProperties: true`로 추가 속성을 허용합니다.