Hello,
I am trying to work with SPI in my BPI M2Z. With Raspbian, I have no problems with SPI. With several ARMBIAN images, I do not see the SPIDEV port in /dev folder, I have try many things however nothing works.
With ‘lsmod’ I can see that the SPIDEV is loaded.
In the boot process I can see that the overlays a fixup script are loaded correctly:
Found mainline kernel configuration
34107 bytes read in 11 ms (3 MiB/s)
478 bytes read in 9 ms (51.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-cpu-clock-1.2GHz-1.3v.dtbo
374 bytes read in 10 ms (36.1 KiB/s)
Applying kernel provided DT overlay sun8i-h3-i2c0.dtbo
788 bytes read in 10 ms (76.2 KiB/s)
Applying kernel provided DT overlay sun8i-h3-spi-spidev.dtbo
502 bytes read in 11 ms (43.9 KiB/s)
Applying kernel provided DT overlay sun8i-h3-uart1.dtbo
502 bytes read in 11 ms (43.9 KiB/s)
Applying kernel provided DT overlay sun8i-h3-uart2.dtbo
502 bytes read in 10 ms (48.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-uart3.dtbo
504 bytes read in 10 ms (48.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost0.dtbo
504 bytes read in 10 ms (48.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost1.dtbo
504 bytes read in 10 ms (48.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo
504 bytes read in 10 ms (48.8 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost3.dtbo
4185 bytes read in 10 ms (408.2 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
I have finally found a solution. The solution is to use a old ARMBIAN version and not upgrade it.
Now, I am using the image: “Armbian_20.02.3_Bananapim2zero_bionic_current_5.4.18”
Now, SPI is working.
I can not upgrade this image because if I upgrade the OS, SPI will not work anymore. I have tested it.
Thanks
hello friend I had the same problem a while ago so I decided to create my own images based on ubuntu
Focal armbian 21.08.0
Kernel 5.15.25
If you like, you can download them from my git. I also made a script and step-by-step configuration of gpio pins so that you can use them. All i2c, spi, uart and gpio interfaces work.
you go to the download section and there are all these ubuntu base
others here I leave you the video that wase in case you do not understand the script very well.
Thank you for your work. It has been very useful for me. After testing the oficial Banana Pi Image, I began to use your images. I have seen your Youtube videos and follow your scripts. Very good job!
However, all my problems with SPI have been using your images. I have try several images with ARMBIAN. Finally, I used: Armbian_21.11.0-trunk_Bananapim2zero_focal_current_5.10.75_minimal 05-11-2021 and I configured it manually because your automatic script did’t work automatically. As I told you before, I had to change to an old ARMBIAN version in order to make SPI to work. Now, I am happy because I can control displays with the driver ILI9225.
Hello friend, I am glad that my work and the images have been useful to you and if you are right, by default in my script the spi is not enabled and I have not thought to show its function, but I am glad that it will be useful for you to configure and use the spi
Thanks! I’d tried this but it was still not working. I got it working by activating as you describe AND editing /boot/armbianEnv.txt and adding the entries: