I uses correctly SPI on linux on VF61 and now I want to use the SPI on IMX6ULL.
My configuration is the following: image:Linux LXDE Image 2.8b6 Ångström LXDE Desktop Environment Image
*linux-toradex *: toradex_5.4-2.1.x-imx
I change the following files: imx6ull-colibri.dtsi and imx6ull-colibri-eval-v3.dtsi
in order to activate the SPI [see the attachments]
and then I built the image and uploaded it on my 1 using the following commands:
On PC in linux-toradex:
make colibri_imx6ull_defconfig make -j3 zImage | tee build.log
make imx6ull-colibri-eval-v3.dtb
The build is right [see attachment].
Then I copied the zImage and imx6ull-colibri-eval.dtb in SD_CARD\Colibri-iMX6ULL_LXDE-Image-Tezi_2.8b7
Using toradex Easy image I installed the image.
The new Image is uploaded. I did not found the three devices /dev/spidev0.0, /dev/spidev0.1 and /dev/spidev0.2 on my IMX&ULL.
Linux LXDE Image 2.8b6 Ångström LXDE Desktop Environment Image linux-toradex : toradex_5.4-2.1.x-imx I change the following files: imx6ull-colibri.dtsi and imx6ull-colibri-eval-v3.dtsi
Please don’t mixup Bsp Versions with Linux Kernel version. Bsp 2.8b6 is based on 4.9.x kernel and not 5.4.x kernel. Thus if you want to use Bsp 2.8.7, then please use 4.9.2.3 branch for the kernel.
The new Image is uploaded. I did not found the three devices /dev/spidev0.0, /dev/spidev0.1 and /dev/spidev0.2 on my IMX&ULL.
Dear @jaski.tx,
I changed the branch and I rebuilt the 4.9.2.3 with my changed.But I had again the same problem: I don’t found the spi device.
I attached the dmes.log link text
Could you help me?
Best regards
Matteo
According to your dmesg.log, you have several pin conflict errors. Could you correct them?
[ 1.376123] imx6ul-pinctrl 20e0000.iomuxc: pin MX6UL_PAD_GPIO1_IO05 already requested by 21f4000.serial; cannot claim for 2008000.ecspi
[ 1.395653] imx6ul-pinctrl 20e0000.iomuxc: pin-28 (2008000.ecspi) status -22
[ 1.406431] imx6ul-pinctrl 20e0000.iomuxc: could not request pin 28 (MX6UL_PAD_GPIO1_IO05) from group ecspi1-cs-grp on device 20e0000.iomuxc
[ 1.426214] spi_imx 2008000.ecspi: Error applying setting, reverse things back
[ 1.440829] spi_imx: probe of 2008000.ecspi failed with error -22
Dear @jaski.tx,
Thank fir your replay.
I understood the problem, the I’m changing the PIN.
Of I have again any problem, I’ll contact you.
Best regards
Matteo
Dear @jaski.tx,
Thank you for your replay.
I sent you a wrong file, I fixed the file and now they compile correctly. link text
Could you confirm me that the the following Pin name it’s right?
Do I need to disable this uart1 and uart5 to use them?
Yes, you need to disable them or use other pins. You can disable UART5 but disabling UART1 will lead to lose of the console and you need to redirect the console to a different UART Port.
If I want to use the camera’s PIN because I’m sure that to do not used that feature.
I need to remove the pinctrl_hog_2 from iomuxc of file imx6ull-colibri-nonwifi.dtsi
and the I can add those PIN on SPI section or is there any other way to do it?
I need to remove the pinctrl_hog_2 from iomuxc of file imx6ull-colibri-nonwifi.dtsi and the I can add those PIN on SPI section or is there any other way to do it?
Yes, or you just make sure that the pinctrl_hog_2 is not used anywhere in the devicetree.
You need to use the num-cs property and not the fsl,spi-num-chipselects since iMX6ULL is using a different spi driver ( drivers/spi/spi-imx.c ) as mentioned in ( arch/arm/boot/dts/imx6ul.dtsi ).
With the patch below you should be able to get the spidev devices you want. The colibri-spi-csx are symbolic links for the spidev0.x devices.