8,367
edits
Changes
→40 pin I2C test
<li><p>From the table below, the I2C available for Orange Pi 5 Plus is I2C2, I2C4, I2C5, and I2C8. There are four groups of I2C bus</p>
<p>[[File:media/image304.png|575x137px]]</p></li>
<li><p>The corresponding pins corresponding to the 4 group I2C bus are shown below. I2C2_M0 and I2C2_M4 can only be used at the same time, and they cannot be used at the same time. They are the same I2C2, but they only receive different pins. Please don't think that they are two different I2C2 bus</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''I2C bus'''
| style="text-align: left;"| '''No. 7 pin'''
|}
</ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>In the Linux system, the I2C bus in 40 PIN is closed by default, and it needs to be opened manually to use. The detailed steps are shown below:</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First add the following configuration in > '''/boot/extlinux/extlinux.conf'''.</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>[orangepi@orangepi ~]$ '''sudo vim /boot/extlinux/extlinux.conf'''</p>
<p>LABEL Orange Pi</p>
<p>LINUX /Image</p>
<p>FDT /dtbs/rockchip/rk3588-orangepi-5-plus.dtb</p>
<p>'''<span style="color:#FF0000">FDTOVERLAYS /dtbs/rockchip/overlay/rk3588-i2c2-m0.dtbo</span>'''</p>|}<p>The red font on the above demonstrates the configuration of the '''i2c2-m0'''. The other configurations are shown in the table below, and the corresponding dtbo configuration can be added behind '''<span style="color:#FF0000">FDTOVERLAYS</span>'''</p></li></ol></li></ol>
{| class="wikitable" style="width:800px;"
|-
| style="text-align: left;"| '''I2C bus'''
| style="text-align: left;"| '''/dtbs/rockchip/overlay/rk3588-i2c8-m2.dtbo'''
|}
</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>Then restart the '''<span style="color:#FF0000">OPi OS Arch</span>''' system</li></ol></li></ol>
<!-- -->
<ol start="4" style="list-style-type: decimal;">
<li><p>Then connect a I2C device on the I2C pin corresponding to the 40 PIN interface</p></li>
<li><p>Then use the '''i2cdetect -y''' command to detect the address of the connected i2c device, which means that the i2c can be used normally</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>[orangepi@orangepi ~]$ '''sudo pacman -S i2c-tools''' #First of all, I2C tools</p>
<p>[orangepi@orangepi ~]$ '''sudo i2cdetect -y 2''' #i2c2 test command</p>
<p>[orangepi@orangepi ~]$ '''sudo i2cdetect -y 4''' #i2c4 test command</p>
<p>[orangepi@orangepi ~]$ '''sudo i2cdetect -y 5''' #i2c5 test command</p>
<p>[orangepi@orangepi ~]$ '''sudo i2cdetect -y 8''' #i2c8 test command</p>|}</li></ol>
<span id="pins-uart-test"></span>
=== 40 Pin's UART test ===