Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A64 => Topic started by: winfried on November 10, 2026, 12:30:43 AM

Title: SPI Bus on UEXT connector on A64 board; No /dev/spidev*
Post by: winfried on November 10, 2026, 12:30:43 AM
Want to drive the Olimex ADS1262 (ADC converter) on the UEXT connector,
on my A64-OLinuXino-2Ge8G-IND, running OLIMAGE with kernel 5.10.180-olimex:

running `olinuxino-overlay`and selecting "spi0-spidev.dtbo" and reboot did not bring up the "/dev/spidev0.0" .

With help of "GPT-6.1 Terra" I got a solution, I do not understand at all, so I ask here if this is a valid/good solution ?

Here the summary:
---

A64-OLinuXino: SPI overlay in uEnv.txt was added.

No /dev/spidev* device appeared, and both SPI controllers were still marked disabled in the running device tree.

What was wrong:

This image boots from a FIT image (/boot/kernel.itb). Although /boot/boot.cmd imports uEnv.txt, it does not apply the fdtoverlays list in the FIT boot path. The FIT configuration for my board included the I²C0 overlay, but not the SPI overlays.

Also, two SPI0 overlays are needed:

sun50i-a64-spi0.dtbo enables the SPI0 controller.
spi0-spidev.dtbo adds the userspace SPI device on chip select 0.
The spi0-spidev overlay alone does not enable its parent controller.

What worked:
I backed up /boot/kernel.itb and edited the FIT template at /usr/lib/olinuxino/kernel.its:

Added an image entry for spi0-spidev.dtbo.
Added both the existing SPI0 controller overlay and the new spidev overlay to the config-8861 FDT list, keeping the existing I²C0 overlay.
Rebuilt /boot/kernel.itb and rebooted.
After reboot, /dev/spidev0.0 appeared.

The practical lesson for this image is that adding overlays to uEnv.txt was not sufficient: they had to be included in the FIT configuration actually used to boot the board. The same issue may affect other overlays listed only in uEnv.txt, such as a DS3231 RTC overlay.
---

I remember years ago, it was working with the "olinuxino-overlay", so I am not sure this is the right fix.

mfg winfried

Appendix patch:
--- /usr/lib/olinuxino/kernel.its.before-spi    2026-06-30 10:45:19.000000000 +0100
+++ /usr/lib/olinuxino/kernel.its       2026-11-09 21:53:39.849073203 +0000
@@ -153,6 +153,19 @@
                             algo = "sha1";
                     };
                 };
+overlay-4 {
+    data = /incbin/("/usr/lib/olinuxino-overlays/sun50i-a64/spi0-spidev.dtbo");
+    type = "flat_dt";
+    arch = "arm64";
+    compression = "none";
+    load = <0x4FA40000>;
+    hash-1 {
+        algo = "crc32";
+    };
+    hash-2 {
+        algo = "sha1";
+    };
+};
         };
 
         configurations {
@@ -178,7 +191,7 @@
                         description = "Boot Linux kernel ${VERSION} with A64-OLinuXino-2Ge8G-IND";
                         kernel = "kernel-1";
                         ramdisk = "ramdisk-1";
-                        fdt = "fdt-3", "overlay-1";
+                       fdt = "fdt-3", "overlay-1", "overlay-2", "overlay-4";
                         compatible = "olimex,a64-olinuxino-2ge8g-ind";
                 };
cd /boot
sudo sh -c 'sed "s/\${VERSION}/$(uname -r)/g" \
  /usr/lib/olinuxino/kernel.its > /boot/kernel-spi-test.its'
sudo mkimage -f /boot/kernel-spi-test.its /boot/kernel-spi-test.itb
PS.: Will report when I also add the I2C DS3231 RTC2 Module to the same UEXT