1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/st,stm32-spi.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: STMicroelectronics STM32 SPI Controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotdescription: | 10c66ec88fSEmmanuel Vadot The STM32 SPI controller is used to communicate with external devices using 11c66ec88fSEmmanuel Vadot the Serial Peripheral Interface. It supports full-duplex, half-duplex and 12c66ec88fSEmmanuel Vadot simplex synchronous serial communication with external devices. It supports 13c66ec88fSEmmanuel Vadot from 4 to 32-bit data size. 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadotmaintainers: 168cc087a1SEmmanuel Vadot - Erwan Leray <erwan.leray@foss.st.com> 178cc087a1SEmmanuel Vadot - Fabrice Gasnier <fabrice.gasnier@foss.st.com> 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel VadotallOf: 20c66ec88fSEmmanuel Vadot - $ref: "spi-controller.yaml#" 21c66ec88fSEmmanuel Vadot - if: 22c66ec88fSEmmanuel Vadot properties: 23c66ec88fSEmmanuel Vadot compatible: 24c66ec88fSEmmanuel Vadot contains: 25c66ec88fSEmmanuel Vadot const: st,stm32f4-spi 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot then: 28c66ec88fSEmmanuel Vadot properties: 29c66ec88fSEmmanuel Vadot st,spi-midi-ns: false 30c66ec88fSEmmanuel Vadot 31c66ec88fSEmmanuel Vadotproperties: 32c66ec88fSEmmanuel Vadot compatible: 33c66ec88fSEmmanuel Vadot enum: 34c66ec88fSEmmanuel Vadot - st,stm32f4-spi 35c66ec88fSEmmanuel Vadot - st,stm32h7-spi 36c66ec88fSEmmanuel Vadot 37c66ec88fSEmmanuel Vadot reg: 38c66ec88fSEmmanuel Vadot maxItems: 1 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot clocks: 41c66ec88fSEmmanuel Vadot maxItems: 1 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot interrupts: 44c66ec88fSEmmanuel Vadot maxItems: 1 45c66ec88fSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot resets: 47c66ec88fSEmmanuel Vadot maxItems: 1 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel Vadot dmas: 50c66ec88fSEmmanuel Vadot description: | 51c66ec88fSEmmanuel Vadot DMA specifiers for tx and rx dma. DMA fifo mode must be used. See 52c66ec88fSEmmanuel Vadot the STM32 DMA bindings Documentation/devicetree/bindings/dma/st,stm32-dma.yaml. 53c66ec88fSEmmanuel Vadot items: 54c66ec88fSEmmanuel Vadot - description: rx DMA channel 55c66ec88fSEmmanuel Vadot - description: tx DMA channel 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot dma-names: 58c66ec88fSEmmanuel Vadot items: 59c66ec88fSEmmanuel Vadot - const: rx 60c66ec88fSEmmanuel Vadot - const: tx 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel VadotpatternProperties: 63c66ec88fSEmmanuel Vadot "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$": 64c66ec88fSEmmanuel Vadot type: object 65c66ec88fSEmmanuel Vadot # SPI slave nodes must be children of the SPI master node and can 66c66ec88fSEmmanuel Vadot # contain the following properties. 67c66ec88fSEmmanuel Vadot properties: 68c66ec88fSEmmanuel Vadot st,spi-midi-ns: 69c66ec88fSEmmanuel Vadot description: | 70c66ec88fSEmmanuel Vadot Only for STM32H7, (Master Inter-Data Idleness) minimum time 71c66ec88fSEmmanuel Vadot delay in nanoseconds inserted between two consecutive data frames. 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadotrequired: 74c66ec88fSEmmanuel Vadot - compatible 75c66ec88fSEmmanuel Vadot - reg 76c66ec88fSEmmanuel Vadot - clocks 77c66ec88fSEmmanuel Vadot - interrupts 78c66ec88fSEmmanuel Vadot 796be33864SEmmanuel VadotunevaluatedProperties: false 806be33864SEmmanuel Vadot 81c66ec88fSEmmanuel Vadotexamples: 82c66ec88fSEmmanuel Vadot - | 83c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 84c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/stm32mp1-clks.h> 85c66ec88fSEmmanuel Vadot #include <dt-bindings/reset/stm32mp1-resets.h> 86c66ec88fSEmmanuel Vadot spi@4000b000 { 87c66ec88fSEmmanuel Vadot #address-cells = <1>; 88c66ec88fSEmmanuel Vadot #size-cells = <0>; 89c66ec88fSEmmanuel Vadot compatible = "st,stm32h7-spi"; 90c66ec88fSEmmanuel Vadot reg = <0x4000b000 0x400>; 91c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 92c66ec88fSEmmanuel Vadot clocks = <&rcc SPI2_K>; 93c66ec88fSEmmanuel Vadot resets = <&rcc SPI2_R>; 94c66ec88fSEmmanuel Vadot dmas = <&dmamux1 0 39 0x400 0x05>, 95c66ec88fSEmmanuel Vadot <&dmamux1 1 40 0x400 0x05>; 96c66ec88fSEmmanuel Vadot dma-names = "rx", "tx"; 97c66ec88fSEmmanuel Vadot cs-gpios = <&gpioa 11 0>; 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel Vadot }; 100c66ec88fSEmmanuel Vadot 101c66ec88fSEmmanuel Vadot... 102