# STMicroelectronics STM32 DMA3 Controller

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Dma bindings / stm32_

> Device-tree binding reference for STMicroelectronics STM32 DMA3 Controller.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;dma&#47;stm32&#47;st&#44;stm32&#45;dma3&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The STM32 DMA3 is a direct memory access controller with different features
depending on its hardware configuration.
It is either called LPDMA (Low Power), GPDMA (General Purpose) or HPDMA (High
Performance).
Its hardware configuration registers allow to dynamically expose its features.</p>
<p style="white-space: pre-wrap">GPDMA and HPDMA support 16 independent DMA channels, while only 4 for LPDMA.
GPDMA and HPDMA support 256 DMA requests from peripherals, 8 for LPDMA.</p>
<p style="white-space: pre-wrap">Bindings are generic for these 3 STM32 DMA3 configurations.</p>
<p style="white-space: pre-wrap">DMA clients connected to the STM32 DMA3 controller must use the format
described in "#dma-cells" property description below, using a three-cell
specifier for each channel.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Amelie Delaunay &#60;amelie&#46;delaunay&#64;foss&#46;st&#46;com&#62;&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>&#47;schemas&#47;dma&#47;dma&#45;controller&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-dma/dma-controller.md#dt-root>)</span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;st&#44;stm32mp25&#45;dma3&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-c2de09e7f7fd211b679d"></a>

### <code>interrupts</code> — required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-1691b9edf145244244a0"><code>4</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b7823fb65b2f27642d26"><code>16</code></span>

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">Should contain all of the per-channel DMA interrupts in ascending order with respect to the DMA channel index.</p>
</div>

<a id="dt-4e9a371963ac013ad39d"></a>

### <code>clocks</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>1</code></span>

<a id="dt-df397b2b98a8cf834e89"></a>

### <code>resets</code> — not listed as required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-86a6993fcd90367ac91d"><code>1</code></span>

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — not listed as required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-74e4e6f1d3f2a860fdb9"><code>1</code></span>

<a id="dt-a987fd9c3db53ecacc54"></a>

### <code>&#35;dma&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-3249ee54365c87081259"><code>3</code></span>

<div id="dt-5c46628e19decc12e0c0">
<pre><code>Specifies the number of cells needed to provide DMA controller specific
information.
The first cell is the request line number.
The second cell is a 32-bit mask specifying the DMA channel requirements:
  -bit 0-1: The priority level
    0x0: low priority, low weight
    0x1: low priority, mid weight
    0x2: low priority, high weight
    0x3: high priority
  -bit 4-7: The FIFO requirement for queuing source/destination transfers
    0x0: no FIFO requirement/any channel can fit
    0x2: FIFO of 8 bytes (2^2+1)
    0x4: FIFO of 32 bytes (2^4+1)
    0x6: FIFO of 128 bytes (2^6+1)
    0x7: FIFO of 256 bytes (2^7+1)
The third cell is a 32-bit mask specifying the DMA transfer requirements:
  -bit 0: The source incrementing burst
    0x0: fixed burst
    0x1: contiguously incremented burst
  -bit 1: The source allocated port
    0x0: port 0 is allocated to the source transfer
    0x1: port 1 is allocated to the source transfer
  -bit 4: The destination incrementing burst
    0x0: fixed burst
    0x1: contiguously incremented burst
  -bit 5: The destination allocated port
    0x0: port 0 is allocated to the destination transfer
    0x1: port 1 is allocated to the destination transfer
  -bit 8: The type of hardware request
    0x0: burst
    0x1: block
  -bit 9: The control mode
    0x0: DMA controller control mode
    0x1: peripheral control mode
  -bit 12-13: The transfer complete event mode
    0x0: at block level, transfer complete event is generated at the end
         of a block
    0x2: at LLI level, the transfer complete event is generated at the end
         of the LLI transfer
         including the update of the LLI if any
    0x3: at channel level, the transfer complete event is generated at the
         end of the last LLI
  -bit 16: Prevent packing/unpacking mode
    0x0: pack/unpack enabled when source data width/burst != destination data width/burst
    0x1: memory data width/burst forced to peripheral data width/burst to prevent pack/unpack
  -bit 17: Prevent additional transfers due to linked-list refactoring
    0x0: don't prevent additional transfers for optimal performance
    0x1: prevent additional transfer to accommodate user constraints such as single transfer</code></pre>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clocks&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;dma&#45;cells&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/clock/st,stm32mp25-rcc.h&gt;
dma-controller@40400000 {
  compatible = "st,stm32mp25-dma3";
  reg = &lt;0x40400000 0x1000&gt;;
  interrupts = &lt;GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH&gt;,
               &lt;GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH&gt;;
  clocks = &lt;&amp;rcc CK_BUS_HPDMA1&gt;;
  #dma-cells = &lt;3&gt;;
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
