# Peripheral-specific properties for a SPI bus.

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Spi bindings_

> Device-tree binding reference for Peripheral-specific properties for a SPI bus..

<!-- SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;spi&#47;spi&#45;peripheral&#45;props&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Many SPI controllers need to add properties to peripheral devices. They could be common properties like spi-max-frequency, spi-cs-high, etc. or they could be controller specific like delay in clock or data lines, etc. These properties need to be defined in the peripheral node because they are per-peripheral and there can be multiple peripherals attached to a controller. All those properties are listed here. The controller specific properties should go in their own separate schema that should be referenced from here.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Mark Brown &#60;broonie&#64;kernel&#46;org&#62;&#34;</code></span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — not listed as required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-4b3e7791b11b96c3db87"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>256</code></span>

<a id="dt-b6190d107f3246c9804f"></a>

#### Array item rules (<code>items</code>)

> <a id="dt-fbcffbabb3f4ff87bebf"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-7867a9a58185986b0814"></a>
>
> **Item 1**
>
> > **Minimum value (<code>minimum</code>):** <span id="dt-55e124ce26d5c9fcc363"><code>0</code></span>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-cf2b29423d6bc77406d3"><code>256</code></span>

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">Chip select used by the device.</p>
</div>

<a id="dt-0f62bb4a7e531343cabd"></a>

### <code>spi&#45;cs&#45;high</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8a7b9890d61906a5f31f">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;flag</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-4496aa5cdf2440415eba>)</span>

<div id="dt-2ea695564f797ca93c9a">
<p style="white-space: pre-wrap">The device requires the chip select active high.</p>
</div>

<a id="dt-d3aaf04593f7852ac3cc"></a>

### <code>spi&#45;lsb&#45;first</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-66ad41375d69bae33e7c">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;flag</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-4496aa5cdf2440415eba>)</span>

<div id="dt-345c387d16ee3bde36e7">
<p style="white-space: pre-wrap">The device requires the LSB first mode.</p>
</div>

<a id="dt-03a3b4f56bf191dde680"></a>

### <code>spi&#45;max&#45;frequency</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-6572757e715d4f9872c7">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-7cdd837c003f268e6154">
<p style="white-space: pre-wrap">Maximum SPI clocking speed of the device in Hz.</p>
</div>

<a id="dt-a2dc84ed510ae79038cf"></a>

### <code>spi&#45;cs&#45;setup&#45;delay&#45;ns</code> — not listed as required here

<div id="dt-792ef8d92c3bb6dce0e1">
<p style="white-space: pre-wrap">Delay in nanoseconds to be introduced by the controller after CS is asserted.</p>
</div>

<a id="dt-cc201b4eed028d9eb08e"></a>

### <code>spi&#45;cs&#45;hold&#45;delay&#45;ns</code> — not listed as required here

<div id="dt-2ce350e9cd9c80d4d22a">
<p style="white-space: pre-wrap">Delay in nanoseconds to be introduced by the controller before CS is de-asserted.</p>
</div>

<a id="dt-82bf2bb596945f7855d4"></a>

### <code>spi&#45;cs&#45;inactive&#45;delay&#45;ns</code> — not listed as required here

<div id="dt-9058b66fc90d5f8b00d2">
<p style="white-space: pre-wrap">Delay in nanoseconds to be introduced by the controller after CS is de-asserted.</p>
</div>

<a id="dt-710b43aab82ca1d5387d"></a>

### <code>spi&#45;rx&#45;bus&#45;width</code> — not listed as required here

<div id="dt-861dc8d68676a349f287">
<p style="white-space: pre-wrap">Bus width to the SPI bus used for read transfers. If 0 is provided, then no RX will be possible on this device.
Some SPI peripherals and controllers may have multiple data lanes for receiving two or more words at the same time. If this is the case, each index in the array represents the lane on both the SPI peripheral and controller. Additional mapping properties may be needed if a lane is skipped on either side.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-a66a1f0bcda63a346ff8">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

<a id="dt-abafab53cbaf3b977841"></a>

#### Array item rules (<code>items</code>)

