IMX8MM How to modify SPI clock source?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX8MM How to modify SPI clock source?

1,691 次查看
Sarajia
Contributor I

Hi Sir,

Please tell me how to modify the SPI clock source. I now change it to 24Mhz, and the actual SPI rate is only (24 / (0 + 1) > > 0) more than 12Mhz.
Imx6u can reach 60Mhz
clocks = <&amp;clk IMX8MM_ CLK_ ECSPI2_ ROOT>,
<&amp;clk IMX8MM_ CLK_ ECSPI2_ ROOT>,
<&amp;clk IMX8MM_ CLK_ ECSPI2_ SRC>,
<&amp;clk IMX8MM_ CLK_ ECSPI2_ CG>,
<&amp;clk IMX8MM_ CLK_ ECSPI2_ PRE_ DIV>,
<&amp;clk IMX8MM_ CLK_ ECSPI2_ DIV>;
clock-names = "ipg", "per", "src", "cg", "pre_ div", "div";
I tried in DTS. These are 24Mhz

Pls show your hands on this issue.

Thanks a lot.

0 项奖励
回复
1 回复

1,689 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Sara

 

one can look at below ecspi2 example

https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_5.4.x_2.3.0/arch/arm64/boot/dts/free...

pay attention to

assigned-clock-parents

assigned-clock-rates = <40000000>;
spi-max-frequency = <10000000>;

Clock sources can be found in clk driver

https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_5.4.x_2.3.0/drivers/clk/imx/clk-imx8...

 

Best regards
igor

0 项奖励
回复