Migration of MIPI camera from Jetson Nano to Jetson xavier nx

Hi,
We have been using the mipi camera (ar1335) on our Jetson Nano with custom carrier board. We would like to migrate to Xavier Nx. I have modified the device tree.
Device topology

  • entity 1: 15a00000.nvcsi–2 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    pad0: Sink
    ← “ar1335 9-0042”:0 [ENABLED]
    pad1: Source
    → “vi-output, ar1335 9-0042”:0 [ENABLED]

  • entity 4: ar1335 9-0042 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev1
    pad0: Source
    [fmt:UYVY8_1X16/640x480 field:none colorspace:srgb]
    → “15a00000.nvcsi–2”:0 [ENABLED]

  • entity 6: vi-output, ar1335 9-0042 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    ← “15a00000.nvcsi–2”:1 [ENABLED]

We are using L4T 32.4.3.
camera is connected to CSI0 lanes with 2 lanes. When we try to capture the frame, we are getting the following error and no frame captured.

misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 2062500 has been capped to VI’s max BW 1500000
[RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
tegra194-vi5 15c10000.vi: no reply from camera processor
tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x39
tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x41
tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x37
tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
tegra194-vi5 15c10000.vi: no reply from camera processor
tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms

Any suggestion?

Thanks,
JSP

Could you enable the trace log to check if can get more information.

https://elinux.org/Jetson_TX2_Camera_BringUp

Hi ShaneCCC,
Thanks for your reply. Please find the details:

cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
460800000
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
576000000
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
314000000

After running the capture with v4l2 command:

[ 2479.022401] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 2481.582351] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 2481.582544] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 2481.582688] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 2481.588728] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

[ 3120.302838] [RCE] Configuring VI GoS.
[ 3120.302854] [RCE] VM GOS[#0] addr=0xc2100000
[ 3120.302867] [RCE] VM GOS[#1] addr=0xc2101000
[ 3120.302879] [RCE] VM GOS[#2] addr=0xc2102000
[ 3120.302892] [RCE] VM GOS[#3] addr=0xc2103000
[ 3120.302904] [RCE] VM GOS[#4] addr=0xc2104000
[ 3120.302942] [RCE] VM GOS[#5] addr=0xc2105000

After adding more traces, I am getting the following error:
kworker/1:5-1903 [001] … 2773.875014: rtos_queue_peek_from_isr_failed: tstamp:87004952859 queue:0x0bcbcf78

The sensor configuration is same as what we have successfully configured on Jetson Nano. Any update needed in device tree or anything needs to be configured for xavierNX specially which is not part of Jetson Nano?

Please suggest!
Thanks!

Does the trace log only show below message? If yes that tell the nvcsi/vi didn’t receive any validate data from sensor output. You may need to probe by scope to confirm the sensor is output correctly.

kworker/1:5-1903 [001] … 2773.875014: rtos_queue_peek_from_isr_failed: tstamp:87004952859 queue:0x0bcbcf78

Yes, I am repeatedly getting the above error only. I have attached the log for your reference.!

Only change is, instead of Nano we are using Xavier. So, anything needs to be updated in the device tree for the sensor configuration?
We are using, L4T 32.4.3. Any patch needed ?

If the driver the BSP release are the same then yes you may only need to configure the device tee only.
If not you may need to check if any update for the reference sensor driver to update it.

Hi,
I am not very clear. In Jetson Nano we are using Jetpack 4.3 and in xavier nx we are using JP 4.4. In which section I have to update in the device tree configuration file for the xavier NX or any other changes …?

I would suggest to using the same release BSP to clarify the problem.

Will Jetson Xavier NX supports Jetpack 4.3…?

Looks like there’s flash configure for NX, but I can’t confirm if it’s workable.

Hi,
I dont think, Jetson Xavier NX can work with jetpack 4.3. So, I would like try to fix this issue instead of going back to a older version and face unknown risks.

Any other solution or suggestion?

From the trace log I would suggest to probe the MIPI signal by scope to make sure the sensor output correctly.