Verification of Yun documentation

"The SPI pins are also connected to the AR9331 gpio pins, where it has been implemented in software the SPI interface. This means that the ATMega32u4 and the AR9331 can also communicate using the SPI protocol."

Please see this at http://arduino.cc/en/Main/ArduinoBoardYun.

Make above statement true, we need have either kernel driver kmod-spi-tty-ds ... DogStick SPI TTY Driver or kmod-spi-gpio-custom ... Custom GPIO-based SPI device

kmod-spi-tty-ds is no longer exist after Yun software departure from Linino. kmod-spi-gpio-custom is required much newer kernel than 3.3.8 which Yun has.

How much newer?

3.10.44 has it.

It might start at 3.10.9 ?

https://dev.openwrt.org/browser/trunk/package/kernel/spi-gpio-custom/Makefile

trunk/package/kernel/spi-gpio-custom/Makefile
View diff against: 
View revision:  
Visit:  
Last change on this file was 37872, checked in by juhosg, 10 months ago
svn cat svn://svn.openwrt.org/openwrt/trunk/target/linux/ar71xx/Makefile@37872 |grep "LINUX_VERSION:="
LINUX_VERSION:=3.10.9

That module comes from a contribution from Marco Busato. On his website there is a precompiled module that I've just loaded on my yun. Can you give it a spin? http://randomcoderdude.wordpress.com/2013/08/15/spi-over-gpio-in-openwrt/

[quote author=Federico Fissore link=topic=254356.msg1800035#msg1800035 date=1405007233] That module comes from a contribution from Marco Busato. On his website there is a precompiled module that I've just loaded on my yun. Can you give it a spin? http://randomcoderdude.wordpress.com/2013/08/15/spi-over-gpio-in-openwrt/ [/quote]

I tried a while ago but failed. There are two catches;-

  1. There is level shift IC between CPU and MCU ( 2.5V to 5V) which has one enable pin connect with CPU's GPIO. To make SPI work need toggle CPU's GPIO.

  2. The parameters of spi-gpio-custom. I stuck here

Instead of read source code of kmod-spi-tty-ds, drop a line to your hardware person?

Could the params from avrdude work? https://github.com/arduino/openwrt-packages-yun/blob/master/utils/avrdude/files/avrdude.conf#L988-L1001

I will give it try.

Sonnyu, Did you ever get this to work?

I am able back port (hacking way) kmod-spi-gpio-custom to current version Yun OS (3.3.8, Attitude Adjustment) but since both Barrier Breaker and Chaos Calmer has it build in.

Use

make kernel_menuconfig

to turn it on.

Upgrade OS is the way to go.