Hello
I am trying to use a DMA inside the i.MX 8M to perform write transactions to a PCIe endpoint. We haven’t fully decided yet between the i.MX 8M Mini and i.MX 8M Plus, I would appreciate if both of those processors could be considered in the answer.
I understand from the Processor Reference Manuals and forum posts that the SDMA cannot be used for this, but the manual refers to an "Embedded DMA" (IMX8MPRM chapter 11.4.2.4). I can't see any such DMA engine registered within the Linux subsystem. dma_request_channel() only returns SDMA channels, same in the sysfs. I can't see any reference to a DMA in pci-imx6.c (driver used for i.MX 8 as well).
The “AN13164 - iMX8MP PCIe Bandwidth Analysis” calls out that a DMA transfer is used, but no source code is provided. There is also a community thread about this: https://community.nxp.com/t5/i-MX-Processors/iMX8M-Plus-PCIe-DMA-Feature/td-p/1529555. Linux v5.4.70 (version used for AN13164) doesn't have any reference to DMA in pcitest.c or pci-epf-test.c. Also, I can't find any function called imx6_pcie_local_dma_start() as indicated in the community thread above in any version of mainline Linux.
A post about a similar test on the i.MX6 (https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX6Q-PCIe-EP-RC-Validation-System/ta-p...) refers that the IPU was used for the DMA transfer, but the i.MX 8M doesn't have any such IPU.
I also can't find any reference to a DMA for PCIe in the Linux Reference Manual.
My questions:
- How can we use a DMA engine of the i.MX 8M (Plus/Mini) to transfer data from the system DDR memory to a PCIe endpoint device? Do you have any Linux driver for this? Any examples?
- Can you provide the exact source code & scripts & command line that were used for AN13164 generate those test results? Which DMA engine was used?