STMicroelectronics STM32 SPI Controller
Schema identifier ($id): "http://devicetree.org/schemas/spi/st,stm32-spi.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
The STM32 SPI controller is used to communicate with external devices using the Serial Peripheral Interface. It supports full-duplex, half-duplex and simplex synchronous serial communication with external devices. It supports from 4 to 32-bit data size.
Maintainers (maintainers): "Erwan Leray <erwan.leray@foss.st.com>", "Fabrice Gasnier <fabrice.gasnier@foss.st.com>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):spi-controller.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"st,stm32f4-spi"When the condition matches (
then) #Properties and child nodes (
properties)
st,spi-midi-ns— not listed as required here
false— Not permitted by this property rule.
sram— not listed as required here
false— Not permitted by this property rule.
dmas— not listed as required hereMaximum number of items (
maxItems):2
dma-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"rx"Item 2
Exact value (
const):"tx"
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"st,stm32mp25-spi"When the condition matches (
then) #Properties and child nodes (
properties)
sram— not listed as required here
false— Not permitted by this property rule.
dmas— not listed as required hereMaximum number of items (
maxItems):2
dma-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"rx"Item 2
Exact value (
const):"tx"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "st,stm32f4-spi", "st,stm32f7-spi", "st,stm32h7-spi", "st,stm32mp25-spi"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
resets — not listed as required here #
Maximum number of items (maxItems): 1
dmas — not listed as required here #
DMA specifiers for tx and rx channels. DMA fifo mode must be used. See the STM32 DMA bindings Documentation/devicetree/bindings/dma/stm32/st,*dma.yaml
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
rx DMA channel
Item 2
tx DMA channel
Item 3
rxm2m MDMA channel
dma-names — not listed as required here #
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
Exact value (
const):"rx"
Item 2
Exact value (
const):"tx"
Item 3
Exact value (
const):"rxm2m"
sram — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Phandles to a reserved SRAM region which is used as temporary storage memory between DMA and MDMA engines. The region should be defined as child node of the AHB SRAM node as per the generic bindings in Documentation/devicetree/bindings/sram/sram.yaml
power-domains — not listed as required here #
Maximum number of items (maxItems): 1
access-controllers — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
Required in this object (required): "compatible", "reg", "clocks", "interrupts"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h>
spi@4000b000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32h7-spi";
reg = <0x4000b000 0x400>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&rcc SPI2_K>;
resets = <&rcc SPI2_R>;
dmas = <&dmamux1 0 39 0x400 0x05>,
<&dmamux1 1 40 0x400 0x05>;
dma-names = "rx", "tx";
cs-gpios = <&gpioa 11 0>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)