xref: /freebsd/sys/contrib/device-tree/Bindings/dma/renesas,nbpfaxi.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Renesas "Type-AXI" NBPFAXI* DMA controllers
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel Vadot* DMA controller
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotRequired properties
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadot- compatible:	must be one of
8*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac1b4"
9*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac1b8"
10*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac1b16"
11*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac4b4"
12*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac4b8"
13*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac4b16"
14*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac8b4"
15*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac8b8"
16*c66ec88fSEmmanuel Vadot		"renesas,nbpfaxi64dmac8b16"
17*c66ec88fSEmmanuel Vadot- #dma-cells:	must be 2: the first integer is a terminal number, to which this
18*c66ec88fSEmmanuel Vadot		slave is connected, the second one is flags. Flags is a bitmask
19*c66ec88fSEmmanuel Vadot		with the following bits defined:
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel Vadot#define NBPF_SLAVE_RQ_HIGH	1
22*c66ec88fSEmmanuel Vadot#define NBPF_SLAVE_RQ_LOW	2
23*c66ec88fSEmmanuel Vadot#define NBPF_SLAVE_RQ_LEVEL	4
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel VadotOptional properties:
26*c66ec88fSEmmanuel Vadot- max-burst-mem-read:	limit burst size for memory reads
27*c66ec88fSEmmanuel Vadot  (DMA_MEM_TO_MEM/DMA_MEM_TO_DEV) to this value, specified in bytes, rather
28*c66ec88fSEmmanuel Vadot  than using the maximum burst size allowed by the hardware's buffer size.
29*c66ec88fSEmmanuel Vadot- max-burst-mem-write:	limit burst size for memory writes
30*c66ec88fSEmmanuel Vadot  (DMA_DEV_TO_MEM/DMA_MEM_TO_MEM) to this value, specified in bytes, rather
31*c66ec88fSEmmanuel Vadot  than using the maximum burst size allowed by the hardware's buffer size.
32*c66ec88fSEmmanuel Vadot  If both max-burst-mem-read and max-burst-mem-write are set, DMA_MEM_TO_MEM
33*c66ec88fSEmmanuel Vadot  will use the lower value.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotYou can use dma-channels and dma-requests as described in dma.txt, although they
36*c66ec88fSEmmanuel Vadotwon't be used, this information is derived from the compatibility string.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel VadotExample:
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel Vadot	dma: dma-controller@48000000 {
41*c66ec88fSEmmanuel Vadot		compatible = "renesas,nbpfaxi64dmac8b4";
42*c66ec88fSEmmanuel Vadot		reg = <0x48000000 0x400>;
43*c66ec88fSEmmanuel Vadot		interrupts = <0 12 0x4
44*c66ec88fSEmmanuel Vadot			      0 13 0x4
45*c66ec88fSEmmanuel Vadot			      0 14 0x4
46*c66ec88fSEmmanuel Vadot			      0 15 0x4
47*c66ec88fSEmmanuel Vadot			      0 16 0x4
48*c66ec88fSEmmanuel Vadot			      0 17 0x4
49*c66ec88fSEmmanuel Vadot			      0 18 0x4
50*c66ec88fSEmmanuel Vadot			      0 19 0x4>;
51*c66ec88fSEmmanuel Vadot		#dma-cells = <2>;
52*c66ec88fSEmmanuel Vadot		dma-channels = <8>;
53*c66ec88fSEmmanuel Vadot		dma-requests = <8>;
54*c66ec88fSEmmanuel Vadot	};
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot* DMA client
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel VadotRequired properties:
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadotdmas and dma-names are required, as described in dma.txt.
61*c66ec88fSEmmanuel Vadot
62*c66ec88fSEmmanuel VadotExample:
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadot#include <dt-bindings/dma/nbpfaxi.h>
65*c66ec88fSEmmanuel Vadot
66*c66ec88fSEmmanuel Vadot...
67*c66ec88fSEmmanuel Vadot		dmas = <&dma 0 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)
68*c66ec88fSEmmanuel Vadot			&dma 1 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
69*c66ec88fSEmmanuel Vadot		dma-names = "rx", "tx";
70