1STMicroelectronics STM32 SPI Controller
2
3The STM32 SPI controller is used to communicate with external devices using
4the Serial Peripheral Interface. It supports full-duplex, half-duplex and
5simplex synchronous serial communication with external devices. It supports
6from 4 to 32-bit data size. Although it can be configured as master or slave,
7only master is supported by the driver.
8
9Required properties:
10- compatible: Should be one of:
11  "st,stm32h7-spi"
12  "st,stm32f4-spi"
13- reg: Offset and length of the device's register set.
14- interrupts: Must contain the interrupt id.
15- clocks: Must contain an entry for spiclk (which feeds the internal clock
16	  generator).
17- #address-cells:  Number of cells required to define a chip select address.
18- #size-cells: Should be zero.
19
20Optional properties:
21- resets: Must contain the phandle to the reset controller.
22- A pinctrl state named "default" may be defined to set pins in mode of
23  operation for SPI transfer.
24- dmas: DMA specifiers for tx and rx dma. DMA fifo mode must be used. See the
25  STM32 DMA bindings, Documentation/devicetree/bindings/dma/stm32-dma.txt.
26- dma-names: DMA request names should include "tx" and "rx" if present.
27- cs-gpios: list of GPIO chip selects. See the SPI bus bindings,
28  Documentation/devicetree/bindings/spi/spi-bus.txt
29
30
31Child nodes represent devices on the SPI bus
32  See ../spi/spi-bus.txt
33
34Optional properties:
35- st,spi-midi-ns: Only for STM32H7, (Master Inter-Data Idleness) minimum time
36		  delay in nanoseconds inserted between two consecutive data
37		  frames.
38
39
40Example:
41	spi2: spi@40003800 {
42		#address-cells = <1>;
43		#size-cells = <0>;
44		compatible = "st,stm32h7-spi";
45		reg = <0x40003800 0x400>;
46		interrupts = <36>;
47		clocks = <&rcc SPI2_CK>;
48		resets = <&rcc 1166>;
49		dmas = <&dmamux1 0 39 0x400 0x01>,
50		       <&dmamux1 1 40 0x400 0x01>;
51		dma-names = "rx", "tx";
52		pinctrl-0 = <&spi2_pins_b>;
53		pinctrl-names = "default";
54		cs-gpios = <&gpioa 11 0>;
55
56		aardvark@0 {
57			compatible = "totalphase,aardvark";
58			reg = <0>;
59			spi-max-frequency = <4000000>;
60			st,spi-midi-ns = <4000>;
61		};
62	};
63