DMA for PCIe on i.MX 8M Plus & Mini

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DMA for PCIe on i.MX 8M Plus & Mini

1,061 次查看
mandre
Contributor II

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?
标签 (1)
标记 (2)
0 项奖励
回复
10 回复数

941 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

@joanxie  please continue with the follow-up.

0 项奖励
回复

926 次查看
joanxie
NXP TechSupport
NXP TechSupport

I already replied to the customer via mail, because I couldn't access the community last week

0 项奖励
回复

907 次查看
mandre
Contributor II

Please check your support ticket #0062962

You did reply answering 1 of my 4 questions on June 28, 7:23am via the NXP support ticketing system. I replied to this on June 28, 9:13am with a follow-up question and the the re-iteration of the un-answered questions.

I haven't heard since (neither publicly on the forum nor via the support ticket).

0 项奖励
回复

904 次查看
joanxie
NXP TechSupport
NXP TechSupport

I just mailed to you attach my previous reply, as I mentioned, I couldn't access the community last week, I mailed to you, maybe the system issue, I screen shot it, you can check, I'm waiting for you cable and test result

0 项奖励
回复

993 次查看
mandre
Contributor II

I replied to your email on Friday, please check. Haven't heard back yet.

0 项奖励
回复

1,042 次查看
joanxie
NXP TechSupport
NXP TechSupport

mail to you, pls check

0 项奖励
回复

466 次查看
svolpe
Contributor I

I'm also trying to get a DMA reading the data off of the pcie bus. Can you post here or message me on how you got it working? Or can someone from nxp give me info on the solution? 

0 项奖励
回复

455 次查看
mandre
Contributor II

Some driver support got added in mainline Kernel v6.3. You can use the pcitest tool (part of the Kernel) as example.

0 项奖励
回复

451 次查看
svolpe
Contributor I

one quick question: I'm assuming there is no "generic pci-e DMA" driver and that I need to write my own kernel module to do the DMA stuff on the PCIe interface? Or is there a kernel module already in existence that handles the DMA?

0 项奖励
回复

444 次查看
mandre
Contributor II

You'll likely have to write some Kernel driver by yourself.

0 项奖励
回复