18c2ecf20Sopenharmony_ciKeystone Navigator DMA Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis document explains the device tree bindings for the packet dma
48c2ecf20Sopenharmony_cion keystone devices. The Keystone Navigator DMA driver sets up the dma
58c2ecf20Sopenharmony_cichannels and flows for the QMSS(Queue Manager SubSystem) who triggers
68c2ecf20Sopenharmony_cithe actual data movements across clients using destination queues. Every
78c2ecf20Sopenharmony_ciclient modules like  NETCP(Network Coprocessor), SRIO(Serial Rapid IO),
88c2ecf20Sopenharmony_ciCRYPTO Engines etc has its own instance of dma hardware. QMSS has also
98c2ecf20Sopenharmony_cian internal packet DMA module which is used as an infrastructure DMA
108c2ecf20Sopenharmony_ciwith zero copy.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciNavigator DMA cloud layout:
138c2ecf20Sopenharmony_ci	------------------
148c2ecf20Sopenharmony_ci	| Navigator DMAs |
158c2ecf20Sopenharmony_ci	------------------
168c2ecf20Sopenharmony_ci		|
178c2ecf20Sopenharmony_ci		|-> DMA instance #0
188c2ecf20Sopenharmony_ci		|
198c2ecf20Sopenharmony_ci		|-> DMA instance #1
208c2ecf20Sopenharmony_ci			.
218c2ecf20Sopenharmony_ci			.
228c2ecf20Sopenharmony_ci		|
238c2ecf20Sopenharmony_ci		|-> DMA instance #n
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciNavigator DMA properties:
268c2ecf20Sopenharmony_ciRequired properties:
278c2ecf20Sopenharmony_ci - compatible: Should be "ti,keystone-navigator-dma"
288c2ecf20Sopenharmony_ci - clocks: phandle to dma instances clocks. The clock handles can be as
298c2ecf20Sopenharmony_ci	many as the dma instances. The order should be maintained as per
308c2ecf20Sopenharmony_ci	the dma instances.
318c2ecf20Sopenharmony_ci - ti,navigator-cloud-address: Should contain base address for the multi-core
328c2ecf20Sopenharmony_ci	navigator cloud and number of addresses depends on SOC integration
338c2ecf20Sopenharmony_ci	configuration.. Navigator cloud global address needs to be programmed
348c2ecf20Sopenharmony_ci	into DMA and the DMA uses it as the physical addresses to reach queue
358c2ecf20Sopenharmony_ci	managers. Note that these addresses though points to queue managers,
368c2ecf20Sopenharmony_ci	they are relevant only from DMA perspective. The QMSS may not choose to
378c2ecf20Sopenharmony_ci	use them since it has a different address space view to reach all
388c2ecf20Sopenharmony_ci	its components.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciDMA instance properties:
418c2ecf20Sopenharmony_ciRequired properties:
428c2ecf20Sopenharmony_ci - reg: Should contain register location and length of the following dma
438c2ecf20Sopenharmony_ci	register regions. Register regions should be specified in the following
448c2ecf20Sopenharmony_ci	order.
458c2ecf20Sopenharmony_ci	- Global control register region (global).
468c2ecf20Sopenharmony_ci	- Tx DMA channel configuration register region (txchan).
478c2ecf20Sopenharmony_ci	- Rx DMA channel configuration register region (rxchan).
488c2ecf20Sopenharmony_ci	- Tx DMA channel Scheduler configuration register region (txsched).
498c2ecf20Sopenharmony_ci	- Rx DMA flow configuration register region (rxflow).
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciOptional properties:
528c2ecf20Sopenharmony_ci - reg-names: Names for the register regions.
538c2ecf20Sopenharmony_ci - ti,enable-all: Enable all DMA channels vs clients opening specific channels
548c2ecf20Sopenharmony_ci	what they need. This property is useful for the userspace fast path
558c2ecf20Sopenharmony_ci	case where the linux drivers enables the channels used by userland
568c2ecf20Sopenharmony_ci	stack.
578c2ecf20Sopenharmony_ci - ti,loop-back: To loopback Tx streaming I/F to Rx streaming I/F. Used for
588c2ecf20Sopenharmony_ci	      infrastructure transfers.
598c2ecf20Sopenharmony_ci - ti,rx-retry-timeout: Number of dma cycles to wait before retry on buffer
608c2ecf20Sopenharmony_ci		     starvation.
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ciExample:
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci	knav_dmas: knav_dmas@0 {
658c2ecf20Sopenharmony_ci		compatible = "ti,keystone-navigator-dma";
668c2ecf20Sopenharmony_ci		clocks = <&papllclk>, <&clkxge>;
678c2ecf20Sopenharmony_ci		#address-cells = <1>;
688c2ecf20Sopenharmony_ci		#size-cells = <1>;
698c2ecf20Sopenharmony_ci		ranges;
708c2ecf20Sopenharmony_ci		ti,navigator-cloud-address = <0x23a80000 0x23a90000
718c2ecf20Sopenharmony_ci					   0x23aa0000 0x23ab0000>;
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci		dma_gbe: dma_gbe@0 {
748c2ecf20Sopenharmony_ci			reg = <0x2004000 0x100>,
758c2ecf20Sopenharmony_ci				  <0x2004400 0x120>,
768c2ecf20Sopenharmony_ci				  <0x2004800 0x300>,
778c2ecf20Sopenharmony_ci				  <0x2004c00 0x120>,
788c2ecf20Sopenharmony_ci				  <0x2005000 0x400>;
798c2ecf20Sopenharmony_ci			reg-names = "global", "txchan", "rxchan",
808c2ecf20Sopenharmony_ci					"txsched", "rxflow";
818c2ecf20Sopenharmony_ci		};
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci		dma_xgbe: dma_xgbe@0 {
848c2ecf20Sopenharmony_ci			reg = <0x2fa1000 0x100>,
858c2ecf20Sopenharmony_ci				<0x2fa1400 0x200>,
868c2ecf20Sopenharmony_ci				<0x2fa1800 0x200>,
878c2ecf20Sopenharmony_ci				<0x2fa1c00 0x200>,
888c2ecf20Sopenharmony_ci				<0x2fa2000 0x400>;
898c2ecf20Sopenharmony_ci			reg-names = "global", "txchan", "rxchan",
908c2ecf20Sopenharmony_ci					"txsched", "rxflow";
918c2ecf20Sopenharmony_ci		};
928c2ecf20Sopenharmony_ci	};
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ciNavigator DMA client:
958c2ecf20Sopenharmony_ciRequired properties:
968c2ecf20Sopenharmony_ci - ti,navigator-dmas: List of one or more DMA specifiers, each consisting of
978c2ecf20Sopenharmony_ci			- A phandle pointing to DMA instance node
988c2ecf20Sopenharmony_ci			- A DMA channel number as a phandle arg.
998c2ecf20Sopenharmony_ci - ti,navigator-dma-names: Contains dma channel name for each DMA specifier in
1008c2ecf20Sopenharmony_ci			the 'ti,navigator-dmas' property.
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciExample:
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci	netcp: netcp@2090000 {
1058c2ecf20Sopenharmony_ci		..
1068c2ecf20Sopenharmony_ci		ti,navigator-dmas = <&dma_gbe 22>,
1078c2ecf20Sopenharmony_ci				<&dma_gbe 23>,
1088c2ecf20Sopenharmony_ci				<&dma_gbe 8>;
1098c2ecf20Sopenharmony_ci		ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
1108c2ecf20Sopenharmony_ci		..
1118c2ecf20Sopenharmony_ci	};
112