i.mx8 audio; Using SAI as slave with external MCLK

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

i.mx8 audio; Using SAI as slave with external MCLK

Jump to solution
734 Views
mwilliams
Contributor III

I am looking for help to use an external clock source to drive an SAI on the i.mx8.  I need to connect the M4F core to the SAI so I need some device tree modifications.  

Suppose you have an external clock source (from a codec that is the master of the I2S clocks) to be used to clock SAI2 and that the M4F core will be doing SDMA.  I gather that there are two ways to do this; one is to feed the external clock to the CCM and then on to the SAI as MCLK, the other is to feed the external clock to SAI MCLK once it is configured as an input.  I think the latter would be best but I would like to explore both options, although I struggle with how to do either.  Am I correct in thinking I can do this?

Here is a rough diagram to indicate what I hope to configure:

SAI_CONFIG.png

I want RMCLK from codec to clock SAI2.

Any help is appreciated.

 

0 Kudos
1 Solution
668 Views
edwardtyrrell
Senior Contributor I

Hi, 

Bit more info about the SAI in this doc   https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf

Also this is good:

Section 14.1.1.1 SAI Master Clock Inputs/Outputs for internal clock root description in IMX8MPRM document.

 

View solution in original post

3 Replies
715 Views
edwardtyrrell
Senior Contributor I

Hi,

Any help appreciated.. This is a useful book that may give you some pointers.

https://douran.academy/wp-content/uploads/ebooks/linux-device-driver-development.pdf 

Chapter 06: ALSA SoC

Section: Clocking and formatting considerations

 

Cheers.

710 Views
mwilliams
Contributor III

Thanks, for your reply.  I have this book but I am interested in specifically the pinmux arrangement that is necessary.

0 Kudos
669 Views
edwardtyrrell
Senior Contributor I

Hi, 

Bit more info about the SAI in this doc   https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf

Also this is good:

Section 14.1.1.1 SAI Master Clock Inputs/Outputs for internal clock root description in IMX8MPRM document.