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