imx8mp setup Linux to reserve SAI for Cortex-M7

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

imx8mp setup Linux to reserve SAI for Cortex-M7

3,823 次查看
dcraw
Contributor II

I am working with the imx8m plus.  I need to create a M7 program that uses SAI3 and configure Linux to ignore that SAI.  I can run the SAI example interrupt_transfer program directly from u-boot (boards/evkmimx8mp/driver_examples/sai/interrupt_transfer) using:

load mmc 0 007E0000 sai_interrupt_transfer.bin
bootaux 007E0000

After I run bootaux I can use a logic analyzer to see the SAI TX_DATA0 output and TX_BCLK output.  The TX_BCLK output runs continuously as expected.

However, after I start Linux then either the M7 program or Linux will just stop/hang and the TX_BCLK signal stops.  I have configured the Linux device tree to disable sai3 and I disabled the pin iomuxes for the pins I am watching.  So, besides disabling those two items in the device tree is there anything else I need to disable.  Could it be a conflict between the M7 and A53 cores related to the audio master clock or SAI root clock?  How would I configure or troubleshoot this?

0 项奖励
回复
6 回复数

3,664 次查看
per_orback
Contributor II

Hi,

I am experience a very similar problem to the one that you are describing when using SAI from the M7. I am curious about what the solution was if you find any?

Best regards,

 

0 项奖励
回复

3,656 次查看
dcraw
Contributor II

No, I never did get this working.  It must be a problem with coordinating the setup of the clocks or ADMUX registers between Linux and the M7.  But, I never figured it out.

0 项奖励
回复

3,647 次查看
per_orback
Contributor II

Okay, thanks for your replay. We are using SAI5 and SDMA2 from the M7 core. In our case it seems that some bus enter suspend which makes the A53 the core to hang. Because if we run a busy wait loop on one of the A53 cores we don't experience the problem.

Best regards

0 项奖励
回复

2,964 次查看
Chengting
Contributor II

Hello,

    We are experiencing the same issues as you decribed. We are using sai1 and SDMA3,encountered the sai block by linux kernel setup.

  CCM clock could be fixed by set the CLK_IGNORE_UNUSED , but audiomix register could not.

Even if I set value of audiomix register after liunx boot, M7 will hang.

Could you please share your solution?

Thank you in advance.

0 项奖励
回复

2,769 次查看
per_orback
Contributor II

Hello,

In our case the problem was that we were requesting the sai, sdma and a gpio block from both the Linux side and from the M7 side. The solution for us was to disable the devices used by the M7 in the device tree.

Best regards

标记 (1)
0 项奖励
回复