i.mx8 generate a clock for outside on-board device

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.mx8 generate a clock for outside on-board device

ソリューションへジャンプ
2,005件の閲覧回数
wenfu
Contributor III

I want to generate a 24Mhz clock for a audio codec on my board. Can any one show me a dts example or some guidance. Which pins should I use?

Thank you.

0 件の賞賛
返信
1 解決策
4 返答(返信)
1,993件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi wenfu

 

what processor used in the case, one can look for example at

MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 :

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.d...

 

Best regards
igor

0 件の賞賛
返信
1,985件の閲覧回数
wenfu
Contributor III

The processor is i.mx8mq, it seems different from i.mx8mm. see fsl_sai.txt:

Optional properties (for mx6ul):

- fsl,sai-mclk-direction-output: This is a boolean property. If present,
indicates that SAI will output the SAI MCLK clock.

and fsl_sai.c:

if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) &&
of_device_is_compatible(np, "fsl,imx6ul-sai")) {
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
if (IS_ERR(gpr)) {
dev_err(&pdev->dev, "cannot find iomuxc registers\n");
return PTR_ERR(gpr);
}

index = of_alias_get_id(np, "sai");
if (index < 0)
return index;

regmap_update_bits(gpr, IOMUXC_GPR1, MCLK_DIR(index),
MCLK_DIR(index));
}

I wonder if it's possible to obtain a 512k-50M clock signal on MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK?  This in is currnet used in our PCB. Or if we can obtain a proper clock from other pins, then we have to change the PCB next time.

Now we can run the codec well by feeding it's MCLK pin an external active crystal oscillator . The codec driver is simple-card and it act as DAI master.

 

B.R.

wen

 

 

0 件の賞賛
返信
1,983件の閲覧回数
igorpadykov
NXP Employee
NXP Employee
1,957件の閲覧回数
wenfu
Contributor III

it works, thank you so much.

0 件の賞賛
返信