AnsweredAssumed Answered

how to make SAI1 mclk & MQS to work on IMX6UL evk?

Question asked by Daniel Hu on Nov 7, 2017
Latest reply on Nov 8, 2017 by Daniel Hu

It seems some other people have encountered similar issues in i.MX community, but I just can't find a solution that can help.


I am trying to enable MQS audio on IMX6UL evk board. there are apparently some examples already in the kernel, e.g. device tree imx6ul-14x14-ddr3-arm2-mqs.dts. I copied these stuff, and could play audio on sound card mqs-audio, but no audio heard or PWM signal observed, so mqs is not working.


It looks like the SAI1 is more or less working, because we can see the TX data signal and bit clock on oscilloscope, but couldn't see MCLK output, here are the pin mapping we are using in device tree:


fsl,pins = <


I noticed there is a patch in mainstream kernel to enable "fsl,sai-mclk-direction-output" in device tree, but this patch does not work for us. I think the reason is obvious, it was trying to set the bit 19 of IOMUXC GPR1, which is only useful when pad LCD_DATA00 pin is used for MCLK output (I am  using CSI_DATA01)


Regardless, from my point of view, SAI1 MCLK do not need to output to any pin as long as it can be correctly propagated to MQS, but what should I do other than following lines in device tree:

&mqs {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mqs>;
clocks = <&clks IMX6UL_CLK_SAI1>;
clock-names = "mclk";
status = "okay";

During test, CCM_CCGR5 is 333fc3ff, so it seems to be right value to enable the clock we need. 


All in all, I have no idea what goes wrong, can anyone help?


BTW, we are using imx_4.1.15_2.0.0_ga