xref: /linux/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml (revision 837b2fafd4cf3e336ab1127c3738c35eba866123)
123fbc87cSLinus Walleij# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
223fbc87cSLinus Walleij%YAML 1.2
323fbc87cSLinus Walleij---
423fbc87cSLinus Walleij$id: http://devicetree.org/schemas/dma/stericsson,dma40.yaml#
523fbc87cSLinus Walleij$schema: http://devicetree.org/meta-schemas/core.yaml#
623fbc87cSLinus Walleij
723fbc87cSLinus Walleijtitle: ST-Ericsson DMA40 DMA Engine
823fbc87cSLinus Walleij
923fbc87cSLinus Walleijmaintainers:
1023fbc87cSLinus Walleij  - Linus Walleij <linus.walleij@linaro.org>
1123fbc87cSLinus Walleij
1223fbc87cSLinus WalleijallOf:
1310cafa2dSKrzysztof Kozlowski  - $ref: dma-controller.yaml#
1423fbc87cSLinus Walleij
1523fbc87cSLinus Walleijproperties:
1623fbc87cSLinus Walleij  "#dma-cells":
1723fbc87cSLinus Walleij    const: 3
1823fbc87cSLinus Walleij    description: |
1923fbc87cSLinus Walleij      The first cell is the unique device channel number as indicated by this
2023fbc87cSLinus Walleij      table for DB8500 which is the only ASIC known to use DMA40:
2123fbc87cSLinus Walleij
2223fbc87cSLinus Walleij      0:  SPI controller 0
2323fbc87cSLinus Walleij      1:  SD/MMC controller 0 (unused)
2423fbc87cSLinus Walleij      2:  SD/MMC controller 1 (unused)
2523fbc87cSLinus Walleij      3:  SD/MMC controller 2 (unused)
2623fbc87cSLinus Walleij      4:  I2C port 1
2723fbc87cSLinus Walleij      5:  I2C port 3
2823fbc87cSLinus Walleij      6:  I2C port 2
2923fbc87cSLinus Walleij      7:  I2C port 4
3023fbc87cSLinus Walleij      8:  Synchronous Serial Port SSP0
3123fbc87cSLinus Walleij      9:  Synchronous Serial Port SSP1
3223fbc87cSLinus Walleij      10: Multi-Channel Display Engine MCDE RX
3323fbc87cSLinus Walleij      11: UART port 2
3423fbc87cSLinus Walleij      12: UART port 1
3523fbc87cSLinus Walleij      13: UART port 0
3623fbc87cSLinus Walleij      14: Multirate Serial Port MSP2
3723fbc87cSLinus Walleij      15: I2C port 0
3823fbc87cSLinus Walleij      16: USB OTG in/out endpoints 7 & 15
3923fbc87cSLinus Walleij      17: USB OTG in/out endpoints 6 & 14
4023fbc87cSLinus Walleij      18: USB OTG in/out endpoints 5 & 13
4123fbc87cSLinus Walleij      19: USB OTG in/out endpoints 4 & 12
4223fbc87cSLinus Walleij      20: SLIMbus or HSI channel 0
4323fbc87cSLinus Walleij      21: SLIMbus or HSI channel 1
4423fbc87cSLinus Walleij      22: SLIMbus or HSI channel 2
4523fbc87cSLinus Walleij      23: SLIMbus or HSI channel 3
4623fbc87cSLinus Walleij      24: Multimedia DSP SXA0
4723fbc87cSLinus Walleij      25: Multimedia DSP SXA1
4823fbc87cSLinus Walleij      26: Multimedia DSP SXA2
4923fbc87cSLinus Walleij      27: Multimedia DSP SXA3
5023fbc87cSLinus Walleij      28: SD/MMC controller 2
5123fbc87cSLinus Walleij      29: SD/MMC controller 0
5223fbc87cSLinus Walleij      30: MSP port 1 on DB8500 v1, MSP port 3 on DB8500 v2
5323fbc87cSLinus Walleij      31: MSP port 0 or SLIMbus channel 0
5423fbc87cSLinus Walleij      32: SD/MMC controller 1
5523fbc87cSLinus Walleij      33: SPI controller 2
5623fbc87cSLinus Walleij      34: i2c3 RX2 TX2
5723fbc87cSLinus Walleij      35: SPI controller 1
5823fbc87cSLinus Walleij      36: USB OTG in/out endpoints 3 & 11
5923fbc87cSLinus Walleij      37: USB OTG in/out endpoints 2 & 10
6023fbc87cSLinus Walleij      38: USB OTG in/out endpoints 1 & 9
6123fbc87cSLinus Walleij      39: USB OTG in/out endpoints 8
6223fbc87cSLinus Walleij      40: SPI controller 3
6323fbc87cSLinus Walleij      41: SD/MMC controller 3
6423fbc87cSLinus Walleij      42: SD/MMC controller 4
6523fbc87cSLinus Walleij      43: SD/MMC controller 5
6623fbc87cSLinus Walleij      44: Multimedia DSP SXA4
6723fbc87cSLinus Walleij      45: Multimedia DSP SXA5
6823fbc87cSLinus Walleij      46: SLIMbus channel 8 or Multimedia DSP SXA6
6923fbc87cSLinus Walleij      47: SLIMbus channel 9 or Multimedia DSP SXA7
7023fbc87cSLinus Walleij      48: Crypto Accelerator 1
7123fbc87cSLinus Walleij      49: Crypto Accelerator 1 TX or Hash Accelerator 1 TX
7223fbc87cSLinus Walleij      50: Hash Accelerator 1 TX
7323fbc87cSLinus Walleij      51: memcpy TX (to be used by the DMA driver for memcpy operations)
7423fbc87cSLinus Walleij      52: SLIMbus or HSI channel 4
7523fbc87cSLinus Walleij      53: SLIMbus or HSI channel 5
7623fbc87cSLinus Walleij      54: SLIMbus or HSI channel 6
7723fbc87cSLinus Walleij      55: SLIMbus or HSI channel 7
7823fbc87cSLinus Walleij      56: memcpy (to be used by the DMA driver for memcpy operations)
7923fbc87cSLinus Walleij      57: memcpy (to be used by the DMA driver for memcpy operations)
8023fbc87cSLinus Walleij      58: memcpy (to be used by the DMA driver for memcpy operations)
8123fbc87cSLinus Walleij      59: memcpy (to be used by the DMA driver for memcpy operations)
8223fbc87cSLinus Walleij      60: memcpy (to be used by the DMA driver for memcpy operations)
8323fbc87cSLinus Walleij      61: Crypto Accelerator 0
8423fbc87cSLinus Walleij      62: Crypto Accelerator 0 TX or Hash Accelerator 0 TX
8523fbc87cSLinus Walleij      63: Hash Accelerator 0 TX
8623fbc87cSLinus Walleij
8723fbc87cSLinus Walleij      The second cell is the DMA request line number. This is only used when
8823fbc87cSLinus Walleij      a fixed channel is allocated, and indicated by setting bit 3 in the
8923fbc87cSLinus Walleij      flags field (see below).
9023fbc87cSLinus Walleij
9123fbc87cSLinus Walleij      The third cell is a 32bit flags bitfield with the following possible
9223fbc87cSLinus Walleij      bits set:
9323fbc87cSLinus Walleij      0x00000001 (bit 0) - mode:
9423fbc87cSLinus Walleij        Logical channel when unset
9523fbc87cSLinus Walleij        Physical channel when set
9623fbc87cSLinus Walleij      0x00000002 (bit 1) - direction:
9723fbc87cSLinus Walleij        Memory to Device when unset
9823fbc87cSLinus Walleij        Device to Memory when set
9923fbc87cSLinus Walleij      0x00000004 (bit 2) - endianness:
10023fbc87cSLinus Walleij        Little endian when unset
10123fbc87cSLinus Walleij        Big endian when set
10223fbc87cSLinus Walleij      0x00000008 (bit 3) - use fixed channel:
10323fbc87cSLinus Walleij        Use automatic channel selection when unset
10423fbc87cSLinus Walleij        Use DMA request line number when set
10523fbc87cSLinus Walleij      0x00000010 (bit 4) - set channel as high priority:
10623fbc87cSLinus Walleij        Normal priority when unset
10723fbc87cSLinus Walleij        High priority when set
10823fbc87cSLinus Walleij
10923fbc87cSLinus Walleij  compatible:
11023fbc87cSLinus Walleij    items:
11123fbc87cSLinus Walleij      - const: stericsson,db8500-dma40
11223fbc87cSLinus Walleij      - const: stericsson,dma40
11323fbc87cSLinus Walleij
11423fbc87cSLinus Walleij  reg:
11523fbc87cSLinus Walleij    items:
11623fbc87cSLinus Walleij      - description: DMA40 memory base
11723fbc87cSLinus Walleij      - description: LCPA memory base
11823fbc87cSLinus Walleij
11923fbc87cSLinus Walleij  reg-names:
12023fbc87cSLinus Walleij    items:
12123fbc87cSLinus Walleij      - const: base
12223fbc87cSLinus Walleij      - const: lcpa
12323fbc87cSLinus Walleij
12423fbc87cSLinus Walleij  interrupts:
12523fbc87cSLinus Walleij    maxItems: 1
12623fbc87cSLinus Walleij
12723fbc87cSLinus Walleij  clocks:
12823fbc87cSLinus Walleij    maxItems: 1
12923fbc87cSLinus Walleij
13023fbc87cSLinus Walleij  memcpy-channels:
13123fbc87cSLinus Walleij    $ref: /schemas/types.yaml#/definitions/uint32-array
13223fbc87cSLinus Walleij    description: Array of u32 elements indicating which channels on the DMA
13323fbc87cSLinus Walleij      engine are elegible for memcpy transfers
13423fbc87cSLinus Walleij
13523fbc87cSLinus Walleijrequired:
13623fbc87cSLinus Walleij  - "#dma-cells"
13723fbc87cSLinus Walleij  - compatible
13823fbc87cSLinus Walleij  - reg
13923fbc87cSLinus Walleij  - interrupts
14023fbc87cSLinus Walleij  - clocks
14123fbc87cSLinus Walleij  - memcpy-channels
14223fbc87cSLinus Walleij
14323fbc87cSLinus WalleijadditionalProperties: false
14423fbc87cSLinus Walleij
14523fbc87cSLinus Walleijexamples:
14623fbc87cSLinus Walleij  - |
14723fbc87cSLinus Walleij    #include <dt-bindings/interrupt-controller/irq.h>
14823fbc87cSLinus Walleij    #include <dt-bindings/interrupt-controller/arm-gic.h>
14923fbc87cSLinus Walleij    #include <dt-bindings/mfd/dbx500-prcmu.h>
150*837b2fafSKrzysztof Kozlowski    dma-controller@801c0000 {
15123fbc87cSLinus Walleij        compatible = "stericsson,db8500-dma40", "stericsson,dma40";
152*837b2fafSKrzysztof Kozlowski        reg = <0x801c0000 0x1000>, <0x40010000 0x800>;
15323fbc87cSLinus Walleij        reg-names = "base", "lcpa";
15423fbc87cSLinus Walleij        interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
15523fbc87cSLinus Walleij        #dma-cells = <3>;
15623fbc87cSLinus Walleij        memcpy-channels = <56 57 58 59 60>;
15723fbc87cSLinus Walleij        clocks = <&prcmu_clk PRCMU_DMACLK>;
15823fbc87cSLinus Walleij    };
15923fbc87cSLinus Walleij...
160