NX Devkit - CAM_I2C doesn't work

Hello everyone,

I’m facing a problem with IMX219 (and also TC358743) and Jetson Xavier NX devkit.

I have connected an IMX219 (in fact two cameras, but problem is same with only one cam) to devkit using straight ribbon (pin 1 to pin 1 …), changing the DT with tegra194-p3668-all-p3509-0000.dtb (which include IMX219 bindings) but I have these messages in kern.log:

xavier-nx kernel: [ 5.104228] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
xavier-nx kernel: [ 5.104305] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
xavier-nx kernel: [ 5.104369] imx219 9-0010: board setup failed
xavier-nx kernel: [ 5.104463] imx219: probe of 9-0010 failed with error -121
xavier-nx kernel: [ 5.104992] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
xavier-nx kernel: [ 5.128227] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
xavier-nx kernel: [ 5.128291] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
xavier-nx kernel: [ 5.128335] imx219 10-0010: board setup failed
xavier-nx kernel: [ 5.128412] imx219: probe of 10-0010 failed with error -121

At boot time, if I probe the I2C signals (SCL and SDA) on J1 or J9, the signals are always at 3.3V.
Even if I manualy do i2cdetect or i2cget on bus 2, the result is same.

I have the same problem with the hdmi-2-csi bridge TC358743 (with custom driver and DT).

I already check the following points:

  • IMX219 or TC358743 isn’t in RESET state;
  • CAM_I2C_MUX (U11 on devkit) is not Power Down;
  • CAM_I2C_SEL is set to 0 when only one camera is connected and configured in DT;
  • Checking device-tree especially cam_i2cmux (in tegra194-camera-rbpcv2-imx219.dtsi), but it looks good;
  • Verifying that CAM_I2C is an alias for /dev/i2c2 (i2c@3180000) from DT;
  • i2cdetect -y -r 2 → nothing detected;
  • i2cget -y 2 0x10 0x00 (or i2cget -y 2 0x0f 0x00 for TC358743) → return an error;
  • pinmux(tegra19x-mb1-pinmux-p3668-a01.cfg) seems to be correctly configured : pins cam_i2c_scl_pp2 and cam_i2c_scl_pp3 are enabled.

So I think it’s maybe a problem from DT or pinmux config, because it’s not depending on device/camera connected to J1/J9.

I have no more ideas to investigate this problem …

Thanks for your help.

hello AurelienV,

  1. may I know which IMX219 module you’re using?
    there’s reference driver included; NX devkit should be able to support Raspberry Pi camera v2, IMX219.

  2. you may have implementation to enable your hdmi-2-csi bridge driver.
    could you please check similar discussion thread, Topic 143774 for reference.
    thanks

Hi JerryChang,

  1. Yes that’s the classic Raspberry Pi camera v2, as recommanded.

  2. I have a build a custom tc358743 driver in kernel, and also modify the Device-Tree to match devkit board configuration (i2c, mux, etc.).

It’s not a problem between hardware compatibility and kernel/DT configuration.
The problem is that CAM_I2C doesn’t work as expected.

In the DT (tegra194-p3668-all-p3509-0000.dtb), CAM_I2C should be working as a every I2C bus, so I should be able to do i2cdetect on bus 2 and receive device reponse from 0x10 (for IMX219) or 0x0f (for TC358743. But it’s not the case, why ?

NB: To overcome (temporarily) this problem, I use two jumper wires connected to GPIO extension header (J12 pins 3 and 5) and solder them on camera module on I2C SCL and SDA signals. It works with IMX219 and TC358743, but it’s not acceptable for my project.

Thanks

hello AurelienV,

let’s using separate discussion threads, since there’s built-in driver for IMX219 but not TC358743.
you may revise the title to track IMX219 issue here, creating another thread for TC358743.

FYI,
you should not have device tree changes for Raspberry Pi camera v2.
may I know what’s the modification you’d done, did it works with JetPack-4.4 release.
thanks

Ok, title was changed to “NX Devkit - CAM_I2C doesn’t work”. I think it’s more accurate regarding to my problem.

As I say since first post, I can’t see any device connected on CAM_I2C, so I can’t communicate with IMX219 to tune parameters.
I use last JP-4.4 release, L4T R32.4.3. I use the default Device-Tree (tegra194-p3668-all-p3509-0000.dtb) that I don’t modify at all.
So I try with stock kernel and Device-Tree for IMX219 but nothing is detected on /dev/i2c2@0x10, why?

hello AurelienV,

here’s camera device tree, NX enable cam_i2cmux for Raspberry Pi camera v2, IMX219 camera sensors.
$L4T_Sources/r32.4.3/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-camera-rbpcv2-imx219.dtsi

        cam_i2cmux {
                i2c_0:i2c@0 {
                        imx219_cam0: rbpcv2_imx219_a@10 {
                ...
                i2c_1: i2c@1 {
                        imx219_cam1: rbpcv2_imx219_c@10 {

had you have a try to reverse the FFC connection?
there’s I2C no acknowledge errors during your kernel init stages,

xavier-nx kernel: [ 5.104228] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
xavier-nx kernel: [ 5.104305] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
xavier-nx kernel: [ 5.104369] imx219 9-0010: board setup failed

could you please share the manufacturer of your IMX219 modules.
you may also check Topic 75042 for reference.
thanks

Hi,
the time sleep after reset(power-on) on imx219_power_on function is not enough. it’s working when i use 10ms.

Regards.