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:
I want RMCLK from codec to clock SAI2.
Any help is appreciated.
Solved! Go to Solution.
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.
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.
Thanks, for your reply. I have this book but I am interested in specifically the pinmux arrangement that is necessary.
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.
Section 14.1.1.1 looks clear for clock configuration, but seems unclear for the software modification. would you please share example how to modify dts and other necessary files? Thanks for your reply.