About problem of Rock960 board's I2C being not able to driven up

Recently our R&D team is evaluating Rock960 board. We encountered some problem of Camera integration. Currently our R&D progress is blocked at I2C being not able to driven up。 Even we are using official open-source code project and Devicetree file: rock960-model-ab-linux.dtb. The phenomenon is any enabled I2C bus, SDA SCLkeep low. If externally connect to pull-up circuit,SDA become high voltage,but SCL is still less than 0.2V.

Check dmesg, it reports: “rk3x-i2c ff120000.i2c: timeout, ipd: 0x00, state:1”

The code we downloaded is as below
repo init -u https://github.com/96rocks/manifests -m rock960.xml

Devicetree files:

rock960-model-ab-linux.dts

which hardware port are you using? i2c is available on both HS and LS connector.

Thank you for the reply. We are using i2c2 and i2c7. And I found only i2c0 which connects to PMIC is working.

on the rock960-model-ab-debian-lxde-armhf-20180814_2020.img firmware, we hooked up a eeprom, r/w is working fine.

root@linaro-alip:~# i2cdetect -r 7
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-7 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: 50 51 52 53 54 55 56 57 – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
root@linaro-alip:~# i2cset -y 7 0x50 0x02 0x20
root@linaro-alip:~# i2cget -y 7 0x51 0x02
0x20

Dear HipBoi,

Thank you for your reply and the test you did. It is really good news! I noticed the rock960-model-ab-debian-lxde-armhf-20180814_2020.img has been newly released.

But may I ask what code and device tree file is it based on? I am not sure where to find the source code to compare what is wrong with my previous load code.

Best Regards,
Sonia

You can refer the device tree here:

https://github.com/96rocks/kernel/blob/rock960-4.4-dev/arch/arm64/boot/dts/rockchip/rock960-model-ab-linux.dts

Still, I’m experiencing timeout issue on I2C7. Is it due to the absence of external Pull-up?

-Mani

I discussed the subject of i2c pull-up resistors with @Loic and @danielt a few months ago, and the conclusion we came to, is that the CE board specifications are ambiguous when it comes to the presence of i2c pull up resistors.

Which means that you need to be prepared to add the resistors on a case-by-case basis.

maybe you have to confirm the 2 questions:

if you haven’t designed the external pull-up on i2c7,you should configure pinctrl of i2c7 to be “pcfg_pull_up” in device tree like this:

   i2c7 {
           i2c7_xfer: i2c7-xfer {                                                                                   
                   rockchip,pins =
                           <2 8 RK_FUNC_2 &pcfg_pull_up>,
                           <2 7 RK_FUNC_2 &pcfg_pull_up>;
           };
   };

2.confirming the high/low level.rk3399 outputs high is 1.8v,low is 0v,so if the value is not equal to your device’s,you should add a component to switch the high/low level

Afraid so… base board designers have some “freedom” here which makes
testing tricky. A mezzanine board should typically select the weakest
possible pull ups the design allows since they could be combined with
pull ups that may or may not be included on the base board.

If they want to show off, make sure the pull ups are labelled on the
silkscreen so they can be easily located by someone with the schematic
if they encounter problems (removinng SMD resisters is relatively easy
by the standards of SMD board mods).