xref: /linux/Documentation/devicetree/bindings/dma/stm32/st,stm32-mdma.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*8494ae75SAmelie Delaunay# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8494ae75SAmelie Delaunay%YAML 1.2
3*8494ae75SAmelie Delaunay---
4*8494ae75SAmelie Delaunay$id: http://devicetree.org/schemas/dma/stm32/st,stm32-mdma.yaml#
5*8494ae75SAmelie Delaunay$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8494ae75SAmelie Delaunay
7*8494ae75SAmelie Delaunaytitle: STMicroelectronics STM32 MDMA Controller
8*8494ae75SAmelie Delaunay
9*8494ae75SAmelie Delaunaydescription: |
10*8494ae75SAmelie Delaunay  The STM32 MDMA is a general-purpose direct memory access controller capable of
11*8494ae75SAmelie Delaunay  supporting 64 independent DMA channels with 256 HW requests.
12*8494ae75SAmelie Delaunay  DMA clients connected to the STM32 MDMA controller must use the format
13*8494ae75SAmelie Delaunay  described in the dma.txt file, using a five-cell specifier for each channel:
14*8494ae75SAmelie Delaunay  a phandle to the MDMA controller plus the following five integer cells:
15*8494ae75SAmelie Delaunay    1. The request line number
16*8494ae75SAmelie Delaunay    2. The priority level
17*8494ae75SAmelie Delaunay      0x0: Low
18*8494ae75SAmelie Delaunay      0x1: Medium
19*8494ae75SAmelie Delaunay      0x2: High
20*8494ae75SAmelie Delaunay      0x3: Very high
21*8494ae75SAmelie Delaunay    3. A 32bit mask specifying the DMA channel configuration
22*8494ae75SAmelie Delaunay      -bit 0-1: Source increment mode
23*8494ae75SAmelie Delaunay        0x0: Source address pointer is fixed
24*8494ae75SAmelie Delaunay        0x2: Source address pointer is incremented after each data transfer
25*8494ae75SAmelie Delaunay        0x3: Source address pointer is decremented after each data transfer
26*8494ae75SAmelie Delaunay      -bit 2-3: Destination increment mode
27*8494ae75SAmelie Delaunay        0x0: Destination address pointer is fixed
28*8494ae75SAmelie Delaunay        0x2: Destination address pointer is incremented after each data transfer
29*8494ae75SAmelie Delaunay        0x3: Destination address pointer is decremented after each data transfer
30*8494ae75SAmelie Delaunay      -bit 8-9: Source increment offset size
31*8494ae75SAmelie Delaunay        0x0: byte (8bit)
32*8494ae75SAmelie Delaunay        0x1: half-word (16bit)
33*8494ae75SAmelie Delaunay        0x2: word (32bit)
34*8494ae75SAmelie Delaunay        0x3: double-word (64bit)
35*8494ae75SAmelie Delaunay      -bit 10-11: Destination increment offset size
36*8494ae75SAmelie Delaunay        0x0: byte (8bit)
37*8494ae75SAmelie Delaunay        0x1: half-word (16bit)
38*8494ae75SAmelie Delaunay        0x2: word (32bit)
39*8494ae75SAmelie Delaunay        0x3: double-word (64bit)
40*8494ae75SAmelie Delaunay      -bit 25-18: The number of bytes to be transferred in a single transfer
41*8494ae75SAmelie Delaunay                  (min = 1 byte, max = 128 bytes)
42*8494ae75SAmelie Delaunay      -bit 29:28: Trigger Mode
43*8494ae75SAmelie Delaunay        0x00: Each MDMA request triggers a buffer transfer (max 128 bytes)
44*8494ae75SAmelie Delaunay        0x1: Each MDMA request triggers a block transfer (max 64K bytes)
45*8494ae75SAmelie Delaunay        0x2: Each MDMA request triggers a repeated block transfer
46*8494ae75SAmelie Delaunay        0x3: Each MDMA request triggers a linked list transfer
47*8494ae75SAmelie Delaunay    4. A 32bit value specifying the register to be used to acknowledge the request
48*8494ae75SAmelie Delaunay       if no HW ack signal is used by the MDMA client
49*8494ae75SAmelie Delaunay    5. A 32bit mask specifying the value to be written to acknowledge the request
50*8494ae75SAmelie Delaunay       if no HW ack signal is used by the MDMA client
51*8494ae75SAmelie Delaunay
52*8494ae75SAmelie Delaunaymaintainers:
53*8494ae75SAmelie Delaunay  - Amelie Delaunay <amelie.delaunay@foss.st.com>
54*8494ae75SAmelie Delaunay
55*8494ae75SAmelie DelaunayallOf:
56*8494ae75SAmelie Delaunay  - $ref: /schemas/dma/dma-controller.yaml#
57*8494ae75SAmelie Delaunay
58*8494ae75SAmelie Delaunayproperties:
59*8494ae75SAmelie Delaunay  "#dma-cells":
60*8494ae75SAmelie Delaunay    const: 5
61*8494ae75SAmelie Delaunay
62*8494ae75SAmelie Delaunay  compatible:
63*8494ae75SAmelie Delaunay    const: st,stm32h7-mdma
64*8494ae75SAmelie Delaunay
65*8494ae75SAmelie Delaunay  reg:
66*8494ae75SAmelie Delaunay    maxItems: 1
67*8494ae75SAmelie Delaunay
68*8494ae75SAmelie Delaunay  clocks:
69*8494ae75SAmelie Delaunay    maxItems: 1
70*8494ae75SAmelie Delaunay
71*8494ae75SAmelie Delaunay  interrupts:
72*8494ae75SAmelie Delaunay    maxItems: 1
73*8494ae75SAmelie Delaunay
74*8494ae75SAmelie Delaunay  resets:
75*8494ae75SAmelie Delaunay    maxItems: 1
76*8494ae75SAmelie Delaunay
77*8494ae75SAmelie Delaunay  st,ahb-addr-masks:
78*8494ae75SAmelie Delaunay    $ref: /schemas/types.yaml#/definitions/uint32-array
79*8494ae75SAmelie Delaunay    description: Array of u32 mask to list memory devices addressed via AHB bus.
80*8494ae75SAmelie Delaunay
81*8494ae75SAmelie Delaunayrequired:
82*8494ae75SAmelie Delaunay  - compatible
83*8494ae75SAmelie Delaunay  - reg
84*8494ae75SAmelie Delaunay  - clocks
85*8494ae75SAmelie Delaunay  - interrupts
86*8494ae75SAmelie Delaunay
87*8494ae75SAmelie DelaunayunevaluatedProperties: false
88*8494ae75SAmelie Delaunay
89*8494ae75SAmelie Delaunayexamples:
90*8494ae75SAmelie Delaunay  - |
91*8494ae75SAmelie Delaunay    #include <dt-bindings/interrupt-controller/arm-gic.h>
92*8494ae75SAmelie Delaunay    #include <dt-bindings/clock/stm32mp1-clks.h>
93*8494ae75SAmelie Delaunay    #include <dt-bindings/reset/stm32mp1-resets.h>
94*8494ae75SAmelie Delaunay    dma-controller@52000000 {
95*8494ae75SAmelie Delaunay      compatible = "st,stm32h7-mdma";
96*8494ae75SAmelie Delaunay      reg = <0x52000000 0x1000>;
97*8494ae75SAmelie Delaunay      interrupts = <122>;
98*8494ae75SAmelie Delaunay      clocks = <&timer_clk>;
99*8494ae75SAmelie Delaunay      resets = <&rcc 992>;
100*8494ae75SAmelie Delaunay      #dma-cells = <5>;
101*8494ae75SAmelie Delaunay      dma-channels = <16>;
102*8494ae75SAmelie Delaunay      dma-requests = <32>;
103*8494ae75SAmelie Delaunay      st,ahb-addr-masks = <0x20000000>, <0x00000000>;
104*8494ae75SAmelie Delaunay    };
105*8494ae75SAmelie Delaunay
106*8494ae75SAmelie Delaunay...
107