I use RPI4 running Buster with my project, which is programmed in C, and everything has been working fine, eg SPI and I2C interface boards sending/receiving data. I have regularly updated the OS using the standard:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get clean
Today, 21-8-20, I have done the update as above and it shows the version as:
Linux version 5.4.51-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1333 SMP Mon Aug 10 16:51:40 BST 2020
I rebooted as required and to my dismay the SPI has stopped working - when I init SPI (SPI0_0 and SPI0_1) it gives errors. Nothing in my program has been changed. It works on the previous Linux version 4.x (which is was until today's update was done).
I have checked using sudo raspi-config to ensure that SPI (and I2C) are enabled, which they are. (Also, when I log in via SSH I sometimes get 'Wi-Fi is currently blocked by rfkill.' even though the WLAN country is set to GB, but that is not the issue I mention here.)
ll has been OK for yearsuntil today's update.
When I look in the /dev/ folder I see that /dev/spidev0.0 and /dev/spidev0.1 files are missing, which is the cause of the problem, even though 'dtparam=spi=on' is in 'config.txt'.
Info: to enable me to use my own CE lines (I have 4 SPI units on the RPI and will add more) to stop the CE0 and CE1 from operating, in my config.txt I have
which sets both CE0 and CE1 to an unused GPIO pin 26. I can then toggle my own defines CE lines. This has worked OK for years.
When I remove that line and reboot, the missing spi files, /dev/spidev0.0 and /dev/spidev0.1 appear in /dev/ (but then I naturally get clashes with my CEs.
When I add back in that overlay line, on reboot the /dev/spidev0.0 and /dev/spidev0.1 disappear again.
The recent update has stopped this working. Does anyone know of a workaround?