Power & Source of Big Ideas

Activate I2C-3- NanoPc-T4

Moderators: chensy, FATechsupport

HI everyone

I am working on the Nano PC - T4 with android 8 and Android 10 .
How can I activate the i2c3 form the source code?.

I implemented the following lines on the file
/path/Android/kernel/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi
&i2c3 {
status = "okay";
};

but on the pins GPIO4_C1/I2C3_SCL(3V) and GPIO4_C0/I2C3_SDA(3V) of the 40 Pin GPIO connector I dont have voltage and no signals.

Thank's
Do you have the correct permissions set in the .rc file?
Hi v8dave

I Added for permissions after the ‘on boot’ section in the following files:
o Files:
• device/rockchip/common/recovery/etc/init.rc
• device/rockchip/rk3399/init.rk3399.rc
• system/core/rootdir/init.rc


o Lines:
#Coffee-Electronics
chown system system /dev/i2c-2
chmod 777 /dev/i2c-2

#Coffee-Electronics
chown system system /dev/i2c-3
chmod 777 /dev/i2c-3

Note:
but I dont have any signal on i2c3.

Thank's
When you open the device in code, do you get a filehandle or -1?
Hi v8dave
thank you for your support.

the i2c3 port is working now

I had a mistake on the android java code. with the number assigned to the i2c port.

with the previous post it is more than enough to activate the i2c3 port.

best regards

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 4 guests