PINE64
Is SPI Working? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32)
+---- Forum: POT modules (https://forum.pine64.org/forumdisplay.php?fid=8)
+---- Thread: Is SPI Working? (/showthread.php?tid=1297)

Pages: 1 2 3 4 5 6 7


RE: Is SPI Working? - xalius - 04-05-2017

Move to the tab with Nightly Releases on the Pine64 download page for the mainline images...


RE: Is SPI Working? - x893 - 04-05-2017

I download Nightly 4.10.0. After boot (w/o any overlays=) i see next messages

# lsmod|grep spi
spidev 20480 0

# dmesg | grep spi
[ 1.561446] sun6i-spi 1c68000.spi: could not find pctldev for node /soc/pinctrl@1c20800/spi0@0, deferring probe
[ 1.615170] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00
[ 1.615183] m25p80: probe of spi0.0 failed with error -2

#ls /sys/bus/spi/drivers/spidev -la
drwxr-xr-x 2 root root 0 Apr 5 10:19 .
drwxr-xr-x 6 root root 0 Apr 5 10:19 ..
--w------- 1 root root 4096 Apr 5 10:34 bind
lrwxrwxrwx 1 root root 0 Apr 5 10:19 module -> ../../../../module/spidev
--w------- 1 root root 4096 Apr 5 10:19 uevent
--w------- 1 root root 4096 Apr 5 10:19 unbind

but
# ls /dev/spi*
ls: cannot access '/dev/spi*': No such file or directory

also i try
# echo -n spi0.0 >/sys/bus/spi/drivers/spidev/bind
-bash: echo: write error: No such device

also i try add overlays= to uEnv.txt but nothing change for ls /dev/spi*


RE: Is SPI Working? - martinayotte - 04-06-2017

The issue is related to the fact that current DT is loading a "jedec,spi-nor" driver.
You will need to edit the main DT and remove the "spi-flash@0" section.
Then you will be able to load the overlay, but it need to be done in armbianEnv.txt, not uEnv.txt which doesn't exist in Armbian.

(Or wait few more days, until I'll fix the issue in future builds)


RE: Is SPI Working? - x893 - 04-06-2017

(04-06-2017, 08:04 AM)martinayotte Wrote: The issue is related to the fact that current DT is loading a "jedec,spi-nor" driver.
You will need to edit the main DT and remove the "spi-flash@0" section.
Then you will be able to load the overlay, but it need to be done in armbianEnv.txt, not uEnv.txt which doesn't exist in Armbian.

(Or wait few more days, until I'll fix the issue in future builds)

Thanks !
I'll wait some days.


RE: Is SPI Working? - martinayotte - 04-06-2017

In fact, I've done the tasks, it should be present in next nigthly build.


RE: Is SPI Working? - x893 - 04-10-2017

Perfect, download today and check.
Thanks !


RE: Is SPI Working? - x893 - 04-10-2017

Download mainline version.
Now /dev/spidev0.0 exists and open.
But not works with software from Raspberry Pi.
Read (or write) values not correct.


RE: Is SPI Working? - martinayotte - 04-12-2017

Which devices you are trying to communicate with ?
Which RaspberryPi software you are using ?


RE: Is SPI Working? - x893 - 04-14-2017

Hi,
i use iC880A hardware and lora-gateway software library
(http://github.com/lora-net/lora-gateway)
after connect via Visual Studio i can debug software but was busy some days so can see in depth at weekend.


RE: Is SPI Working? - louwie17 - 07-28-2017

@x893
Which os image are you using where the spidev shows up? I can't seem to get mine to show, and currently running the latest armbian image (5.30_Pine64_Ubuntu_xenial_default_3.10.105)