Is SPI Working?
#41
(02-23-2017, 03:36 PM)milekium Wrote: any update about spi? I can't see /dev/

This entire thread is an update on SPI.

...  can't see /dev/   !?!

1) open a terminal

2) cd  /dev

3) ls -l |less

... use F and B  to scroll forward and backward through your /dev/ devices;  press q to exit.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#42
Thanks for replay, sorry I didn't explain myself(late night and frustrated).
I install new armbian image and follow the thread as far as my knowledge allow me, but still can't see anything on "ls /dev/spi*", so I guess I missing something or spi just don't work, ???.has anyone use spi with pine64?

I read a forum about CHIP board (also Allwinner chip) and problems with spi (https://bbs.nextthing.co/t/solved-enable...hip/849/10), they suggest further modifications of dtb, like adding "compatible = "spidev";".. and succeed to make it work. I may try that board.

ok, following this changes:
status = "okay";
pinctrl-0 = <0xa7 0xa8>;
spidev@0 {
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <0x2faf080>;
};
now I get :
ls /dev/sp*
/dev/spidev0.0
Didn't try if it works, but now I need to celebrate it appears!!
  Reply
#43
With the latest Armbian, /dev/spidevX.X are enabled using overlay. Simply add "overlays=sun8i-h3-spi0-spidev" into /boot/armbianEnv.txt.

And to test if it is actually working, there a piece of code on the net which is named "spidev_test.c" to test loopback of MOSI/MISO.

Example :
Code:
./spidev_test -D /dev/spidev1.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D
  Reply
#44
Thanks!! It works nice.
  Reply
#45
Thanks a lot martin, I knew you added an overlay but I missed the name for it...
Come have a chat in the Pine IRC channel >>
  Reply
#46
Hi,
i use PINE64 (512Mb) and Armbian server Debian Jessie 3.10.104
Simply add
overlays=sun50iw1p1-pine64.dtb
to /boot/armbianEnv.txt
but /dev/spi* not presents after reboot.
Can anybody say right way ?

Thanks
  Reply
#47
Your overlays=... line is a whole devicetree for the Pine64 which already gets loaded for your board, you only need a SPI overlay, see above in martin's post:

overlays=sun8i-h3-spi0-spidev

(A64 shares a lot of the peripherals with H3, it is basically a H3 with upgraded cores...)
Come have a chat in the Pine IRC channel >>
  Reply
#48
Thanks for your reply but unsuccessfull
My /boot/uEnv.txt

console=tty0 console=ttyS0,115200n8 no_console_suspend
kernel_filename=pine64/Image
initrd_filename=initrd.img
ethaddr=36:c9:e3:f1:b8:05
overlays=sun8i-h3-spi0-spidev

also sudo find . -name 'sun8i-h3-spi0-spidev.*' not found this file
  Reply
#49
Ah I just saw you don't use an Armbian mainline image! I think overlays only work with the mainline kernel images...
Come have a chat in the Pine IRC channel >>
  Reply
#50
i can install any image (i try dietpi, ubuntu) but mainline not available for this board.
https://www.armbian.com/pine64/
previously i use raspberry and no problem with spidev
Looks as nobody use SPI on pine64 Sad
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  touch screen not working mike280z 1 2,074 12-22-2016, 12:46 PM
Last Post: Bluphire
  RaZberry Module (z-wave) need support to get it working! Luxus 13 9,715 11-03-2016, 02:04 AM
Last Post: Luxus

Forum Jump:


Users browsing this thread: 1 Guest(s)