Skip to content

Commit 00043a2

Browse files
committed
Merge branch 'topic/xilinx' into fixes
Conflicts: Documentation/driver-api/dmaengine/provider.rst include/linux/dmaengine.h
2 parents 0b5ad7b + bc22738 commit 00043a2

File tree

9 files changed

+1708
-1
lines changed

9 files changed

+1708
-1
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/dma/xilinx/xlnx,zynqmp-dpdma.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Xilinx ZynqMP DisplayPort DMA Controller Device Tree Bindings
8+
9+
description: |
10+
These bindings describe the DMA engine included in the Xilinx ZynqMP
11+
DisplayPort Subsystem. The DMA engine supports up to 6 DMA channels (3
12+
channels for a video stream, 1 channel for a graphics stream, and 2 channels
13+
for an audio stream).
14+
15+
maintainers:
16+
- Laurent Pinchart <[email protected]>
17+
18+
allOf:
19+
- $ref: "../dma-controller.yaml#"
20+
21+
properties:
22+
"#dma-cells":
23+
const: 1
24+
description: |
25+
The cell is the DMA channel ID (see dt-bindings/dma/xlnx-zynqmp-dpdma.h
26+
for a list of channel IDs).
27+
28+
compatible:
29+
const: xlnx,zynqmp-dpdma
30+
31+
reg:
32+
maxItems: 1
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
clocks:
38+
description: The AXI clock
39+
maxItems: 1
40+
41+
clock-names:
42+
const: axi_clk
43+
44+
required:
45+
- "#dma-cells"
46+
- compatible
47+
- reg
48+
- interrupts
49+
- clocks
50+
- clock-names
51+
52+
additionalProperties: false
53+
54+
examples:
55+
- |
56+
#include <dt-bindings/interrupt-controller/arm-gic.h>
57+
58+
dma: dma-controller@fd4c0000 {
59+
compatible = "xlnx,zynqmp-dpdma";
60+
reg = <0x0 0xfd4c0000 0x0 0x1000>;
61+
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
62+
interrupt-parent = <&gic>;
63+
clocks = <&dpdma_clk>;
64+
clock-names = "axi_clk";
65+
#dma-cells = <1>;
66+
};
67+
68+
...

Documentation/driver-api/dmaengine/client.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ The details of these operations are:
8686
- interleaved_dma: This is common to Slave as well as M2M clients. For slave
8787
address of devices' fifo could be already known to the driver.
8888
Various types of operations could be expressed by setting
89-
appropriate values to the 'dma_interleaved_template' members.
89+
appropriate values to the 'dma_interleaved_template' members. Cyclic
90+
interleaved DMA transfers are also possible if supported by the channel by
91+
setting the DMA_PREP_REPEAT transfer flag.
9092

9193
A non-NULL return of this transfer API represents a "descriptor" for
9294
the given transaction.

Documentation/driver-api/dmaengine/provider.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,27 @@ Currently, the types available are:
255255
identifier for each descriptor sent to the DMA device in order to
256256
properly track the completion.
257257

258+
- DMA_REPEAT
259+
260+
- The device supports repeated transfers. A repeated transfer, indicated by
261+
the DMA_PREP_REPEAT transfer flag, is similar to a cyclic transfer in that
262+
it gets automatically repeated when it ends, but can additionally be
263+
replaced by the client.
264+
265+
- This feature is limited to interleaved transfers, this flag should thus not
266+
be set if the DMA_INTERLEAVE flag isn't set. This limitation is based on
267+
the current needs of DMA clients, support for additional transfer types
268+
should be added in the future if and when the need arises.
269+
270+
- DMA_LOAD_EOT
271+
272+
- The device supports replacing repeated transfers at end of transfer (EOT)
273+
by queuing a new transfer with the DMA_PREP_LOAD_EOT flag set.
274+
275+
- Support for replacing a currently running transfer at another point (such
276+
as end of burst instead of end of transfer) will be added in the future
277+
based on DMA clients needs, if and when the need arises.
278+
258279
These various types will also affect how the source and destination
259280
addresses change over time.
260281

@@ -550,6 +571,34 @@ DMA_CTRL_REUSE
550571
writes for which the descriptor should be in different format from
551572
normal data descriptors.
552573

574+
- DMA_PREP_REPEAT
575+
576+
- If set, the transfer will be automatically repeated when it ends until a
577+
new transfer is queued on the same channel with the DMA_PREP_LOAD_EOT flag.
578+
If the next transfer to be queued on the channel does not have the
579+
DMA_PREP_LOAD_EOT flag set, the current transfer will be repeated until the
580+
client terminates all transfers.
581+
582+
- This flag is only supported if the channel reports the DMA_REPEAT
583+
capability.
584+
585+
- DMA_PREP_LOAD_EOT
586+
587+
- If set, the transfer will replace the transfer currently being executed at
588+
the end of the transfer.
589+
590+
- This is the default behaviour for non-repeated transfers, specifying
591+
DMA_PREP_LOAD_EOT for non-repeated transfers will thus make no difference.
592+
593+
- When using repeated transfers, DMA clients will usually need to set the
594+
DMA_PREP_LOAD_EOT flag on all transfers, otherwise the channel will keep
595+
repeating the last repeated transfer and ignore the new transfers being
596+
queued. Failure to set DMA_PREP_LOAD_EOT will appear as if the channel was
597+
stuck on the previous transfer.
598+
599+
- This flag is only supported if the channel reports the DMA_LOAD_EOT
600+
capability.
601+
553602
General Design Notes
554603
====================
555604

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18847,6 +18847,15 @@ F: Documentation/devicetree/bindings/media/xilinx/
1884718847
F: drivers/media/platform/xilinx/
1884818848
F: include/uapi/linux/xilinx-v4l2-controls.h
1884918849

18850+
XILINX ZYNQMP DPDMA DRIVER
18851+
M: Hyun Kwon <[email protected]>
18852+
M: Laurent Pinchart <[email protected]>
18853+
18854+
S: Supported
18855+
F: Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml
18856+
F: drivers/dma/xilinx/xilinx_dpdma.c
18857+
F: include/dt-bindings/dma/xlnx-zynqmp-dpdma.h
18858+
1885018859
XILLYBUS DRIVER
1885118860
M: Eli Billauer <[email protected]>
1885218861

drivers/dma/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,16 @@ config XILINX_ZYNQMP_DMA
708708
help
709709
Enable support for Xilinx ZynqMP DMA controller.
710710

711+
config XILINX_ZYNQMP_DPDMA
712+
tristate "Xilinx DPDMA Engine"
713+
select DMA_ENGINE
714+
select DMA_VIRTUAL_CHANNELS
715+
help
716+
Enable support for Xilinx ZynqMP DisplayPort DMA. Choose this option
717+
if you have a Xilinx ZynqMP SoC with a DisplayPort subsystem. The
718+
driver provides the dmaengine required by the DisplayPort subsystem
719+
display driver.
720+
711721
config ZX_DMA
712722
tristate "ZTE ZX DMA support"
713723
depends on ARCH_ZX || COMPILE_TEST

drivers/dma/xilinx/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
obj-$(CONFIG_XILINX_DMA) += xilinx_dma.o
33
obj-$(CONFIG_XILINX_ZYNQMP_DMA) += zynqmp_dma.o
4+
obj-$(CONFIG_XILINX_ZYNQMP_DPDMA) += xilinx_dpdma.o

0 commit comments

Comments
 (0)