Non-Flash SPI
Has anyone had any experience using SPI channel 1 for connecting to things other than flash?

I've set-up my system to use the Armbian distro for Pine64SO.

There's a driver for spi compiled into the kernel, but it looks as if the hardware is disabled in the Device-Tree file (/boot/dtb/sun50iw1p1-pine64so.dtb) so that the pins can be used for UARTs 3 and 4.

I've modified the dtb file to disable these UARTs an enable SPI-1 (spi@01C69000), but when I reboot with this modified dtb file. The system fails to bring-up Ethernet. After modifying the logging system to store the logs somewhere persistent, it appears that there's a crash somewhere in sunxi_mdio_reset(), probably at the first time it accesses hardware. This seems a bit weird as the pins used by SPI channel-1 are not used by any of the Ethernet hardware. I'm wondering if there's some kind of interrupt or clock-speed conflict.

At the moment I'm trying to find a UART so that I can watch the console as it boots, but I wondered if anyone else had been down this road before.

Richard Crewe
Ah, as usual, the best way to solve a problem  is to describe it to someone else...

Since posting I saw this thread here

Comparing the dtb file for pine64so and pine64+, it looks as if the dtb file for the pine64so allocates an enormous area for the GMAC compared to the dtb file for pine64+. Reducing it, to the same size as pine64+, seemed to allow the system to boot correctly and now I have a spidev0.0 device node in /dev.

Richard Crewe

Possibly Related Threads…
Thread Author Replies Views Last Post
  128Mbit SPI flash uses bobpaul 0 1,318 05-04-2017, 05:41 PM
Last Post: bobpaul

Forum Jump:

Users browsing this thread: 1 Guest(s)