I use the imx6ql-sabreauto board to communicate with a slave board.
I want to know the highest speed of spi block.
I read the document and i think the highest speed is up to 60MHz.
and i use the ioctl like this
ioctl (fd, SPI_IOC_WR_MAX_SPEED_HZ, 60MHz)
But , I don't confirm whether this is effective or not.
How do I know the actual speed of the SPI work with?
Thank you!
Solved! Go to Solution.
Hi Jie
max. ecspi frequency can be found in sect.4.11.2 ECSPI Timing Parameters
i.MX6DQ Datasheet
http://cache.freescale.com/files/32bit/doc/data_sheet/IMX6DQCEC.pdf
example of usage with spi-nor flash using dts "spi-max-frequency" parameter in
imx6qdl-sabresd.dtsi
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jie
max. ecspi frequency can be found in sect.4.11.2 ECSPI Timing Parameters
i.MX6DQ Datasheet
http://cache.freescale.com/files/32bit/doc/data_sheet/IMX6DQCEC.pdf
example of usage with spi-nor flash using dts "spi-max-frequency" parameter in
imx6qdl-sabresd.dtsi
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for your answer.
Actually my imx6qdl-sabreauto.dtsi is like this:
&ecspi1{
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio5 25 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
status = "okay";
spidev0: spi@0 {
compatible = "spidev";
spi-max-frequency = <40000000>;
reg = <0>;
};
};
So, I think the SPI is work with 40MHz.