How to setup camera device tree to use the J49 connector

Hi! Recently I made a CSI camera device tree and driver based on mainly the ov5693 and imx185 examples. They were working as long as I had the camera connected to the J13 connector. However, now I’ve managed to to fry the J13 connector, and so I would want to make it work on the J49 connector as well (or instead).

First I figured to use the “dual” device tree example of tegra210-porg-camera-rbpcv2-dual-imx219.dtsi and tegra210-camera-rbpcv2-dual-imx219.dtsi because I figured they used both the J13 and J49 connectors. But doing so populates both /dev/video0 and /dev/video1 when I connect the camera and enable the driver, which is weird. Furthermore I’m not able to capture any frames when I try it.

dmesg after I enable the driver is as follows:

[ 1804.466997] mlx75027 7-0057: probing v4l2 sensor.
[ 1804.467274] mlx75027 7-0057: tegracam sensor driver:mlx75027_v2.0.6
[ 1804.467286] vi 54080000.vi: subdev mlx75027 7-0057 bound
[ 1804.468297] mlx75027 8-0057: probing v4l2 sensor.
[ 1804.468544] mlx75027 8-0057: tegracam sensor driver:mlx75027_v2.0.6
[ 1804.468554] vi 54080000.vi: subdev mlx75027 8-0057 bound
[ 1805.498279] tegra-vii2c 546c0000.i2c: --- register dump for debugging ----
[ 1805.505227] tegra-vii2c 546c0000.i2c: I2C_CNFG - 0x22c00
[ 1805.510636] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 1805.517586] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL - 0xe0
[ 1805.523412] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS - 0x800070
[ 1805.529468] tegra-vii2c 546c0000.i2c: I2C_INT_MASK - 0xac
[ 1805.534937] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS - 0x0
[ 1805.540485] tegra-vii2c 546c0000.i2c: msg->len - 3
[ 1805.545327] tegra-vii2c 546c0000.i2c: is_msg_write - 1
[ 1805.550687] tegra-vii2c 546c0000.i2c: buf_remaining - 0
[ 1805.555967] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0057, data 0x61
[ 1805.563956] regmap_util_write_table_8:regmap_util_write_table:-110
[ 1805.570025] mlx75027 7-0057: Error writing mode
[ 1805.574588] vi 54080000.vi: calibration failed with -110 error

Further, trying to fetch frames using -d /dev/video1 as such
v4l2-ctl --set-fmt-video=width=80,height=60,pixelformat="RG12" -d /dev/video1 --stream-mmap --stream-count=64 --stream-to=out.raw --verbose

yields the following dmesg:

[ 1930.586208] tegra-vii2c 546c0000.i2c: --- register dump for debugging ----
[ 1930.593165] tegra-vii2c 546c0000.i2c: I2C_CNFG - 0x22c00
[ 1930.598607] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 1930.605569] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL - 0xe0
[ 1930.611399] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS - 0x800070
[ 1930.617469] tegra-vii2c 546c0000.i2c: I2C_INT_MASK - 0xac
[ 1930.622937] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS - 0x0
[ 1930.628485] tegra-vii2c 546c0000.i2c: msg->len - 3
[ 1930.633319] tegra-vii2c 546c0000.i2c: is_msg_write - 1
[ 1930.638494] tegra-vii2c 546c0000.i2c: buf_remaining - 0
[ 1930.643762] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0057, data 0x61
[ 1930.651650] regmap_util_write_table_8:regmap_util_write_table:-110
[ 1930.657705] mlx75027 7-0057: Error writing mode
[ 1930.662263] vi 54080000.vi: calibration failed with -110 error
[ 1931.053115] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 1031248 has been capped to VI's max BW 800000
[ 1931.586271] video4linux video1: frame start syncpt timeout!0
[ 1931.794280] video4linux video1: frame start syncpt timeout!0
[ 1932.002257] video4linux video1: frame start syncpt timeout!0
[ 1932.214267] video4linux video1: frame start syncpt timeout!0

Using -d /dev/video0 (which I wouldn’t expect to be working but anyways) instead gives the dmesg:

[ 1991.514335] tegra-vii2c 546c0000.i2c: --- register dump for debugging ----
[ 1991.521286] tegra-vii2c 546c0000.i2c: I2C_CNFG - 0x22c00
[ 1991.526709] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 1991.533635] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL - 0xe0
[ 1991.539447] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS - 0x800070
[ 1991.545506] tegra-vii2c 546c0000.i2c: I2C_INT_MASK - 0xac
[ 1991.550981] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS - 0x0
[ 1991.556505] tegra-vii2c 546c0000.i2c: msg->len - 3
[ 1991.561351] tegra-vii2c 546c0000.i2c: is_msg_write - 1
[ 1991.566528] tegra-vii2c 546c0000.i2c: buf_remaining - 0
[ 1991.571808] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0057, data 0x61
[ 1991.579771] regmap_util_write_table_8:regmap_util_write_table:-110
[ 1991.585848] mlx75027 7-0057: Error writing mode
[ 1991.590418] vi 54080000.vi: calibration failed with -110 error
[ 1991.936123] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 1031248 has been capped to VI's max BW 800000
[ 1992.954206] tegra-vii2c 546c0000.i2c: --- register dump for debugging ----
[ 1992.961144] tegra-vii2c 546c0000.i2c: I2C_CNFG - 0x22c00
[ 1992.966565] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 1992.973524] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL - 0xe0
[ 1992.979330] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS - 0x800070
[ 1992.985437] tegra-vii2c 546c0000.i2c: I2C_INT_MASK - 0xac
[ 1992.990954] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS - 0x0
[ 1992.996510] tegra-vii2c 546c0000.i2c: msg->len - 3
[ 1993.001351] tegra-vii2c 546c0000.i2c: is_msg_write - 1
[ 1993.006549] tegra-vii2c 546c0000.i2c: buf_remaining - 0
[ 1993.011842] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0057, data 0x61
[ 1993.019776] regmap_util_write_table_8:regmap_util_write_table:-110
[ 1993.025848] mlx75027 7-0057: Error writing mode

