Peripheral-specific properties for a SPI bus.

Schema identifier ($id): "http://devicetree.org/schemas/spi/spi-peripheral-props.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

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.

Maintainers (maintainers): "Mark Brown <broonie@kernel.org>"

Properties and child nodes (properties) #

reg — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 256

Array item rules (items) #

Array item rules (items)

Item 1

Minimum value (minimum): 0

Maximum value (maximum): 256

Chip select used by the device.

spi-cs-high — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

The device requires the chip select active high.

spi-lsb-first — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

The device requires the LSB first mode.

spi-max-frequency — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Maximum SPI clocking speed of the device in Hz.

spi-cs-setup-delay-ns — not listed as required here #

Delay in nanoseconds to be introduced by the controller after CS is asserted.

spi-cs-hold-delay-ns — not listed as required here #

Delay in nanoseconds to be introduced by the controller before CS is de-asserted.

spi-cs-inactive-delay-ns — not listed as required here #

Delay in nanoseconds to be introduced by the controller after CS is de-asserted.

spi-rx-bus-width — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Array item rules (items) #

Allowed values (enum): 0, 1, 2, 4, 8

Default value (default): 1

spi-rx-lane-map — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Default value (default): 0, 1, 2, 3, 4, 5, 6, 7

spi-rx-delay-us — not listed as required here #

Delay, in microseconds, after a read transfer.

rx-sample-delay-ns — not listed as required here #

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.

spi-tx-bus-width — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Array item rules (items) #

Allowed values (enum): 0, 1, 2, 4, 8

Default value (default): 1

spi-tx-lane-map — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Default value (default): 0, 1, 2, 3, 4, 5, 6, 7

spi-tx-delay-us — not listed as required here #

Delay, in microseconds, after a write transfer.

stacked-memories — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint64-array

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

parallel-memories — not listed as required here #

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.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint64-array

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

st,spi-midi-ns — not listed as required here #

Deprecated (deprecated): true

Only for STM32H7, (Master Inter-Data Idleness) minimum time delay in nanoseconds inserted between two consecutive data frames.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): arm,pl022-peripheral-props.yaml#

Rule 2 #

Shared schema rule ($ref): cdns,qspi-nor-peripheral-props.yaml#

Rule 3 #

Shared schema rule ($ref): fsl,dspi-peripheral-props.yaml#

Rule 4 #

Shared schema rule ($ref): samsung,spi-peripheral-props.yaml#

Rule 5 #

Shared schema rule ($ref): nvidia,tegra210-quad-peripheral-props.yaml#

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Line 151: The controller specific properties go here.

Edit this page