xref: /freebsd/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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
78bab661aSEmmanuel 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:
20cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml#
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadotproperties:
23c66ec88fSEmmanuel Vadot  compatible:
24c66ec88fSEmmanuel Vadot    enum:
25c66ec88fSEmmanuel Vadot      - st,stm32f4-spi
26*8d13bc63SEmmanuel Vadot      - st,stm32f7-spi
27c66ec88fSEmmanuel Vadot      - st,stm32h7-spi
28*8d13bc63SEmmanuel Vadot      - st,stm32mp25-spi
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot  reg:
31c66ec88fSEmmanuel Vadot    maxItems: 1
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  clocks:
34c66ec88fSEmmanuel Vadot    maxItems: 1
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  interrupts:
37c66ec88fSEmmanuel Vadot    maxItems: 1
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  resets:
40c66ec88fSEmmanuel Vadot    maxItems: 1
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  dmas:
43c66ec88fSEmmanuel Vadot    description: |
44c66ec88fSEmmanuel Vadot      DMA specifiers for tx and rx dma. DMA fifo mode must be used. See
45c66ec88fSEmmanuel Vadot      the STM32 DMA bindings Documentation/devicetree/bindings/dma/st,stm32-dma.yaml.
46c66ec88fSEmmanuel Vadot    items:
47c66ec88fSEmmanuel Vadot      - description: rx DMA channel
48c66ec88fSEmmanuel Vadot      - description: tx DMA channel
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  dma-names:
51c66ec88fSEmmanuel Vadot    items:
52c66ec88fSEmmanuel Vadot      - const: rx
53c66ec88fSEmmanuel Vadot      - const: tx
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadotrequired:
56c66ec88fSEmmanuel Vadot  - compatible
57c66ec88fSEmmanuel Vadot  - reg
58c66ec88fSEmmanuel Vadot  - clocks
59c66ec88fSEmmanuel Vadot  - interrupts
60c66ec88fSEmmanuel Vadot
616be33864SEmmanuel VadotunevaluatedProperties: false
626be33864SEmmanuel Vadot
63c66ec88fSEmmanuel Vadotexamples:
64c66ec88fSEmmanuel Vadot  - |
65c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
66c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/stm32mp1-clks.h>
67c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/stm32mp1-resets.h>
68c66ec88fSEmmanuel Vadot    spi@4000b000 {
69c66ec88fSEmmanuel Vadot        #address-cells = <1>;
70c66ec88fSEmmanuel Vadot        #size-cells = <0>;
71c66ec88fSEmmanuel Vadot        compatible = "st,stm32h7-spi";
72c66ec88fSEmmanuel Vadot        reg = <0x4000b000 0x400>;
73c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
74c66ec88fSEmmanuel Vadot        clocks = <&rcc SPI2_K>;
75c66ec88fSEmmanuel Vadot        resets = <&rcc SPI2_R>;
76c66ec88fSEmmanuel Vadot        dmas = <&dmamux1 0 39 0x400 0x05>,
77c66ec88fSEmmanuel Vadot               <&dmamux1 1 40 0x400 0x05>;
78c66ec88fSEmmanuel Vadot        dma-names = "rx", "tx";
79c66ec88fSEmmanuel Vadot        cs-gpios = <&gpioa 11 0>;
80c66ec88fSEmmanuel Vadot    };
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot...
83