imx8mp setup Linux to reserve SAI for Cortex-M7

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp setup Linux to reserve SAI for Cortex-M7

1,795 Views
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 Kudos
6 Replies

1,636 Views
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 Kudos

1,628 Views
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 Kudos

1,619 Views
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 Kudos

936 Views
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 Kudos

741 Views
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

Tags (1)
0 Kudos