xref: /freebsd/sys/contrib/device-tree/Bindings/dma/sprd-dma.txt (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
1c66ec88fSEmmanuel Vadot* Spreadtrum DMA controller
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThis binding follows the generic DMA bindings defined in dma.txt.
4c66ec88fSEmmanuel Vadot
5c66ec88fSEmmanuel VadotRequired properties:
6c66ec88fSEmmanuel Vadot- compatible: Should be "sprd,sc9860-dma".
7c66ec88fSEmmanuel Vadot- reg: Should contain DMA registers location and length.
8c66ec88fSEmmanuel Vadot- interrupts: Should contain one interrupt shared by all channel.
9c66ec88fSEmmanuel Vadot- #dma-cells: must be <1>. Used to represent the number of integer
10c66ec88fSEmmanuel Vadot	cells in the dmas property of client device.
11*d5b0e70fSEmmanuel Vadot- dma-channels : Number of DMA channels supported. Should be 32.
12c66ec88fSEmmanuel Vadot- clock-names: Should contain the clock of the DMA controller.
13c66ec88fSEmmanuel Vadot- clocks: Should contain a clock specifier for each entry in clock-names.
14c66ec88fSEmmanuel Vadot
15*d5b0e70fSEmmanuel VadotDeprecated properties:
16*d5b0e70fSEmmanuel Vadot- #dma-channels : Number of DMA channels supported. Should be 32.
17*d5b0e70fSEmmanuel Vadot
18c66ec88fSEmmanuel VadotExample:
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel VadotController:
21c66ec88fSEmmanuel Vadotapdma: dma-controller@20100000 {
22c66ec88fSEmmanuel Vadot	compatible = "sprd,sc9860-dma";
23c66ec88fSEmmanuel Vadot	reg = <0x20100000 0x4000>;
24c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
25c66ec88fSEmmanuel Vadot	#dma-cells = <1>;
26*d5b0e70fSEmmanuel Vadot	dma-channels = <32>;
27c66ec88fSEmmanuel Vadot	clock-names = "enable";
28c66ec88fSEmmanuel Vadot	clocks = <&clk_ap_ahb_gates 5>;
29c66ec88fSEmmanuel Vadot};
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel VadotClient:
33c66ec88fSEmmanuel VadotDMA clients connected to the Spreadtrum DMA controller must use the format
34c66ec88fSEmmanuel Vadotdescribed in the dma.txt file, using a two-cell specifier for each channel.
35c66ec88fSEmmanuel VadotThe two cells in order are:
36c66ec88fSEmmanuel Vadot1. A phandle pointing to the DMA controller.
37c66ec88fSEmmanuel Vadot2. The slave id.
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadotspi0: spi@70a00000{
40c66ec88fSEmmanuel Vadot	...
41c66ec88fSEmmanuel Vadot	dma-names = "rx_chn", "tx_chn";
42c66ec88fSEmmanuel Vadot	dmas = <&apdma 11>, <&apdma 12>;
43c66ec88fSEmmanuel Vadot	...
44c66ec88fSEmmanuel Vadot};
45