How do you enable SPI on the M4 zero? I’ve tried a number of different combinations of things and can’t get an SPI device to show up in /dev.
Here are the things I’ve tried:
- adding “spi-spidev” to “overlays”. Also added “param_spidev_spi_bus=0”. Also tried adding “spidev0_0”. None of that worked. On the M2 zero, the “spi-spidev” and the “param…” line was all that was required. Also tried modprobe’ing spidev after each of these.
- This link gives instructions for a generic M4, but it doesn’t seem to work on the zero. However, I dug through the dtb and found a command which didn’t error out and seemed to do what the other command was trying to do:
fdtput -t s /boot/dtb/allwinner/sun50i-h618-bananapi-m4-zero.dtb /soc/spi@5010000 status okay
However, again, with any combination of overlays above, this did not work. However, it did give the following error in dmesg:
sun50i-h616-pinctrl 300b000.pinctrl: pin PC0 already requested by 5010000.spi: cannot claim for 4022000.mmc
So, I’m not really sure what is happening here, or how to get SPI enabled on the M4 Zero. Any ideas?