Jump to content

Recommended Posts

Posted

Board: NanoPi NEO Air
SoC: Allwinner H3 (sun8i platform)
Armbian Release: Bookworm (Debian 12 base) - Tested with both beta and stable repositories.

 

Problem Description:
The SPI device node (/dev/spidev0.0) does not get created on Armbian Bookworm for the NanoPi NEO Air, preventing the use of SPI peripherals. This issue occurs despite correctly enabling the sun8i-h3-spi-spidev overlay in /boot/armbianEnv.txt.

 

Diagnosis / Root Cause:
Through troubleshooting, it was determined that the essential kernel module required for the Allwinner SPI controller, spi-sunxi.ko, is missing from the standard kernel image packages provided by Armbian for Bookworm on this platform.

Affected Kernels / Repositories Tested:

 

- current branch:

Kernel version: 6.12.23-current-sunxi (Package: linux-image-current-sunxi 25.5.0-trunk.496)

Tested using both beta and stable (apt.armbian.com) repositories after reinstall attempts.

Result: spi-sunxi.ko module missing. modprobe spi_sunxi fails ("Module not found").

- legacy branch:

Kernel version: 6.6.75-legacy-sunxi (Package: linux-image-legacy-sunxi)

Tested using both beta and stable (apt.armbian.com) repositories after reinstall attempts.

Result: spi-sunxi.ko module missing.

 

Evidence:

1. Overlay Configuration: /boot/armbianEnv.txt contains overlays=sun8i-h3-spi-spidev.

2. Overlay File Presence: The compiled overlay file /boot/dtb-KERNEL_VERSION/overlay/sun8i-h3-spi-spidev.dtbo is present for both current and legacy DTB packages.

3. Missing Module Confirmation (find command):

# Tested on both 6.12.23-current-sunxi and 6.6.75-legacy-sunxi after reinstalling linux-image-* packages
find /lib/modules/$(uname -r) -name spi_sunxi.ko
# (Command produces NO output)

 

4. Missing Module Confirmation (dpkg -L): (Example for legacy kernel, same result for current)

uname -r
# Output: 6.6.75-legacy-sunxi

dpkg -L linux-image-legacy-sunxi | grep -i spi
# Output shows spidev.ko and other SPI modules, but NOT spi-sunxi.ko:
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/net/dsa/b53/b53_spi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/net/dsa/microchip/ksz_spi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/nfc/nfcmrvl/nfcmrvl_spi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/nfc/st-nci/st-nci_spi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-cadence-xspi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-dln2.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-fsi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-microchip-core-qspi.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-microchip-core.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-mux.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-mxic.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spi-sifive.ko
# /lib/modules/6.6.75-legacy-sunxi/kernel/drivers/spi/spidev.ko

 

5. Device Node Missing:

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

 

Expected Outcome:
The linux-image-{current,legacy}-sunxi packages should include the spi-sunxi.ko module for the sun8i (Allwinner H3) platform. When the appropriate overlay is enabled, the kernel should load this module, and the /dev/spidev0.0 device node should appear, allowing SPI communication.

 

Request:
Could the Armbian team please investigate why the spi-sunxi.ko module is not included in the Bookworm kernel packages for the sun8i platform and restore it in a future build?

 

Thank you!

Posted (edited)

Hi Lucas,

 

In the /boot/armbianEnv.txt where you have the line "overlays=sun8i-h3-spi-spidev, you do not need the sun8i-h3 bit. I think it is a problem with how the current version of armbian-config adds overlays. Even though the actually name of the overlay would be sun8i-h3-spi-spidev.dtbo, the armbianEnv.txt only needs the interface name which in this case is spi-spidev.  To the best of my knowledge there is no general spi-sunxi module, only spi-sun4i and spi-sun6i. The H3 is compatible with the spi-sun6i driver.

Edited by Ryzer

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines