range Pi 用户手册 深圳市迅龙软件有限公司版权所有
www.orangepi.cn 79 www.xunlong.tv
5) The setting method of other pins is similar, just modify the serial number of wPi to the
serial number corresponding to the pin.
3.24.2.
SPI interface test
1) The linux5.4 system turns off the spi controller in 40pin by default in the dts. If you
need to use spi, you need to open the spi configuration first. The linux3.4 system is
enabled by default and no additional configuration is required. The linux5.4 system The
opening method of spi is as follows:
a. According to the 40pin schematic diagram, the available spi for Orange Pi Pc
Plus is spi0
b. Then set overlays=spi-spidev in /boot/orangepiEnv.txt, set
param_spidev_spi_bus=0, where 0 means spi0
overlays=spi-spidev
param_spidev_spi_bus=0 #Modify to the corresponding spi bus number supported
by the development board
c. Then restart the system. When booting, you can see the configuration output of
SPI DT overlays in the boot log of u-boot
788 bytes read in 8 ms (95.7 KiB/s)
Applying kernel provided DT overlay sun8i-h3-spi-spidev.dtbo
4185 bytes read in 8 ms (510.7 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
d. After the system starts, if you can see the SPI device node under /dev, it means
the configuration is correct