SPIDEV not working on Colibri IMX6ULL

Hello,

I’m trying to get spidev working on a Colibri IMX6ULL. I’ve patched imx6ull-colibri-eval-v3.dtsi which results in:

&ecspi1 {
	status = "okay";

	mcp2515: can@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>;
		vdd-supply = <&reg_3v3>;
		xceiver-supply = <&reg_5v0>;
		status = "disabled";
	};

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

However, when I boot the image I don’t have a /dev/spidev. I have a /sys/bus/spi/devices/spi0.0 though.

dmesg | grep spi shows:

[   13.927919] platform 2008000.spi: deferred probe pending

I’m using a Colibri Evaluation Board V3.2B. The BSP is 6.2

What am I doing wrong?

Regards, Ron

Hi,

I have the same issue, everything works fine with BSP3 but not BSP6

I do not have the ‘deferred probe’ issue … i have found this is usually when a pin is being used for something else already

I have also tried to enable SPI3

&ecspi3 {
status = “okay”;
spidev2: spidev@2 {
compatible = “toradex,evalspi”;
reg = <0>;
spi-max-frequency = <23000000>;
num-chipselects = <0>;
status = “okay”;
};
};

but get the following error when building the dtb file

Warning (spi_bus_reg): /soc/bus@2000000/spa-bus@2010000/spidev@2: SPI bus unit address format error, expected “0”

I have taken a look at the example overlay and changed my device tree to

&ecspi1 {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;

spidev@0 {
	/* Use compatible "rohm,dh2228fv" to bind spidev driver */
	compatible = "rohm,dh2228fv";
	reg = <0>;
	spi-max-frequency = <23000000>;
};

};

and ‘spidev0.0’ appeared in /dev

The interface then worked

I still have an issue trying to get SPI2 to work thou

Hi @rondegroot ,

Just to be sure, is your Colibri iMX6ULL the eMMC version? If it is then you can apply a device tree overlay to enable SPIDEV:

If it isn’t you can take a look at our spidev overlay source file and change the device tree based on it (the master branch should be good for BSP 6):

Best regards,
Lucas Akira

Thanks,

compatible = “rohm,dh2228fv”; did solve my issue.

Regards, Ron

Glad I was able to help!

Best regards,
Lucas Akira