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