1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/dma/st,stm32-dma.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: STMicroelectronics STM32 DMA Controller bindings 8*4882a593Smuzhiyun 9*4882a593Smuzhiyundescription: | 10*4882a593Smuzhiyun The STM32 DMA is a general-purpose direct memory access controller capable of 11*4882a593Smuzhiyun supporting 8 independent DMA channels. Each channel can have up to 8 requests. 12*4882a593Smuzhiyun DMA clients connected to the STM32 DMA controller must use the format 13*4882a593Smuzhiyun described in the dma.txt file, using a four-cell specifier for each 14*4882a593Smuzhiyun channel: a phandle to the DMA controller plus the following four integer cells: 15*4882a593Smuzhiyun 1. The channel id 16*4882a593Smuzhiyun 2. The request line number 17*4882a593Smuzhiyun 3. A 32bit mask specifying the DMA channel configuration which are device 18*4882a593Smuzhiyun dependent: 19*4882a593Smuzhiyun -bit 9: Peripheral Increment Address 20*4882a593Smuzhiyun 0x0: no address increment between transfers 21*4882a593Smuzhiyun 0x1: increment address between transfers 22*4882a593Smuzhiyun -bit 10: Memory Increment Address 23*4882a593Smuzhiyun 0x0: no address increment between transfers 24*4882a593Smuzhiyun 0x1: increment address between transfers 25*4882a593Smuzhiyun -bit 15: Peripheral Increment Offset Size 26*4882a593Smuzhiyun 0x0: offset size is linked to the peripheral bus width 27*4882a593Smuzhiyun 0x1: offset size is fixed to 4 (32-bit alignment) 28*4882a593Smuzhiyun -bit 16-17: Priority level 29*4882a593Smuzhiyun 0x0: low 30*4882a593Smuzhiyun 0x1: medium 31*4882a593Smuzhiyun 0x2: high 32*4882a593Smuzhiyun 0x3: very high 33*4882a593Smuzhiyun 4. A 32bit bitfield value specifying DMA features which are device dependent: 34*4882a593Smuzhiyun -bit 0-1: DMA FIFO threshold selection 35*4882a593Smuzhiyun 0x0: 1/4 full FIFO 36*4882a593Smuzhiyun 0x1: 1/2 full FIFO 37*4882a593Smuzhiyun 0x2: 3/4 full FIFO 38*4882a593Smuzhiyun 0x3: full FIFO 39*4882a593Smuzhiyun -bit 2: DMA direct mode 40*4882a593Smuzhiyun 0x0: FIFO mode with threshold selectable with bit 0-1 41*4882a593Smuzhiyun 0x1: Direct mode: each DMA request immediately initiates a transfer 42*4882a593Smuzhiyun from/to the memory, FIFO is bypassed. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun 45*4882a593Smuzhiyunmaintainers: 46*4882a593Smuzhiyun - Amelie Delaunay <amelie.delaunay@st.com> 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunallOf: 49*4882a593Smuzhiyun - $ref: "dma-controller.yaml#" 50*4882a593Smuzhiyun 51*4882a593Smuzhiyunproperties: 52*4882a593Smuzhiyun "#dma-cells": 53*4882a593Smuzhiyun const: 4 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun compatible: 56*4882a593Smuzhiyun const: st,stm32-dma 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun reg: 59*4882a593Smuzhiyun maxItems: 1 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun clocks: 62*4882a593Smuzhiyun maxItems: 1 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun interrupts: 65*4882a593Smuzhiyun maxItems: 8 66*4882a593Smuzhiyun description: Should contain all of the per-channel DMA 67*4882a593Smuzhiyun interrupts in ascending order with respect to the 68*4882a593Smuzhiyun DMA channel index. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun resets: 71*4882a593Smuzhiyun maxItems: 1 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun st,mem2mem: 74*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 75*4882a593Smuzhiyun description: if defined, it indicates that the controller 76*4882a593Smuzhiyun supports memory-to-memory transfer 77*4882a593Smuzhiyun 78*4882a593Smuzhiyunrequired: 79*4882a593Smuzhiyun - compatible 80*4882a593Smuzhiyun - reg 81*4882a593Smuzhiyun - clocks 82*4882a593Smuzhiyun - interrupts 83*4882a593Smuzhiyun 84*4882a593SmuzhiyununevaluatedProperties: false 85*4882a593Smuzhiyun 86*4882a593Smuzhiyunexamples: 87*4882a593Smuzhiyun - | 88*4882a593Smuzhiyun #include <dt-bindings/interrupt-controller/arm-gic.h> 89*4882a593Smuzhiyun #include <dt-bindings/clock/stm32mp1-clks.h> 90*4882a593Smuzhiyun #include <dt-bindings/reset/stm32mp1-resets.h> 91*4882a593Smuzhiyun dma-controller@40026400 { 92*4882a593Smuzhiyun compatible = "st,stm32-dma"; 93*4882a593Smuzhiyun reg = <0x40026400 0x400>; 94*4882a593Smuzhiyun interrupts = <56>, 95*4882a593Smuzhiyun <57>, 96*4882a593Smuzhiyun <58>, 97*4882a593Smuzhiyun <59>, 98*4882a593Smuzhiyun <60>, 99*4882a593Smuzhiyun <68>, 100*4882a593Smuzhiyun <69>, 101*4882a593Smuzhiyun <70>; 102*4882a593Smuzhiyun clocks = <&clk_hclk>; 103*4882a593Smuzhiyun #dma-cells = <4>; 104*4882a593Smuzhiyun st,mem2mem; 105*4882a593Smuzhiyun resets = <&rcc 150>; 106*4882a593Smuzhiyun dma-requests = <8>; 107*4882a593Smuzhiyun }; 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun... 110