> **Allowed values (<code>enum</code>):** <a id="dt-38163ea7dfcc6db3dd58"></a> <span id="dt-443a2c410b15e9c03376"><code>0</code></span>, <span id="dt-ae097272bae393c83ea3"><code>1</code></span>, <span id="dt-3931d7c6517974739e48"><code>2</code></span>, <span id="dt-f43d94f2ef09022db404"><code>4</code></span>, <span id="dt-a55c748068604115cdf1"><code>8</code></span>

**Default value (<code>default</code>):** <a id="dt-adc9e18ee32b9f839702"></a> <span id="dt-7499e683041a981da111"><code>1</code></span>

<a id="dt-a728a1a99ca6ea381cd1"></a>

### <code>spi&#45;rx&#45;lane&#45;map</code> — not listed as required here

<div id="dt-3819bab1f8e98a506df7">
<p style="white-space: pre-wrap">Mapping of peripheral SDO lanes to controller SDI lanes. Each index in the array represents a peripheral SDO lane, and the value at that index represents the corresponding controller SDI lane.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-33e83132f693a6ac73d9">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

**Default value (<code>default</code>):** <a id="dt-2e088c88bd5f9f2457c1"></a> <span id="dt-2683a71ae6a063d22d5f"><code>0</code></span>, <span id="dt-3d8944686b98cc6ac2c3"><code>1</code></span>, <span id="dt-3faa4aa33609c9c78034"><code>2</code></span>, <span id="dt-1839d4658220a98eda2f"><code>3</code></span>, <span id="dt-41ec72e1ff203c3f6910"><code>4</code></span>, <span id="dt-7b64138706c3d0487390"><code>5</code></span>, <span id="dt-9f7ebc6f2ce8b022246d"><code>6</code></span>, <span id="dt-502ab7a9203659f2a270"><code>7</code></span>

<a id="dt-6e54bc4b0b1c417fa184"></a>

### <code>spi&#45;rx&#45;delay&#45;us</code> — not listed as required here

<div id="dt-f7c95a4707a88953765f">
<p style="white-space: pre-wrap">Delay, in microseconds, after a read transfer.</p>
</div>

<a id="dt-220b564fb84496a4977a"></a>

### <code>rx&#45;sample&#45;delay&#45;ns</code> — not listed as required here

<div id="dt-320e146025ce18c1c757">
<p style="white-space: pre-wrap">SPI Rx sample delay offset, unit is nanoseconds. The delay from the default sample time before the actual sample of the rxd input signal occurs.</p>
</div>

<a id="dt-2281b43630a0196069fa"></a>

### <code>spi&#45;tx&#45;bus&#45;width</code> — not listed as required here

<div id="dt-bc2332fa42b4819da45d">
<p style="white-space: pre-wrap">Bus width to the SPI bus used for write transfers. If 0 is provided, then no TX will be possible on this device.
Some SPI peripherals and controllers may have multiple data lanes for transmitting two or more words at the same time. If this is the case, each index in the array represents the lane on both the SPI peripheral and controller. Additional mapping properties may be needed if a lane is skipped on either side.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8cb7379e460dd9527513">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

<a id="dt-c68014ec8786c72520a7"></a>

#### Array item rules (<code>items</code>)

> **Allowed values (<code>enum</code>):** <a id="dt-cf6df306281b5e8da831"></a> <span id="dt-9f5f5a28c654364abb27"><code>0</code></span>, <span id="dt-37bf0b91549b4a4e9150"><code>1</code></span>, <span id="dt-af8da9546db26ec8648f"><code>2</code></span>, <span id="dt-14ba067f9dc9eda31877"><code>4</code></span>, <span id="dt-1b4d70c41bcb4157673f"><code>8</code></span>

**Default value (<code>default</code>):** <a id="dt-906d939311b18a193451"></a> <span id="dt-058bb20a432e90cd3c29"><code>1</code></span>

<a id="dt-e3dccf4450d3034f8043"></a>

### <code>spi&#45;tx&#45;lane&#45;map</code> — not listed as required here

<div id="dt-f0e3cc5be67b25074dce">
<p style="white-space: pre-wrap">Mapping of peripheral SDI lanes to controller SDO lanes. Each index in the array represents a peripheral SDI lane, and the value at that index represents the corresponding controller SDO lane.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-fa3f95c57188d2818e36">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-03a03f95a666fe4b033c>)</span>

