1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/dma/stericsson,dma40.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7b97ee269SEmmanuel Vadottitle: ST-Ericsson DMA40 DMA Engine 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Linus Walleij <linus.walleij@linaro.org> 11b97ee269SEmmanuel Vadot 12b97ee269SEmmanuel VadotallOf: 13cb7aa33aSEmmanuel Vadot - $ref: dma-controller.yaml# 14b97ee269SEmmanuel Vadot 15b97ee269SEmmanuel Vadotproperties: 16b97ee269SEmmanuel Vadot "#dma-cells": 17b97ee269SEmmanuel Vadot const: 3 18b97ee269SEmmanuel Vadot description: | 19b97ee269SEmmanuel Vadot The first cell is the unique device channel number as indicated by this 20b97ee269SEmmanuel Vadot table for DB8500 which is the only ASIC known to use DMA40: 21b97ee269SEmmanuel Vadot 22b97ee269SEmmanuel Vadot 0: SPI controller 0 23b97ee269SEmmanuel Vadot 1: SD/MMC controller 0 (unused) 24b97ee269SEmmanuel Vadot 2: SD/MMC controller 1 (unused) 25b97ee269SEmmanuel Vadot 3: SD/MMC controller 2 (unused) 26b97ee269SEmmanuel Vadot 4: I2C port 1 27b97ee269SEmmanuel Vadot 5: I2C port 3 28b97ee269SEmmanuel Vadot 6: I2C port 2 29b97ee269SEmmanuel Vadot 7: I2C port 4 30b97ee269SEmmanuel Vadot 8: Synchronous Serial Port SSP0 31b97ee269SEmmanuel Vadot 9: Synchronous Serial Port SSP1 32b97ee269SEmmanuel Vadot 10: Multi-Channel Display Engine MCDE RX 33b97ee269SEmmanuel Vadot 11: UART port 2 34b97ee269SEmmanuel Vadot 12: UART port 1 35b97ee269SEmmanuel Vadot 13: UART port 0 36b97ee269SEmmanuel Vadot 14: Multirate Serial Port MSP2 37b97ee269SEmmanuel Vadot 15: I2C port 0 38b97ee269SEmmanuel Vadot 16: USB OTG in/out endpoints 7 & 15 39b97ee269SEmmanuel Vadot 17: USB OTG in/out endpoints 6 & 14 40b97ee269SEmmanuel Vadot 18: USB OTG in/out endpoints 5 & 13 41b97ee269SEmmanuel Vadot 19: USB OTG in/out endpoints 4 & 12 42b97ee269SEmmanuel Vadot 20: SLIMbus or HSI channel 0 43b97ee269SEmmanuel Vadot 21: SLIMbus or HSI channel 1 44b97ee269SEmmanuel Vadot 22: SLIMbus or HSI channel 2 45b97ee269SEmmanuel Vadot 23: SLIMbus or HSI channel 3 46b97ee269SEmmanuel Vadot 24: Multimedia DSP SXA0 47b97ee269SEmmanuel Vadot 25: Multimedia DSP SXA1 48b97ee269SEmmanuel Vadot 26: Multimedia DSP SXA2 49b97ee269SEmmanuel Vadot 27: Multimedia DSP SXA3 50b97ee269SEmmanuel Vadot 28: SD/MMC controller 2 51b97ee269SEmmanuel Vadot 29: SD/MMC controller 0 52b97ee269SEmmanuel Vadot 30: MSP port 1 on DB8500 v1, MSP port 3 on DB8500 v2 53b97ee269SEmmanuel Vadot 31: MSP port 0 or SLIMbus channel 0 54b97ee269SEmmanuel Vadot 32: SD/MMC controller 1 55b97ee269SEmmanuel Vadot 33: SPI controller 2 56b97ee269SEmmanuel Vadot 34: i2c3 RX2 TX2 57b97ee269SEmmanuel Vadot 35: SPI controller 1 58b97ee269SEmmanuel Vadot 36: USB OTG in/out endpoints 3 & 11 59b97ee269SEmmanuel Vadot 37: USB OTG in/out endpoints 2 & 10 60b97ee269SEmmanuel Vadot 38: USB OTG in/out endpoints 1 & 9 61b97ee269SEmmanuel Vadot 39: USB OTG in/out endpoints 8 62b97ee269SEmmanuel Vadot 40: SPI controller 3 63b97ee269SEmmanuel Vadot 41: SD/MMC controller 3 64b97ee269SEmmanuel Vadot 42: SD/MMC controller 4 65b97ee269SEmmanuel Vadot 43: SD/MMC controller 5 66b97ee269SEmmanuel Vadot 44: Multimedia DSP SXA4 67b97ee269SEmmanuel Vadot 45: Multimedia DSP SXA5 68b97ee269SEmmanuel Vadot 46: SLIMbus channel 8 or Multimedia DSP SXA6 69b97ee269SEmmanuel Vadot 47: SLIMbus channel 9 or Multimedia DSP SXA7 70b97ee269SEmmanuel Vadot 48: Crypto Accelerator 1 71b97ee269SEmmanuel Vadot 49: Crypto Accelerator 1 TX or Hash Accelerator 1 TX 72b97ee269SEmmanuel Vadot 50: Hash Accelerator 1 TX 73b97ee269SEmmanuel Vadot 51: memcpy TX (to be used by the DMA driver for memcpy operations) 74b97ee269SEmmanuel Vadot 52: SLIMbus or HSI channel 4 75b97ee269SEmmanuel Vadot 53: SLIMbus or HSI channel 5 76b97ee269SEmmanuel Vadot 54: SLIMbus or HSI channel 6 77b97ee269SEmmanuel Vadot 55: SLIMbus or HSI channel 7 78b97ee269SEmmanuel Vadot 56: memcpy (to be used by the DMA driver for memcpy operations) 79b97ee269SEmmanuel Vadot 57: memcpy (to be used by the DMA driver for memcpy operations) 80b97ee269SEmmanuel Vadot 58: memcpy (to be used by the DMA driver for memcpy operations) 81b97ee269SEmmanuel Vadot 59: memcpy (to be used by the DMA driver for memcpy operations) 82b97ee269SEmmanuel Vadot 60: memcpy (to be used by the DMA driver for memcpy operations) 83b97ee269SEmmanuel Vadot 61: Crypto Accelerator 0 84b97ee269SEmmanuel Vadot 62: Crypto Accelerator 0 TX or Hash Accelerator 0 TX 85b97ee269SEmmanuel Vadot 63: Hash Accelerator 0 TX 86b97ee269SEmmanuel Vadot 87b97ee269SEmmanuel Vadot The second cell is the DMA request line number. This is only used when 88b97ee269SEmmanuel Vadot a fixed channel is allocated, and indicated by setting bit 3 in the 89b97ee269SEmmanuel Vadot flags field (see below). 90b97ee269SEmmanuel Vadot 91b97ee269SEmmanuel Vadot The third cell is a 32bit flags bitfield with the following possible 92b97ee269SEmmanuel Vadot bits set: 93b97ee269SEmmanuel Vadot 0x00000001 (bit 0) - mode: 94b97ee269SEmmanuel Vadot Logical channel when unset 95b97ee269SEmmanuel Vadot Physical channel when set 96b97ee269SEmmanuel Vadot 0x00000002 (bit 1) - direction: 97b97ee269SEmmanuel Vadot Memory to Device when unset 98b97ee269SEmmanuel Vadot Device to Memory when set 99b97ee269SEmmanuel Vadot 0x00000004 (bit 2) - endianness: 100b97ee269SEmmanuel Vadot Little endian when unset 101b97ee269SEmmanuel Vadot Big endian when set 102b97ee269SEmmanuel Vadot 0x00000008 (bit 3) - use fixed channel: 103b97ee269SEmmanuel Vadot Use automatic channel selection when unset 104b97ee269SEmmanuel Vadot Use DMA request line number when set 105b97ee269SEmmanuel Vadot 0x00000010 (bit 4) - set channel as high priority: 106b97ee269SEmmanuel Vadot Normal priority when unset 107b97ee269SEmmanuel Vadot High priority when set 108b97ee269SEmmanuel Vadot 109b97ee269SEmmanuel Vadot compatible: 110b97ee269SEmmanuel Vadot items: 111b97ee269SEmmanuel Vadot - const: stericsson,db8500-dma40 112b97ee269SEmmanuel Vadot - const: stericsson,dma40 113b97ee269SEmmanuel Vadot 114b97ee269SEmmanuel Vadot reg: 115f126890aSEmmanuel Vadot oneOf: 116f126890aSEmmanuel Vadot - items: 117b97ee269SEmmanuel Vadot - description: DMA40 memory base 118f126890aSEmmanuel Vadot - items: 119f126890aSEmmanuel Vadot - description: DMA40 memory base 120f126890aSEmmanuel Vadot - description: LCPA memory base, deprecated, use eSRAM pool instead 121f126890aSEmmanuel Vadot deprecated: true 122f126890aSEmmanuel Vadot 123b97ee269SEmmanuel Vadot 124b97ee269SEmmanuel Vadot reg-names: 125f126890aSEmmanuel Vadot oneOf: 126f126890aSEmmanuel Vadot - items: 127f126890aSEmmanuel Vadot - const: base 128f126890aSEmmanuel Vadot - items: 129b97ee269SEmmanuel Vadot - const: base 130b97ee269SEmmanuel Vadot - const: lcpa 131f126890aSEmmanuel Vadot deprecated: true 132b97ee269SEmmanuel Vadot 133b97ee269SEmmanuel Vadot interrupts: 134b97ee269SEmmanuel Vadot maxItems: 1 135b97ee269SEmmanuel Vadot 136b97ee269SEmmanuel Vadot clocks: 137b97ee269SEmmanuel Vadot maxItems: 1 138b97ee269SEmmanuel Vadot 139f126890aSEmmanuel Vadot sram: 140f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 141f126890aSEmmanuel Vadot description: A phandle array with inner size 1 (no arg cells). 142f126890aSEmmanuel Vadot First phandle is the LCPA (Logical Channel Parameter Address) memory. 143f126890aSEmmanuel Vadot Second phandle is the LCLA (Logical Channel Link base Address) memory. 144f126890aSEmmanuel Vadot maxItems: 2 145f126890aSEmmanuel Vadot items: 146f126890aSEmmanuel Vadot maxItems: 1 147f126890aSEmmanuel Vadot 148b97ee269SEmmanuel Vadot memcpy-channels: 149b97ee269SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 150b97ee269SEmmanuel Vadot description: Array of u32 elements indicating which channels on the DMA 151*aa1a8ff2SEmmanuel Vadot engine are eligible for memcpy transfers 152b97ee269SEmmanuel Vadot 153b97ee269SEmmanuel Vadotrequired: 154b97ee269SEmmanuel Vadot - "#dma-cells" 155b97ee269SEmmanuel Vadot - compatible 156b97ee269SEmmanuel Vadot - reg 157b97ee269SEmmanuel Vadot - interrupts 158b97ee269SEmmanuel Vadot - clocks 159f126890aSEmmanuel Vadot - sram 160b97ee269SEmmanuel Vadot - memcpy-channels 161b97ee269SEmmanuel Vadot 162b97ee269SEmmanuel VadotadditionalProperties: false 163b97ee269SEmmanuel Vadot 164b97ee269SEmmanuel Vadotexamples: 165b97ee269SEmmanuel Vadot - | 166b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 167b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 168b97ee269SEmmanuel Vadot #include <dt-bindings/mfd/dbx500-prcmu.h> 169cb7aa33aSEmmanuel Vadot dma-controller@801c0000 { 170b97ee269SEmmanuel Vadot compatible = "stericsson,db8500-dma40", "stericsson,dma40"; 171f126890aSEmmanuel Vadot reg = <0x801c0000 0x1000>; 172f126890aSEmmanuel Vadot reg-names = "base"; 173f126890aSEmmanuel Vadot sram = <&lcpa>, <&lcla>; 174b97ee269SEmmanuel Vadot interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 175b97ee269SEmmanuel Vadot #dma-cells = <3>; 176b97ee269SEmmanuel Vadot memcpy-channels = <56 57 58 59 60>; 177b97ee269SEmmanuel Vadot clocks = <&prcmu_clk PRCMU_DMACLK>; 178b97ee269SEmmanuel Vadot }; 179b97ee269SEmmanuel Vadot... 180