SPI bus problem

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

SPI bus problem

Postby jrlitzenberger » Tue Nov 11, 2014 6:04 pm

I have been battling the wandboard quad C1 with kernel version 3.17.2-armv7-x3, Ubuntu 14.04 LTS, and u-boot 2014.07 dirty. Successfully, I can rebuild the kernel with changes to the imx6qdl-wandboard.dtsi for enabling peripherial access to /dev/... I can access spidev0.0 right now. I also have captured some interesting waveforms:
First waveform is spi bus spidev1.0 running on the beaglebone black rev B with kernel version 3.8.13-bone30, Ubuntu 13.10, and whatever U-boot that came with armhf image. I cannot paste a picture of the waveform apparently, but what I can say it that the spi bus acts accordingly. I send three bytes (address, data[0], data[1]). Chip select stays low for the entire duration of the transaction.

Second waveform is spi bus spidev0.0 running on the wandboard that i described earlier. With the same exact code, asside from the spidev change, I get incorrect results. I send the exact same three bytes like I did with the beaglebone black, but what I have lacked to capture over the past few days, is the chip select line. For every byte that goes across the spi bus, the chip select line goes low then back high. Just to make it clear, if I send a three byte transaction across the spi bus, I would expect the chip select line to stay low for the entire transaction. However, that is not the case. The spi bus chip select line toggles in between each byte that is sent across the bus. Obviously, this makes it impossible to talk to any spi device and also puts my development process in a screeching halt status.
I have put countless hours into understanding the kernel and build process just to wiggle some spi lines. I need guidance for solving this problem. Below are the changes I made to imx6qdl-wandboard.dtsi

&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio2 30 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
status = "okay";
spidev@1 {
spi-max-frequency = <24000000>;
reg = <0>;
compatible = "spidev";
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX6QDL_PAD_EIM_EB2__ECSPI1_SS0 0x000b1 /* CS0 */

If I were a betting man, I would say this is kernel driver issue. It seems like the big boys need to get involved in order to address this issue. Since I do not have anything better to do until I get a response, I am going to go ahead and try a different kernel build and see if I can validate my assumption.


John L.
Posts: 1
Joined: Tue Nov 11, 2014 5:41 pm

Re: SPI bus problem

Postby Tapani » Tue Nov 18, 2014 1:38 pm

How about trying some of the other kernels floating around?
The 3.0 is still the 'official' WB kernel, and the Yocto people have hacked up a 3.10.17 that seems to be in a decent shape.
Site Admin
Posts: 685
Joined: Tue Aug 27, 2013 8:32 am

Re: SPI bus problem

Postby ttwand » Thu Jan 26, 2017 7:10 am


I have wandboard quad.
I dont see spidev on /dev directory.
I checked User mode SPI device driver in kernel menuconfig.
But what do I have to do in device tree?

Can you suggest to me something?
Posts: 12
Joined: Fri Jun 10, 2016 6:37 am

Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 3 guests