How to enable SPI on BPI Zerro M2

Hi, I have just got a bpi zero m2 and I managed to run Raspbian Stretch, kernel version: 3.4.113-BPI-M2Z-Kernel I am trying to enable SPI in order to work with an rfid (rc522) but nothing is working so far… Can anybody please help with this?

Thanks you!

Hello. I am working on this too. We need to compile the kernel extension for this. Work has been done for bpi r2. I am trying to adapt it. Anyone did maybe try this and would like to share ongoing work ?

I first tried Centos 7, then moved to Fedora 31 with BPi M2 Zero. Both boot nicely with added uboot bootloader, but features (additional uarts, spi, i2c) are mostly disabled and things like config.txt have no effect.

I’ll need camera and 2 free uarts (+ preferably console). I got the uarts working by recompiling the whole device tree (sun8i-h2-plus-bananapi-m2-zero.dtb) with additional uarts added manually. This is, however, not sustainable as a Fedora update likely wipes this out at some point.

Looking at uboot mainline source I could not decipher whether uEnv.txt or some other kind config.txt-like system would work for overlays. boot.scr also sounds kinda ancient. Sunxi does provide overlays though, such as

sun8i-h3-uart1.dtbo sun8i-h3-uart2.dtbo sun8i-h3-uart3.dtbo

But I have no idea where to configure them in.

… now move to Armbian for this board https://github.com/armbian/build (you need to build image since its not officially supported) and everything what exists in mainline + a lot more will work.