How to config the SPI work as slave

How to config the SPI work as slave?

For 4.9 kernel seems not support SPI slave mode, for mainline kernel seems support, you can check yourself.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/spi/spi-slave-system-control.c?h=v5.12-rc7