range Pi 用户手册 深圳市迅龙软件有限公司版权所有
www.orangepi.cn 82 www.xunlong.tv
by default and no additional configuration is required. The linux5.4 system The opening
method of i2c is as follows
a. According to the 40pin schematic diagram, the i2c available for Orange Pi Pc
Plus are i2c0 and i2c1
b. Then set overlays=i2c0 i2c1 in /boot/orangepiEnv.txt to open the configuration
of i2c0 and i2c1 at the same time
overlays=i2c0 i2c1
c. Then restart the system. When starting, you can see the configuration output of
I2C DT overlays in the u-boot startup log
Found mainline kernel configuration
29940 bytes read in 6 ms (4.8 MiB/s)
374 bytes read in 8 ms (44.9 KiB/s)
Applying kernel provided DT overlay sun8i-h3-i2c0.dtbo
374 bytes read in 8 ms (44.9 KiB/s)
Applying kernel provided DT overlay sun8i-h3-i2c1.dtbo
d. After the system is started, if there are two more i2c device nodes under /dev, the
configuration is correct
root@orangepi:~# ls /dev/i2c*
/dev/i2c-0 /dev/i2c-1 /dev/i2c-2 /dev/i2c-3 /dev/i2c-4
e. The corresponding relationship of different i2c device nodes is shown below,
where