I’m a bit confused also, since in tegra210-porg-camera-rbpcv2-dual-imx219.dtsi you can find the field
i2c-parent = <&i2c7>;
and it feels obvious that i2c8 should be used for the J49 connector, however that label doesn’t exist.

So how do I use the J49 connector?

Thank you

Does connect to J13 get the same I2C error?

Thanks for your reply!

So the J13 on my board is dead, so I can’t check. I think a transient from the camera PSU fried it somehow.

So I noticed that I had missed to update the tegra_sinterfacefields for all nodes. I fixed that, but I still have the same issue. The dmesg has changed a little though:

[  833.371844] tegra-vii2c 546c0000.i2c: --- register dump for debugging ----
[  833.379300] tegra-vii2c 546c0000.i2c: I2C_CNFG - 0x22c00
[  833.385068] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[  833.392146] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL - 0xe0
[  833.397974] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS - 0x800070
[  833.404239] tegra-vii2c 546c0000.i2c: I2C_INT_MASK - 0xac
[  833.409717] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS - 0x0
[  833.415221] tegra-vii2c 546c0000.i2c: msg->len - 3
[  833.420026] tegra-vii2c 546c0000.i2c: is_msg_write - 1
[  833.425171] tegra-vii2c 546c0000.i2c: buf_remaining - 0
[  833.430404] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0057, data 0x61
[  833.438827] regmap_util_write_table_8:regmap_util_write_table:-110
[  833.444974] mlx75027 7-0057: Error writing mode
[  833.449559] vi 54080000.vi: calibration failed with -110 error
[  834.423488] video4linux video1: frame start syncpt timeout!0
[  834.631564] video4linux video1: frame start syncpt timeout!0
[  834.839540] video4linux video1: frame start syncpt timeout!0

I can also add that mlx75027 7-0057: Error writing mode shouldn’t be an issue, since the “correct” camera entry is mlx75027 8-0057.

Now I’ve tried with another Jetson Nano with working J13 and J49 connectors, and connecting the sensor to J13 doesn’t work either.

Enabling the driver dmesg:

[  385.934149] mlx75027 7-0057: probing v4l2 sensor.
[  385.934510] mlx75027 7-0057: tegracam sensor driver:mlx75027_v2.0.6
[  385.934523] vi 54080000.vi: subdev mlx75027 7-0057 bound
[  385.935711] mlx75027 8-0057: probing v4l2 sensor.
[  385.935937] mlx75027 8-0057: tegracam sensor driver:mlx75027_v2.0.6
[  385.935947] vi 54080000.vi: subdev mlx75027 8-0057 bound
[  386.268787] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x57
[  386.275908] regmap_util_write_table_8:regmap_util_write_table:-121
[  386.281980] mlx75027 8-0057: Error writing mode
[  386.286552] vi 54080000.vi: calibration failed with -121 error

Trying to fetch frames dmesg:

[  789.144023] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x57
[  789.150803] regmap_util_write_table_8:regmap_util_write_table:-121
[  789.156879] mlx75027 8-0057: Error writing mode
[  789.161448] vi 54080000.vi: calibration failed with -121 error
[  789.690577] video4linux video0: frame start syncpt timeout!0
[  789.898509] video4linux video0: frame start syncpt timeout!0
[  790.106529] video4linux video0: frame start syncpt timeout!0

Any suggestion of what I can try next?

What the v4l2-ctl --list-devices shows

It turns out that the camera-side CSI connection had been destroyed as well. Another identical camera with the other Jetson Nano works perfectly with both J13 and J49.

However, it seems that both J13 and J49 was destroyed on the first Jetson Nano, because the new sensor doesn’t work on that one either.

Is there a way to try and “reset” anything related to the camera capture? Otherwise I believe that that Nano is retired.

You can try to connect by reworking like wire jump instead of the camera connector.

I’m afraid I don’t follow. Do you mean trying to remove the camera connector, and attach the camera cable to the pads?

Since both the J13 and J49 has the CSI issue, I suspect it doesn’t lie with the connectors but in some IC they have in common maybe?

It would be better get HW guide to help to check it.