Enabled SPI iMX6ULL

I managed to create the image by following the written procedure here:

OpenEmbedded (core) - Toradex System/Computer on Modules

and therefore understand how to insert it in the colibri module was not easy but I managed using tftp server and u-boot
I could no longer use Toradex easy installer because I had probably already corrupted the existing image.

However now I would like to know if possible with elementary explanations how to enable the SPI that is how to fill in the source and how to send it to the colibri

https://developer.toradex.com/knowledge-base/spi-(linux)

I’m using an ASTER demo board
In a nutshell I would be interested in a kernel where it can have enabled at least 2 spi and at least 2 uart, obviously compatible with the use of iMX6ULL WB (wifi and bt).
I thank you in advance who will be able to help me.
Thank you

Could you please provide DT source code files you’ve updated?

};

&ecspi1 {
	status = "okay";

	mcp258x0: mcp258x@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 = "disabled";
	};

	spidev0: spidev@0 {
		compatible = "toradex,evalspi";
		reg = <0>;
		spi-max-frequency = <10000000>;
		status = "okay";
	};
};

Could you also provide the compiled devicetree file (.dtb) and share the dmesg log in a file? Thanks.

https://drive.google.com/file/d/1LI1oVxXtk9VUCKApXdgGJwGdxxznG1wD/view?usp=sharing

hi @MaxMax

Thanks for the file. You need to flash the Wifi version of the device tree, since you have Wifi IT module.

Hello @jaski.tx I have used this version: https://git.toradex.com/cgit/linux-toradex.git/tag/?h=Colibri-iMX6ULL_LXDE-Image_2.8b5.156-20181228 to modify the Kernel and add SPI as shown above.
It is the only one which I have found that fits the device which I have that is the Colibri IMX6ULL.

Do I have to modify a different version or a different file?
I do not know what are you referring to when you are talking about WIFI IT module and how this can be linked with SPI.

Thank you for your time

Thank you!

You are welcome. So does this work now?

You can send me the sources of the .dtb that you sent me.
Also because I would like to understand how to enable / disable other spi, other uart etc.
Thanks

The sources are the same as on the server. The only change for SPI, I have done is the following:

diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
index 5605312..4be4940 100644
--- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
@@ -101,14 +101,14 @@
                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 = <23000000>;
-               status = "disabled";
+               status = "okay";
        };
 };

I have
modified to enable spi and compiled the file imx6ull-colibri-eval-v3.dtsi
then I tried to insert (dts) it in the form by following here:
https://www.toradex.com/community/questions/24677/device-tree-loading-colibri-imx7d.html

I managed with the “TEZI” method, replacing it in the original image and then reloading it into the system with Easy Installer
Unfortunately, the spi is not yet in / dev /
I checked and the original dts file is different from the one I created
I would like to understand why it does not work, is there anything else to do?
Thanks

You used the correct version. I just wanted to mention that as written here there are four standard device tree files (.dtb) for iMX6ULL. For the Wifi version, you need to build and use the ones with *wifi text in the name. Hence you need to build ( make imx6ull-colibri-eval-v3.dtb ) and flash imx6ull-colibri-eval-v3.dtb to the module. You can find an already compiled version with activated SPI here.

Best regards, Jaski

Thank Jaski,
I would like to understand however in which file to compile I write that the compiler “must choose” imx6ull-colibri-wifi-eval-v3.dtb and not imx6ull-colibri-eval-v3.dtb.
For example, in my case the colibri iMX6ULL WB module is installed on an ASTER demo board and not on a Colibri Eval demo board.
I noticed that there is a file called imx6ull-colibri-wifi-aster I have to use it, if so how?
Thank you and sorry for all the questions but I’m inexperienced

hi @MaxMax

Usually you can use imx6ull-colibri-(wifi)-eval-v3.dtb for the most functionalities of the Module, since we try to keep the same functionality on same Pins on our carrier boards and modules. For some special cases like capacitive touch adapter you need to compile and choose specific device tree for your board using the fdt_board variable in U-Boot.

Best regards, Jaski