Is there an SD card image with SPI enabled ?

This is the place for software discussions not having a dedicated subforum

Is there an SD card image with SPI enabled ?

Postby DCA » Tue Mar 15, 2016 4:46 pm

Hi all, is there on the official wandboard website, an SD card image with a functional SPI bus ?

If no, where can i find a procedure for compiling my own kernel with a spi bus enabled.

Thx
DCA
 
Posts: 3
Joined: Tue Mar 15, 2016 4:42 pm

Re: Is there an SD card image with SPI enabled ?

Postby Richard » Thu Mar 17, 2016 3:19 am

Hello, DCA:

Please try ubuntu-14.04-lxde-20150511, and it uses linux 3.10.53 kernel :
http://www.wandboard.org/images/downloa ... 150511.zip

There is silicon bug in SPI DMA of i.mx6. We found the data isn't updated in SPI transmission with enabled DMA.
Other users also figure out the silicon issue:
https://guruce.com/blogpost/freescale-i ... ilicon-bug

Our workaround is to disable DMA of SPI in linux 3.10.53, and this patch isn't included in ubuntu-14.04-lxde-20150511.zip:
https://github.com/wandboard-org/linux/ ... 03b8e9800c

Please follow the steps to update kernel:

1. Download wandboard linux 3.10.53 source code:
git clone git@github.com:wandboard-org/linux.git
git checkout -b wandboard_imx_3.10.53_1.1.0_ga origin/wandboard_imx_3.10.53_1.1.0_ga

2. Download toolchain:
wget http://releases.linaro.org/14.11/compon ... ihf.tar.xz
tar xvf gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz -C /opt

3. Export environment variables and compile kernel:
export PATH=$PATH:/opt/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
cd linux_3.10.53_source_code
make wandboard_defconfig
make menuconfig
-------------------------------------
Device Drivers
│ -> MXC support drivers
│ -> MXC Vivante GPU support -> select (v3.10.17)
-------------------------------------
make -j8

4. Replace kernel and dtb in ubuntu SD card
Insert ubuntu SD card into host PC.
sudo mount /dev/sdX1 /mnt/temp
sudo cp arch/arm/boot/zImage /mnt/temp/boot/
sudo cp arch/arm/boot/dts/*-wandboard.dtb /mnt/temp/boot/
sudo umount /mnt/temp/


The SPI speed isn't so good without DMA, we can just measure ~900kB/s full duplex per bus. :|

BR,

Richard
Last edited by Richard on Thu Mar 17, 2016 5:46 am, edited 2 times in total.
Richard
Site Admin
 
Posts: 134
Joined: Tue Dec 17, 2013 6:57 am

Re: Is there an SD card image with SPI enabled ?

Postby DCA » Thu Mar 17, 2016 5:23 am

OK I'll try, this thanks a lot !!

Regards

David
DCA
 
Posts: 3
Joined: Tue Mar 15, 2016 4:42 pm

Re: Is there an SD card image with SPI enabled ?

Postby DCA » Mon Apr 04, 2016 3:41 pm

Hi, i've tried your sdcard Image but there is no spidev in /dev directory.
I've tried the sdcard image without zImage modification and tried with the procedure you gave me, but nothing in /dev directory.

Have you an idea ?

Regards

David
DCA
 
Posts: 3
Joined: Tue Mar 15, 2016 4:42 pm

Re: Is there an SD card image with SPI enabled ?

Postby Richard » Thu May 19, 2016 2:04 am

Hello, DCA:

By default, there is no spidev node in wandboard device tree file (imx6qdl-wandboard.dtsi) .

Please add spidev node in imx6qdl-wandboard.dtsi as follows:
Code: Select all
&ecspi1 {
    fsl,spi-num-chipselects = <1>;
   cs-gpios = <&gpio2 30 0>; /* EIM_EB2 */
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi1>;
   status = "okay";

        spidev@0 {
        compatible = "rohm,dh2228fv";
        spi-max-frequency = <10000000>;
        reg = <0>;
        };
};


and enable kernel configuration:
Code: Select all
Symbol: SPI_SPIDEV [=n]
  │ Type  : tristate
  │ Prompt: User mode SPI device driver support
  │   Location:
  │     -> Device Drivers
  │ (1)   -> SPI support (SPI [=y])


BR,

Richard
Richard
Site Admin
 
Posts: 134
Joined: Tue Dec 17, 2013 6:57 am

Re: Is there an SD card image with SPI enabled ?

Postby blue_z » Sun May 22, 2016 11:03 pm

Richard wrote:Please add spidev node in imx6qdl-wandboard.dtsi as follows:
Related topic: http://forums.wandboard.org/viewtopic.php?f=8&t=1222
blue_z
 
Posts: 36
Joined: Sat Jun 13, 2015 12:12 am
Location: USA


Return to Software - General

Who is online

Users browsing this forum: No registered users and 4 guests

cron