I am working on Col iMX6ULL 512 MB IT V1.0 A SOM and Colibri Evaluation Board 3.2 B. I am using spidev_test.c as my user space application.
Initially in imx6ull-colibri-eval-v3.dtsi , spi-max-frequency = 23000000 is set , but i want spi frequency up to 40 MHz, so i have modified above dtsi file as spi-max-frequency = 60000000 since spi max frequency possible is 60000000. Here User Space Application Execution is showing max speed as what i am requested.
But in CRO i am getting only 20 MHz Frequency whatever the frequency i am requested via user space using spidev_test.c above 20 MHz Frequency.
Please Suggest me what to do to increase the SPI Frequency. Thanks in advance.
Below is dtsi modification:
&ecspi1 {
status = "okay";
mcp251x0: mcp251x@0 {
compatible = "microchip,mcp2515";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_can_int>;
reg = <0>;
clocks = <&clk16m>;
interrupt-parent = <&gpio2>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <10000000>;
//status = "okay";
status = "disabled";
};
spidev0: spidev@0 {
compatible = "toradex,evalspi";
reg = <0>;
spi-max-frequency = <60000000>;
//status = "disabled";
status = "okay";
};
};
Below is application Execution:
root@colibri-imx6ull:~# ./hello-world-debug -D /dev/spidev0.0 -s 30000000
spi mode: 0x0
bits per word: 8
max speed: 30000000 Hz (30000 KHz)
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.
root@colibri-imx6ull:~# ./hello-world-debug -D /dev/spidev0.0 -s 20000000
spi mode: 0x0
bits per word: 8
max speed: 20000000 Hz (20000 KHz)
RX | 00 00 00 00 00 00 00+-----------------------------+00 00 00 00 00 00 00 00.
root@colibri-imx6ull:~# ./hello-world-debug -D /dev/spidev0.0 -s 25000000
spi mode: 0x0
bits per word: 8
max speed: 25000000 Hz (25000 KHz)
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.