xref: /freebsd/sys/contrib/device-tree/Bindings/dma/stm32/st,stm32-dma3.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/dma/stm32/st,stm32-dma3.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: STMicroelectronics STM32 DMA3 Controller
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotdescription: |
10*0e8011faSEmmanuel Vadot  The STM32 DMA3 is a direct memory access controller with different features
11*0e8011faSEmmanuel Vadot  depending on its hardware configuration.
12*0e8011faSEmmanuel Vadot  It is either called LPDMA (Low Power), GPDMA (General Purpose) or HPDMA (High
13*0e8011faSEmmanuel Vadot  Performance).
14*0e8011faSEmmanuel Vadot  Its hardware configuration registers allow to dynamically expose its features.
15*0e8011faSEmmanuel Vadot
16*0e8011faSEmmanuel Vadot  GPDMA and HPDMA support 16 independent DMA channels, while only 4 for LPDMA.
17*0e8011faSEmmanuel Vadot  GPDMA and HPDMA support 256 DMA requests from peripherals, 8 for LPDMA.
18*0e8011faSEmmanuel Vadot
19*0e8011faSEmmanuel Vadot  Bindings are generic for these 3 STM32 DMA3 configurations.
20*0e8011faSEmmanuel Vadot
21*0e8011faSEmmanuel Vadot  DMA clients connected to the STM32 DMA3 controller must use the format
22*0e8011faSEmmanuel Vadot  described in "#dma-cells" property description below, using a three-cell
23*0e8011faSEmmanuel Vadot  specifier for each channel.
24*0e8011faSEmmanuel Vadot
25*0e8011faSEmmanuel Vadotmaintainers:
26*0e8011faSEmmanuel Vadot  - Amelie Delaunay <amelie.delaunay@foss.st.com>
27*0e8011faSEmmanuel Vadot
28*0e8011faSEmmanuel VadotallOf:
29*0e8011faSEmmanuel Vadot  - $ref: /schemas/dma/dma-controller.yaml#
30*0e8011faSEmmanuel Vadot
31*0e8011faSEmmanuel Vadotproperties:
32*0e8011faSEmmanuel Vadot  compatible:
33*0e8011faSEmmanuel Vadot    const: st,stm32mp25-dma3
34*0e8011faSEmmanuel Vadot
35*0e8011faSEmmanuel Vadot  reg:
36*0e8011faSEmmanuel Vadot    maxItems: 1
37*0e8011faSEmmanuel Vadot
38*0e8011faSEmmanuel Vadot  interrupts:
39*0e8011faSEmmanuel Vadot    minItems: 4
40*0e8011faSEmmanuel Vadot    maxItems: 16
41*0e8011faSEmmanuel Vadot    description:
42*0e8011faSEmmanuel Vadot      Should contain all of the per-channel DMA interrupts in ascending order
43*0e8011faSEmmanuel Vadot      with respect to the DMA channel index.
44*0e8011faSEmmanuel Vadot
45*0e8011faSEmmanuel Vadot  clocks:
46*0e8011faSEmmanuel Vadot    maxItems: 1
47*0e8011faSEmmanuel Vadot
48*0e8011faSEmmanuel Vadot  resets:
49*0e8011faSEmmanuel Vadot    maxItems: 1
50*0e8011faSEmmanuel Vadot
51*0e8011faSEmmanuel Vadot  power-domains:
52*0e8011faSEmmanuel Vadot    maxItems: 1
53*0e8011faSEmmanuel Vadot
54*0e8011faSEmmanuel Vadot  "#dma-cells":
55*0e8011faSEmmanuel Vadot    const: 3
56*0e8011faSEmmanuel Vadot    description: |
57*0e8011faSEmmanuel Vadot      Specifies the number of cells needed to provide DMA controller specific
58*0e8011faSEmmanuel Vadot      information.
59*0e8011faSEmmanuel Vadot      The first cell is the request line number.
60*0e8011faSEmmanuel Vadot      The second cell is a 32-bit mask specifying the DMA channel requirements:
61*0e8011faSEmmanuel Vadot        -bit 0-1: The priority level
62*0e8011faSEmmanuel Vadot          0x0: low priority, low weight
63*0e8011faSEmmanuel Vadot          0x1: low priority, mid weight
64*0e8011faSEmmanuel Vadot          0x2: low priority, high weight
65*0e8011faSEmmanuel Vadot          0x3: high priority
66*0e8011faSEmmanuel Vadot        -bit 4-7: The FIFO requirement for queuing source/destination transfers
67*0e8011faSEmmanuel Vadot          0x0: no FIFO requirement/any channel can fit
68*0e8011faSEmmanuel Vadot          0x2: FIFO of 8 bytes (2^2+1)
69*0e8011faSEmmanuel Vadot          0x4: FIFO of 32 bytes (2^4+1)
70*0e8011faSEmmanuel Vadot          0x6: FIFO of 128 bytes (2^6+1)
71*0e8011faSEmmanuel Vadot          0x7: FIFO of 256 bytes (2^7+1)
72*0e8011faSEmmanuel Vadot      The third cell is a 32-bit mask specifying the DMA transfer requirements:
73*0e8011faSEmmanuel Vadot        -bit 0: The source incrementing burst
74*0e8011faSEmmanuel Vadot          0x0: fixed burst
75*0e8011faSEmmanuel Vadot          0x1: contiguously incremented burst
76*0e8011faSEmmanuel Vadot        -bit 1: The source allocated port
77*0e8011faSEmmanuel Vadot          0x0: port 0 is allocated to the source transfer
78*0e8011faSEmmanuel Vadot          0x1: port 1 is allocated to the source transfer
79*0e8011faSEmmanuel Vadot        -bit 4: The destination incrementing burst
80*0e8011faSEmmanuel Vadot          0x0: fixed burst
81*0e8011faSEmmanuel Vadot          0x1: contiguously incremented burst
82*0e8011faSEmmanuel Vadot        -bit 5: The destination allocated port
83*0e8011faSEmmanuel Vadot          0x0: port 0 is allocated to the destination transfer
84*0e8011faSEmmanuel Vadot          0x1: port 1 is allocated to the destination transfer
85*0e8011faSEmmanuel Vadot        -bit 8: The type of hardware request
86*0e8011faSEmmanuel Vadot          0x0: burst
87*0e8011faSEmmanuel Vadot          0x1: block
88*0e8011faSEmmanuel Vadot        -bit 9: The control mode
89*0e8011faSEmmanuel Vadot          0x0: DMA controller control mode
90*0e8011faSEmmanuel Vadot          0x1: peripheral control mode
91*0e8011faSEmmanuel Vadot        -bit 12-13: The transfer complete event mode
92*0e8011faSEmmanuel Vadot          0x0: at block level, transfer complete event is generated at the end
93*0e8011faSEmmanuel Vadot               of a block
94*0e8011faSEmmanuel Vadot          0x2: at LLI level, the transfer complete event is generated at the end
95*0e8011faSEmmanuel Vadot               of the LLI transfer
96*0e8011faSEmmanuel Vadot               including the update of the LLI if any
97*0e8011faSEmmanuel Vadot          0x3: at channel level, the transfer complete event is generated at the
98*0e8011faSEmmanuel Vadot               end of the last LLI
99*0e8011faSEmmanuel Vadot
100*0e8011faSEmmanuel Vadotrequired:
101*0e8011faSEmmanuel Vadot  - compatible
102*0e8011faSEmmanuel Vadot  - reg
103*0e8011faSEmmanuel Vadot  - interrupts
104*0e8011faSEmmanuel Vadot  - clocks
105*0e8011faSEmmanuel Vadot  - "#dma-cells"
106*0e8011faSEmmanuel Vadot
107*0e8011faSEmmanuel VadotunevaluatedProperties: false
108*0e8011faSEmmanuel Vadot
109*0e8011faSEmmanuel Vadotexamples:
110*0e8011faSEmmanuel Vadot  - |
111*0e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
112*0e8011faSEmmanuel Vadot    #include <dt-bindings/clock/st,stm32mp25-rcc.h>
113*0e8011faSEmmanuel Vadot    dma-controller@40400000 {
114*0e8011faSEmmanuel Vadot      compatible = "st,stm32mp25-dma3";
115*0e8011faSEmmanuel Vadot      reg = <0x40400000 0x1000>;
116*0e8011faSEmmanuel Vadot      interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
117*0e8011faSEmmanuel Vadot                   <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
118*0e8011faSEmmanuel Vadot                   <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
119*0e8011faSEmmanuel Vadot                   <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
120*0e8011faSEmmanuel Vadot                   <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
121*0e8011faSEmmanuel Vadot                   <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
122*0e8011faSEmmanuel Vadot                   <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
123*0e8011faSEmmanuel Vadot                   <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
124*0e8011faSEmmanuel Vadot                   <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
125*0e8011faSEmmanuel Vadot                   <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
126*0e8011faSEmmanuel Vadot                   <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
127*0e8011faSEmmanuel Vadot                   <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
128*0e8011faSEmmanuel Vadot                   <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
129*0e8011faSEmmanuel Vadot                   <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
130*0e8011faSEmmanuel Vadot                   <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
131*0e8011faSEmmanuel Vadot                   <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
132*0e8011faSEmmanuel Vadot      clocks = <&rcc CK_BUS_HPDMA1>;
133*0e8011faSEmmanuel Vadot      #dma-cells = <3>;
134*0e8011faSEmmanuel Vadot    };
135*0e8011faSEmmanuel Vadot...
136