Jetson TK1 Trouble with I2C and USB 3.0

Hi everyone !

We are using a Jetson TK1 with L4T 21.3 and the grinch kernel. We create a board to interface a LIDAR Lite on I2C port 0 (Pin 21 an Pin 23 J3A1) with a level shifter. Evething worked find but yesterday we encountered severals issues :

1 - Our I2C port (I2C 0) doesn’t work and it is very slow when we uses the command : sudo i2cdetect -y -r 0 (to detect I2C device). This problem occur when the device is connected or not.
However, this command is very quick with other I2C port.
Our device is using 3V3 but we added a level shifter to use it at 1V8.

-> We suppose that the I2C port 0 is broken. Is there a way we can check?
-> We are wondering if shortcut might have happened between our 3V3 suply line and the SCL line (Pin 21 J3A1)

2 - As a result, the USB 3.0 now doesn’t work. But when we switch it in 2.0 (in the .conf file) it is working again.

3 - When the jetson boot, the system try to use the I2C port 0 and fail, which has an impact on the speed of the booting process.
The following message appeared several time :

Jan  1 00:01:26 tegra-ubuntu kernel: [    8.634012] tegra-i2c tegra12-i2c.0: --- register dump for debugging ----
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.649992] tegra-i2c tegra12-i2c.0: I2C_CNFG - 0x2c00
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.659603] tegra-i2c tegra12-i2c.0: I2C_PACKET_TRANSFER_STATUS - 0xff0001
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.670907] tegra-i2c tegra12-i2c.0: I2C_FIFO_CONTROL - 0xe0
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.680932] tegra-i2c tegra12-i2c.0: I2C_FIFO_STATUS - 0x800070
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.691161] tegra-i2c tegra12-i2c.0: I2C_INT_MASK - 0xec
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.700692] tegra-i2c tegra12-i2c.0: I2C_INT_STATUS - 0x0
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.710304] tegra-i2c tegra12-i2c.0: msg->len - 3
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.719175] tegra-i2c tegra12-i2c.0: is_msg_write - 1
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.728384] tegra-i2c tegra12-i2c.0: buf_remaining - 0
Jan  1 00:01:26 tegra-ubuntu kernel: [    8.737513] tegra-i2c tegra12-i2c.0: i2c transfer timed out, addr 0x001c, data 0x00

4 - We try to re flash the Jetson TK1 with Jetpack but every time, we encountered this error message :

downloading bootloader -- load address: 0x83d88000 entry point: 0x83d88000
download command failed NvError 0x120002
command failure/warning: bootloader download failed (bad data)

Failed flashing ardbeg

5 - Hopefully the Jetson is still working and ubuntu is booting but the desktop has a hard time booting. After that, everything works perfectly.

We could use a different I2C port but we really need the USB 3.0. How can we fixe it ?
Can we diseable the I2C port 0 to accelerate the booting process ?
How can we re-flash the jetson ?

I don’t know much about i2c, but if you have an oscilloscope you should be able to see 3.3V waveforms (or 1.8V on the level shifter)…you could compare to other i2c ports to see what the waveform might look like during i2cdetect. Do you have an oscilloscope (i2c speeds are not particularly demanding, even a less expesive oscilloscope would probably be useful)?

The NvError 0x120002 is listed as “packet was nacked”. Something requiring being acknowledged during flash was not…it’s kind of a vague message. I don’t know if this implies hardware failure or perhaps it is a corrupt flash image (I believe the fastboot.bin would be to blame if it is a software issue…this is used for flash even when using u-boot). What was your exact flash command line?

About USB2 versus USB3…there are different controllers and different ports. Changing from USB2 to USB3 and back could conceivably switch between a good hardware combination and a bad hardware combination (the switch between speeds is not entirely software-based). If the problem is hardware, then there will be no way to fix the USB3…I’m leaning towards believing this is a hardware issue.

Thank you Linuxdev

After a couple of test with an oscilloscope, we concluded than our I2C bus 0 is broken. There is a constant voltage level at 0.3V during i2cdetect

This hardward issue could explain the provenance of flashing problem. As we can see in this page http://elinux.org/Jetson/I2C, the eeprom uses the I2C port 0 (GEN1_I2C). So, if it is broken, we can’t read or write the eeprom memory and flash the Jetson. Am I right ?

The eeprom seems to be used for the board id as we can see in this figure
http://elinux.org/File:Table_I2C-ADDRESS-MAP.png

But I don’t understand why the USB 3 doesn’t work.

Is there a way to flash the Jetson witout using the eeprom ?

If Jetson networking is up, you could use rsync, but this is not a true flash and only deals with rootfs. You could even plug in a SATA drive and check rsync to the SATA drive first (you would need to add an extra entry to /boot/extlinux/extlinux.conf).

The hardware for USB3 port is separate from USB2 port. Routing changes depending on USB2/USB3 settings…so it is easy for USB3 port to fail while USB2 mode still works.

You can also put an oscilloscope on the D+/D- of the USB connector and monitor traffic…although something in USB3 mode would require a very very fast oscilloscope (or a USB3 protocol analyzer).