spi-stm32.txt 2.0 KB

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