IMX8MM How to modify SPI clock source?

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

IMX8MM How to modify SPI clock source?

1,686 Views
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 Kudos
Reply
1 Reply

1,684 Views
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 Kudos
Reply