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