xref: /linux/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml (revision f6154d8babbb8a98f0d3ea325aafae2e33bfd8be)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/spi/st,stm32-spi.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectronics STM32 SPI Controller
8
9description: |
10  The STM32 SPI controller is used to communicate with external devices using
11  the Serial Peripheral Interface. It supports full-duplex, half-duplex and
12  simplex synchronous serial communication with external devices. It supports
13  from 4 to 32-bit data size.
14
15maintainers:
16  - Erwan Leray <erwan.leray@foss.st.com>
17  - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
18
19allOf:
20  - $ref: spi-controller.yaml#
21
22properties:
23  compatible:
24    enum:
25      - st,stm32f4-spi
26      - st,stm32h7-spi
27
28  reg:
29    maxItems: 1
30
31  clocks:
32    maxItems: 1
33
34  interrupts:
35    maxItems: 1
36
37  resets:
38    maxItems: 1
39
40  dmas:
41    description: |
42      DMA specifiers for tx and rx dma. DMA fifo mode must be used. See
43      the STM32 DMA bindings Documentation/devicetree/bindings/dma/st,stm32-dma.yaml.
44    items:
45      - description: rx DMA channel
46      - description: tx DMA channel
47
48  dma-names:
49    items:
50      - const: rx
51      - const: tx
52
53required:
54  - compatible
55  - reg
56  - clocks
57  - interrupts
58
59unevaluatedProperties: false
60
61examples:
62  - |
63    #include <dt-bindings/interrupt-controller/arm-gic.h>
64    #include <dt-bindings/clock/stm32mp1-clks.h>
65    #include <dt-bindings/reset/stm32mp1-resets.h>
66    spi@4000b000 {
67        #address-cells = <1>;
68        #size-cells = <0>;
69        compatible = "st,stm32h7-spi";
70        reg = <0x4000b000 0x400>;
71        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
72        clocks = <&rcc SPI2_K>;
73        resets = <&rcc SPI2_R>;
74        dmas = <&dmamux1 0 39 0x400 0x05>,
75               <&dmamux1 1 40 0x400 0x05>;
76        dma-names = "rx", "tx";
77        cs-gpios = <&gpioa 11 0>;
78    };
79
80...
81