summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/dma/jz4780-dma.txt
blob: ec89782d949884829b76e85f0979f1d0d5b9f41a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
* Ingenic JZ4780 DMA Controller

Required properties:

- compatible: Should be one of:
  * ingenic,jz4740-dma
  * ingenic,jz4725b-dma
  * ingenic,jz4770-dma
  * ingenic,jz4780-dma
  * ingenic,x1000-dma
- reg: Should contain the DMA channel registers location and length, followed
  by the DMA controller registers location and length.
- interrupts: Should contain the interrupt specifier of the DMA controller.
- clocks: Should contain a clock specifier for the JZ4780/X1000 PDMA clock.
- #dma-cells: Must be <2>. Number of integer cells in the dmas property of
  DMA clients (see below).

Optional properties:

- ingenic,reserved-channels: Bitmask of channels to reserve for devices that
  need a specific channel. These channels will only be assigned when explicitly
  requested by a client. The primary use for this is channels 0 and 1, which
  can be configured to have special behaviour for NAND/BCH when using
  programmable firmware.

Example:

dma: dma-controller@13420000 {
	compatible = "ingenic,jz4780-dma";
	reg = <0x13420000 0x400
	       0x13421000 0x40>;

	interrupt-parent = <&intc>;
	interrupts = <10>;

	clocks = <&cgu JZ4780_CLK_PDMA>;

	#dma-cells = <2>;

	ingenic,reserved-channels = <0x3>;
};

DMA clients must use the format described in dma.txt, giving a phandle to the
DMA controller plus the following 2 integer cells:

1. Request type: The DMA request type for transfers to/from the device on
   the allocated channel, as defined in the SoC documentation.

2. Channel: If set to 0xffffffff, any available channel will be allocated for
   the client. Otherwise, the exact channel specified will be used. The channel
   should be reserved on the DMA controller using the ingenic,reserved-channels
   property.

Example:

uart0: serial@10030000 {
	...
	dmas = <&dma 0x14 0xffffffff
		&dma 0x15 0xffffffff>;
	dma-names = "tx", "rx";
	...
};