Hi all,
I'm working on IMX6SL EVK board running :
kernel 3.10.53
devicetree : imx6sl-evk-pl
I'm trying but w/o success to add SPI to my /dev folder ( in order to use it in my app with IOCTL ).
I've already turn "on" the CONFIG_SPI_SPIDEV=y in the .config file.
I've read that i need also to add spidev to spi_board_info struct but i can't find in my kernel tree the relevant file.
Please advise,
Thanks in advance,
Moran.
Also :
I'm not sure if i need the "spi_board_info" because i'm using device tree.
I've already add the SPIDEV to the device tree but it still doesn't help.
from device tree :
&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio4 11 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1_1>;
status = "okay";
spidev@0 {
#address-cells = <1>;
#size-cells = <1>;
comatible = "spidev";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
Hi moranmoran,
last week I had exactly the same issue with imx6q. Using dmesg | grep spi I found that the SPI pins were being configured multiple times in the device tree, so I needed to remove other configurations and rebuild device tree.
Besides this, for some strange reason I had to rebuild the kernel, I dont know if I did something wrong in the first builld. I enabled SPIDEV using make menuconfig.
Regards,
Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Carlos
1) Dmesg - SPI print :
root@plsdk-armel:~# dmesg | grep spi
[ 0.921356] spi_imx 2008000.ecspi: probed
2) I've already select SPIDEV in .config
Really don't know where is the problem.
Moran.
Hi Moran,
If you are you executing make imx_v7_defconfig after you make the changes then the .config file is overwritten
Please follow next sequence:
make distclean
make imx_v7_defconfig
make menuconfig (in this step set SPIdev under Device Drivers -> SPI and save configuration)
make zImage
And finally replace the zImage file that you are using for the newly generated.
Regards,
Carlos