Page 1 of 1

Activate I2C-3- NanoPc-T4

Posted: Thu Mar 25, 2021 3:56 pm
by johan19rojas2021
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

Re: Activate I2C-3- NanoPc-T4

Posted: Tue Mar 30, 2021 1:49 am
by v8dave
Do you have the correct permissions set in the .rc file?

Re: Activate I2C-3- NanoPc-T4

Posted: Mon Apr 19, 2021 9:32 pm
by johan19rojas2021
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

Re: Activate I2C-3- NanoPc-T4

Posted: Tue Apr 20, 2021 12:39 am
by v8dave
When you open the device in code, do you get a filehandle or -1?

Re: Activate I2C-3- NanoPc-T4

Posted: Thu Apr 22, 2021 4:18 pm
by johan19rojas2021
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