xref: /freebsd/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
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
268d13bc63SEmmanuel Vadot      - st,stm32f7-spi
27c66ec88fSEmmanuel Vadot      - st,stm32h7-spi
288d13bc63SEmmanuel 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
45*0e8011faSEmmanuel Vadot      the STM32 DMA controllers bindings Documentation/devicetree/bindings/dma/stm32/*.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
557d0873ebSEmmanuel Vadot  access-controllers:
567d0873ebSEmmanuel Vadot    minItems: 1
577d0873ebSEmmanuel Vadot    maxItems: 2
587d0873ebSEmmanuel Vadot
59c66ec88fSEmmanuel Vadotrequired:
60c66ec88fSEmmanuel Vadot  - compatible
61c66ec88fSEmmanuel Vadot  - reg
62c66ec88fSEmmanuel Vadot  - clocks
63c66ec88fSEmmanuel Vadot  - interrupts
64c66ec88fSEmmanuel Vadot
656be33864SEmmanuel VadotunevaluatedProperties: false
666be33864SEmmanuel Vadot
67c66ec88fSEmmanuel Vadotexamples:
68c66ec88fSEmmanuel Vadot  - |
69c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
70c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/stm32mp1-clks.h>
71c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/stm32mp1-resets.h>
72c66ec88fSEmmanuel Vadot    spi@4000b000 {
73c66ec88fSEmmanuel Vadot        #address-cells = <1>;
74c66ec88fSEmmanuel Vadot        #size-cells = <0>;
75c66ec88fSEmmanuel Vadot        compatible = "st,stm32h7-spi";
76c66ec88fSEmmanuel Vadot        reg = <0x4000b000 0x400>;
77c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
78c66ec88fSEmmanuel Vadot        clocks = <&rcc SPI2_K>;
79c66ec88fSEmmanuel Vadot        resets = <&rcc SPI2_R>;
80c66ec88fSEmmanuel Vadot        dmas = <&dmamux1 0 39 0x400 0x05>,
81c66ec88fSEmmanuel Vadot               <&dmamux1 1 40 0x400 0x05>;
82c66ec88fSEmmanuel Vadot        dma-names = "rx", "tx";
83c66ec88fSEmmanuel Vadot        cs-gpios = <&gpioa 11 0>;
84c66ec88fSEmmanuel Vadot    };
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot...
87