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-dma.yaml# 5*8494ae75SAmelie Delaunay$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8494ae75SAmelie Delaunay 7*8494ae75SAmelie Delaunaytitle: STMicroelectronics STM32 DMA Controller 8*8494ae75SAmelie Delaunay 9*8494ae75SAmelie Delaunaydescription: | 10*8494ae75SAmelie Delaunay The STM32 DMA is a general-purpose direct memory access controller capable of 11*8494ae75SAmelie Delaunay supporting 8 independent DMA channels. Each channel can have up to 8 requests. 12*8494ae75SAmelie Delaunay DMA clients connected to the STM32 DMA controller must use the format 13*8494ae75SAmelie Delaunay described in the dma.txt file, using a four-cell specifier for each 14*8494ae75SAmelie Delaunay channel: a phandle to the DMA controller plus the following four integer cells: 15*8494ae75SAmelie Delaunay 1. The channel id 16*8494ae75SAmelie Delaunay 2. The request line number 17*8494ae75SAmelie Delaunay 3. A 32bit mask specifying the DMA channel configuration which are device 18*8494ae75SAmelie Delaunay dependent: 19*8494ae75SAmelie Delaunay -bit 9: Peripheral Increment Address 20*8494ae75SAmelie Delaunay 0x0: no address increment between transfers 21*8494ae75SAmelie Delaunay 0x1: increment address between transfers 22*8494ae75SAmelie Delaunay -bit 10: Memory Increment Address 23*8494ae75SAmelie Delaunay 0x0: no address increment between transfers 24*8494ae75SAmelie Delaunay 0x1: increment address between transfers 25*8494ae75SAmelie Delaunay -bit 15: Peripheral Increment Offset Size 26*8494ae75SAmelie Delaunay 0x0: offset size is linked to the peripheral bus width 27*8494ae75SAmelie Delaunay 0x1: offset size is fixed to 4 (32-bit alignment) 28*8494ae75SAmelie Delaunay -bit 16-17: Priority level 29*8494ae75SAmelie Delaunay 0x0: low 30*8494ae75SAmelie Delaunay 0x1: medium 31*8494ae75SAmelie Delaunay 0x2: high 32*8494ae75SAmelie Delaunay 0x3: very high 33*8494ae75SAmelie Delaunay 4. A 32bit bitfield value specifying DMA features which are device dependent: 34*8494ae75SAmelie Delaunay -bit 0-1: DMA FIFO threshold selection 35*8494ae75SAmelie Delaunay 0x0: 1/4 full FIFO 36*8494ae75SAmelie Delaunay 0x1: 1/2 full FIFO 37*8494ae75SAmelie Delaunay 0x2: 3/4 full FIFO 38*8494ae75SAmelie Delaunay 0x3: full FIFO 39*8494ae75SAmelie Delaunay -bit 2: DMA direct mode 40*8494ae75SAmelie Delaunay 0x0: FIFO mode with threshold selectable with bit 0-1 41*8494ae75SAmelie Delaunay 0x1: Direct mode: each DMA request immediately initiates a transfer 42*8494ae75SAmelie Delaunay from/to the memory, FIFO is bypassed. 43*8494ae75SAmelie Delaunay -bit 4: alternative DMA request/acknowledge protocol 44*8494ae75SAmelie Delaunay 0x0: Use standard DMA ACK management, where ACK signal is maintained 45*8494ae75SAmelie Delaunay up to the removal of request and transfer completion 46*8494ae75SAmelie Delaunay 0x1: Use alternative DMA ACK management, where ACK de-assertion does 47*8494ae75SAmelie Delaunay not wait for the de-assertion of the REQuest, ACK is only managed 48*8494ae75SAmelie Delaunay by transfer completion. This must only be used on channels 49*8494ae75SAmelie Delaunay managing transfers for STM32 USART/UART. 50*8494ae75SAmelie Delaunay 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: 4 61*8494ae75SAmelie Delaunay 62*8494ae75SAmelie Delaunay compatible: 63*8494ae75SAmelie Delaunay const: st,stm32-dma 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: 8 73*8494ae75SAmelie Delaunay description: Should contain all of the per-channel DMA 74*8494ae75SAmelie Delaunay interrupts in ascending order with respect to the 75*8494ae75SAmelie Delaunay DMA channel index. 76*8494ae75SAmelie Delaunay 77*8494ae75SAmelie Delaunay resets: 78*8494ae75SAmelie Delaunay maxItems: 1 79*8494ae75SAmelie Delaunay 80*8494ae75SAmelie Delaunay st,mem2mem: 81*8494ae75SAmelie Delaunay $ref: /schemas/types.yaml#/definitions/flag 82*8494ae75SAmelie Delaunay description: if defined, it indicates that the controller 83*8494ae75SAmelie Delaunay supports memory-to-memory transfer 84*8494ae75SAmelie Delaunay 85*8494ae75SAmelie Delaunay access-controllers: 86*8494ae75SAmelie Delaunay minItems: 1 87*8494ae75SAmelie Delaunay maxItems: 2 88*8494ae75SAmelie Delaunay 89*8494ae75SAmelie Delaunayrequired: 90*8494ae75SAmelie Delaunay - compatible 91*8494ae75SAmelie Delaunay - reg 92*8494ae75SAmelie Delaunay - clocks 93*8494ae75SAmelie Delaunay - interrupts 94*8494ae75SAmelie Delaunay 95*8494ae75SAmelie DelaunayunevaluatedProperties: false 96*8494ae75SAmelie Delaunay 97*8494ae75SAmelie Delaunayexamples: 98*8494ae75SAmelie Delaunay - | 99*8494ae75SAmelie Delaunay #include <dt-bindings/interrupt-controller/arm-gic.h> 100*8494ae75SAmelie Delaunay #include <dt-bindings/clock/stm32mp1-clks.h> 101*8494ae75SAmelie Delaunay #include <dt-bindings/reset/stm32mp1-resets.h> 102*8494ae75SAmelie Delaunay dma-controller@40026400 { 103*8494ae75SAmelie Delaunay compatible = "st,stm32-dma"; 104*8494ae75SAmelie Delaunay reg = <0x40026400 0x400>; 105*8494ae75SAmelie Delaunay interrupts = <56>, 106*8494ae75SAmelie Delaunay <57>, 107*8494ae75SAmelie Delaunay <58>, 108*8494ae75SAmelie Delaunay <59>, 109*8494ae75SAmelie Delaunay <60>, 110*8494ae75SAmelie Delaunay <68>, 111*8494ae75SAmelie Delaunay <69>, 112*8494ae75SAmelie Delaunay <70>; 113*8494ae75SAmelie Delaunay clocks = <&clk_hclk>; 114*8494ae75SAmelie Delaunay #dma-cells = <4>; 115*8494ae75SAmelie Delaunay st,mem2mem; 116*8494ae75SAmelie Delaunay resets = <&rcc 150>; 117*8494ae75SAmelie Delaunay dma-requests = <8>; 118*8494ae75SAmelie Delaunay }; 119*8494ae75SAmelie Delaunay 120*8494ae75SAmelie Delaunay... 121