**Default value (<code>default</code>):** <a id="dt-8829c683eac574e8cc1c"></a> <span id="dt-c936a34755d9f2d409eb"><code>0</code></span>, <span id="dt-68c46434687eb5c58c42"><code>1</code></span>, <span id="dt-0b01a8db9a2a1d791b22"><code>2</code></span>, <span id="dt-a564704d40a9b6bdc4ef"><code>3</code></span>, <span id="dt-ea3e6a91ee8d11408e97"><code>4</code></span>, <span id="dt-73eac9ade3448ed47e79"><code>5</code></span>, <span id="dt-09e31e0ebd02e199c741"><code>6</code></span>, <span id="dt-aa02ffab06aa7a65feef"><code>7</code></span>

<a id="dt-7071ea2817a697e0598e"></a>

### <code>spi&#45;tx&#45;delay&#45;us</code> — not listed as required here

<div id="dt-0565afad85b651fd32fa">
<p style="white-space: pre-wrap">Delay, in microseconds, after a write transfer.</p>
</div>

<a id="dt-1885375418d0d5312a37"></a>

### <code>stacked&#45;memories</code> — not listed as required here

<div id="dt-de9c79b69be547aa61ea">
<p style="white-space: pre-wrap">Several SPI memories can be wired in stacked mode. This basically means that either a device features several chip selects, or that different devices must be seen as a single bigger chip. This basically doubles (or more) the total address space with only a single additional wire, while still needing to repeat the commands when crossing a chip boundary. The size of each chip should be provided as members of the array.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-631ca3bbd0fab9e89981">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint64&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-c6acaf5177e2db9d9598>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-aa32f3a064b32111af42"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-a4cc38d7f64b25b3e90a"><code>4</code></span>

<a id="dt-3eab1d157b2f6c755151"></a>

### <code>parallel&#45;memories</code> — not listed as required here

<div id="dt-bc76ed64fb97281eccc4">
<p style="white-space: pre-wrap">Several SPI memories can be wired in parallel mode. The devices are physically on a different buses but will always act synchronously as each data word is spread across the different memories (eg. even bits are stored in one memory, odd bits in the other). This basically doubles the address space and the throughput while greatly complexifying the wiring because as many busses as devices must be wired. The size of each chip should be provided as members of the array.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-2306ee57b34602956854">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint64&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-c6acaf5177e2db9d9598>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-8f41419e6f15eb167631"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-38082d370f7a3728bc8b"><code>4</code></span>

<a id="dt-e39b4c9fc432801f4977"></a>

### <code>st&#44;spi&#45;midi&#45;ns</code> — not listed as required here

**Deprecated (<code>deprecated</code>):** <span id="dt-95e4dd755af599fa4a1d"><code>true</code></span>

<div id="dt-00af94077ffb2e4c310c">
<p style="white-space: pre-wrap">Only for STM32H7, (Master Inter-Data Idleness) minimum time
delay in nanoseconds inserted between two consecutive data frames.</p>
</div>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>arm&#44;pl022&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/arm-pl022-peripheral-props.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8549616abc3b04702c51">[<code>cdns&#44;qspi&#45;nor&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/cdns-qspi-nor-peripheral-props.md#dt-root>)</span>

<a id="dt-317510ea5c8bf789ca60"></a>

### Rule 3

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-75c09adb7725f4e827e8">[<code>fsl&#44;dspi&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/fsl-dspi-peripheral-props.md#dt-root>)</span>

<a id="dt-e198e1d898e7c60d5fed"></a>

### Rule 4

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-728e42d36b007a43405a">[<code>samsung&#44;spi&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/samsung-spi-peripheral-props.md#dt-root>)</span>

<a id="dt-1c66024c2be5a725f708"></a>

### Rule 5

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-3bbfb8e4ad51299ea56c">[<code>nvidia&#44;tegra210&#45;quad&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-spi/nvidia-tegra210-quad-peripheral-props.md#dt-root>)</span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

Allowed by this rule.

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 151:</strong> <span> The controller specific properties go here.</span></p>

</details>
