SPI on Raspbian/Debian BPI-M2

Dear All!

Could somebody tell me how to get SPI working on BPI-M2 board ? I’ve tried with Raspbian 4.0 (kernel 3.3 and 4.2 too) and Debian 8 (kernel 4.2) with same results:

gpio load spi
FATAL: Module spi-sun7i not found.
gpio: Unable  to load  spi-sun7i
  • lsmod says spidev is loaded.
  • I’m using the latest BPI-WiringPI

Thank You In Advance!

HI: you can try it .


Step 1: Please re-compiler M2-BSP. Change the following files, boot.fex , env.fex , and 3.3.0-BPI-M2-Kernel. ( [BPI M2] BPI-M2-BSP Updates,WiringPi supported )

(  commit 3387ff5728c87945ef0a4d0c1a9619c1f972e902)

Step 2: Go to github, Download WiringPi for M2.
( https://github.com/BPI-SINOVOIP/BPI-WiringPi/tree/BPI_M2 )

Step 3: Default I2C , SPI has been buildin. Maybe you can see this for reference. https://github.com/BPI-SINOVOIP/BPI-WiringPi/blob/BPI_M2/m2_test/ 52pi.c

Please use WiringPi directly.(No plugins and “gpio load spi” command are needed) We’ve successfully run SPI device.


EX: bananapi@BPI-M2:/dev$ ls spidev1.
spidev1.0 spidev1.1

Are these steps same if the M2 running Android 4.4 too?