Enable I2C-3 Interface
Since I2C-3 is occupied by the camera by default, it is necessary to comment out the camera's occupation in the device tree first. In this article, we take the SDK path /home/ubuntu/Luckfox-core3566/230920 as an example. Please perform the following steps according to your actual path.
1. Device Tree Section
Enter the device tree directory and modify the corresponding device tree file. Here, we take HDMI output as an example.
root@ubuntu:/home/ubuntu/Luckfox-core3566/230920/kernel/arch/arm64/boot/dts/rockchip# vim core3566-hdmi-lp4x-v1-linux.dts
Comment out the camera section.
Add the I2C-3 device tree.
root@ubuntu:/home/ubuntu/Luckfox-core3566/230920/kernel/arch/arm64/boot/dts/rockchip# vim core3566-base.dtsi
&i2c3 {
pinctrl-0 = <&i2c3m1_xfer>;
status = "okay";
};- The result should be as follows:
- The result should be as follows:
2. Compilation
After modifying the device tree, return to the SDK directory and compile the image.
./build.sh lunch
export RK_ROOTFS_SYSTEM=debian
./build.shUse a command to view I2C devices.