orangepi-xunlong / orangepi-build

Orange Pi build for H2+, H3, H5, H6, H616, RK3328, RK3399 and RK3588(s)
http://www.orangepi.cn/
GNU General Public License v2.0
687 stars 289 forks source link

orange pi zero 2 no /dev/i2c-* #61

Closed DavidVorick closed 1 year ago

DavidVorick commented 1 year ago

I am trying to use the GPIOs on the Orange Pi Zero 2, specifically the i2c pins. When I look at /dev/, I see /dev/i2c-0 (which is for HDMI), but I do not see any other i2c options.

I read through the manual (https://linux-sunxi.org/images/7/72/OrangePi_Zero2_H616_User_Manual_v1.0.pdf) and set up wiringOP, but got stuck because it still could not find /dev/i2c-3 or /dev/i2c-5.

How do I configure the build so that I can use i2c?

leeboby commented 1 year ago

If the Linux5.16 image is used, please add overlays=i2c3 in /boot/orangepiEnv.txt.

orangepi@orangepi:~$ sudo vim /boot/orangepiEnv.txt
overlays=i2c3

There is no i2c5 for zero2 in 26pin.

DavidVorick commented 1 year ago

I am happy to confirm that this solved the issue for me, my i2c is now working as hoped.

Is there some place I should have looked in the documentation?

leeboby commented 1 year ago

https://drive.google.com/drive/folders/1ToDjWZQptABxfiRwaeYW1WzQILM5iwpb

图片

图片