AGX Orin using ox08b40 error

We got one ox08b40 connected to csi-a 4-lanes directly, and added lane_polarity = "6"; in dts.

kernel log got error like:

\[  152.592691\] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
\[  152.601895\] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
\[  152.612566\] (NULL device \*): vi_capture_control_message: NULL VI channel received
\[  152.620298\] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
\[  152.631502\] (NULL device \*): vi_capture_control_message: NULL VI channel received
\[  152.639758\] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
\[  152.651122\] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
\[  155.407680\] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
\[  155.416878\] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
\[  155.427498\] (NULL device \*): vi_capture_control_message: NULL VI channel received
\[  155.435204\] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
\[  155.445875\] (NULL device \*): vi_capture_control_message: NULL VI channel received
\[  155.453698\] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
\[  155.464608\] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
\[  158.222376\] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
\[  158.231526\] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
\[  158.241569\] (NULL device \*): vi_capture_control_message: NULL VI channel received

trace log:

# tracer: nop
#
# entries-in-buffer/entries-written: 181143/181143   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/4:2-148     [004] ....   214.230816: rtcpu_string: tstamp:7488083323 id:0x04010000 str:"VM0 deactivating."
        v4l2-ctl-4310    [004] ....   231.596237: tegra_channel_open: vi-output, ox08b40 2-0036
        v4l2-ctl-4310    [004] ....   231.620926: tegra_channel_set_power: ox08b40 2-0036 : 0x1
        v4l2-ctl-4310    [004] ....   231.620952: camera_common_s_power: status : 0x1
        v4l2-ctl-4310    [004] ....   231.627590: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-4310    [004] ....   231.627594: csi_s_power: enable : 0x1
        v4l2-ctl-4310    [004] ....   231.628492: tegra_channel_capture_setup: vnc_id 0 W 3840 H 2160 fmt c4
        v4l2-ctl-4310    [004] ....   231.639521: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-4310    [004] ....   231.654648: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-4310    [004] ....   231.654650: csi_s_stream: enable : 0x1
        v4l2-ctl-4310    [004] ....   231.655033: tegra_channel_set_stream: ox08b40 2-0036 : 0x1
     kworker/4:2-148     [004] ....   231.678677: rtcpu_string: tstamp:8033059423 id:0x04010000 str:"VM0 activating."
     kworker/4:2-148     [004] ....   231.678679: rtcpu_vinotify_event: tstamp:8033715661 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:257063054240 data:0x399d580010000000
     kworker/4:2-148     [004] ....   231.678679: rtcpu_vinotify_event: tstamp:8033715814 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:257063060704 data:0x0000000031000001
     kworker/4:2-148     [004] ....   231.678679: rtcpu_vinotify_event: tstamp:8033715971 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:257063126272 data:0x399d550010000000
     kworker/4:2-148     [004] ....   231.678679: rtcpu_vinotify_event: tstamp:8033716102 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:257063132832 data:0x0000000031000002
     kworker/4:2-148     [004] ....   231.958846: rtcpu_nvcsi_intr: tstamp:8042690080 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000000
     kworker/4:2-148     [004] ....   232.014846: rtcpu_nvcsi_intr: tstamp:8043772929 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
     kworker/4:2-148     [004] ....   232.014850: rtcpu_nvcsi_intr: tstamp:8043772929 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
     kworker/4:2-148     [004] ....   232.014850: rtcpu_nvcsi_intr: tstamp:8043773440 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
     kworker/4:2-148     [004] ....   232.014851: rtcpu_nvcsi_intr: tstamp:8043773440 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
     kworker/4:2-148     [004] ....   232.014851: rtcpu_nvcsi_intr: tstamp:8043774104 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
     kworker/4:2-148     [004] ....   232.014852: rtcpu_nvcsi_intr: tstamp:8043774511 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
     kworker/4:2-148     [004] ....   232.014852: rtcpu_nvcsi_intr: tstamp:8043774511 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
     kworker/4:2-148     [004] ....   232.014853: rtcpu_nvcsi_intr: tstamp:8043775061 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
     kworker/4:2-148     [004] ....   232.014854: rtcpu_nvcsi_intr: tstamp:8043775061 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
     kworker/4:2-148     [004] ....   232.014854: rtcpu_nvcsi_intr: tstamp:8043775560 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080

Any help will be appreciated, thanks!

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are experiencing an issue with a Jetson AGX Orin module connected to a CSI-A interface with 4 lanes. The error message you’re encountering is not explicitly stated, but you’ve mentioned a “trace log” which suggests that there might be some kernel-level logging information available.

To better assist you, I’ll provide some general information about the Jetson AGX Orin’s CSI-A interface and some potential troubleshooting steps.

The Jetson AGX Orin module has a CSI-A interface that supports up to 4 lanes, which can be used to connect cameras or other peripherals. The CSI-A interface is a high-speed interface that uses the MIPI CSI-2 protocol.

To troubleshoot the issue, you can try the following steps:

  1. Verify the hardware connection: Ensure that the CSI-A interface is properly connected to the ox08b40 device and that all cables are securely attached.
  2. Check the device tree configuration: Verify that the device tree configuration (dts) is correctly set up for the CSI-A interface. You can check the kernel logs to see if there are any errors related to the device tree configuration.
  3. Check the kernel logs: Analyze the kernel logs to see if there are any errors related to the CSI-A interface or the ox08b40 device. You can use the dmesg command to view the kernel logs.
  4. Check the CSI-A interface configuration: Verify that the CSI-A interface is properly configured in the kernel. You can check the kernel configuration files (e.g., csi-a.conf) to ensure that the interface is enabled and configured correctly.

In terms of comparing the Jetson AGX Orin to other modules, it’s worth noting that the CSI-A interface is a common interface used on many NVIDIA Jetson modules, including the Jetson Xavier and Jetson Nano. However, the specific configuration and usage of the CSI-A interface may vary depending on the module and the application.

If you’re still experiencing issues after trying the above troubleshooting steps, it may be helpful to provide more information about the error message you’re seeing, as well as any relevant kernel logs or configuration files. This will allow me to provide more specific guidance and assistance.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Remove the lane_polarity for Orin.

We changed and the log is different now.
trace log see:
trace-ox08b40.log (998.5 KB)
kernel log:

[  139.849085] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 2048
[  139.884539] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 2048
[  139.920001] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 2048
[  139.955514] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 2048

The log tell the EMBED_RUNAWAY that could be cause by incorrect embedded_metadata_height in device tree.

CHANSEL_FAULT channel:0x23 frame:3 vi_tstamp:165329525568 data:0x0000000000000801

Hi
In datasheet we see the data structure like this


We did enable embedded rows, so we set embedded_metadata_height to 6, is that what it is defined?

After that we got some fps out put from v4l2-ctl --stream-mmap -c bypass_mode=0


Its that correct? cause the mode we use is 3840*2160 30fps

here is the trace log:
trace-6rows.log (1.4 MB)

The channel fault disappear suppose it’s correct.

Boost the clocks to try if able improve the fps. If still the same it could be the sensor setting cause the problem.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

after boosting with the commands, still got 28 fps
Our mode setting is like this:

			mode0 { // ox08b40_MODE_3840X2160
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_a";
				phy_mode = "DPHY";
				// lane_polarity = "6";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";

				active_w = "3840";
				active_h = "2160";
				mode_type = "bayer";
				pixel_phase = "rggb";
				csi_pixel_bit_depth = "12";
				readout_orientation = "0";
				line_length = "4208";
				inherent_gain = "1";
				mclk_multiplier = "24";
				pix_clk_hz = "576000000";

				gain_factor = "1000000";
				min_gain_val = "1000000";
				max_gain_val = "44400000";
				step_gain_val = "1";
				default_gain = "1000000";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				framerate_factor = "1000000";
				min_framerate = "1500000";
				max_framerate = "30000000";
				step_framerate = "1";
				default_framerate= "30000000";
				exposure_factor = "1000000";
				min_exp_time = "44";
				max_exp_time = "478696";
				step_exp_time = "1";
				default_exp_time = "16667";/* us */
				embedded_metadata_height = "6";

			};

And we use gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 '!' 'video/x-raw(memory:NVMM)' '!' nvvidconv '!' 'video/x-raw(memory:NVMM),width=1920,height=1080' '!' nv3dsink to preview raw but getting all black image

I don’t think nvv4l2camerasrc able support RAW sensor. You may verify by nvarguscamerasrc.

The frame rate problem could cause by incorrect xxx_set_framerate()

Got No cameras available error

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1' ! nvvidconv ! 'video/x-raw,format=I420' ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for  the processing deadline of 0:00:00.015000000, add enough queues to buffer  0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:00.002298270
Setting pipeline to NULL ...
Freeing pipeline ...

That could be incorrect information in tegra-camera-platform{} in camera device tree.

Fixed that, but still the same black

Looks like nvarguscamera unable capture from the sensor.

You may need confirm the tegra_sinterface for your sensor connection.

tegra_sinterface = "serial_a";
Doesn’t it mean CSI-A connected?
BTW, We use nvv4l2camerasrc to view raw on another ov5647 module and success.

You may modify the CID function like xxx_set_exposure()/xxx_set_framerate to dummy function to clarify.

We did make these dummy function, since we port the driver from imx185 as the guide did.
From kernel log we can see function been called:

[  121.280491] ox08b40 2-0036: ox08b40_power_on: power on
[  121.291428] bwmgr API not supported
[  121.302179] ox08b40 2-0036: ============== ox08b40_set_mode:
[  121.311623] ox08b40 2-0036: ============== ox08b40_write_table:
[  121.580246] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3012 = f
[  121.587529] ox08b40 2-0036: ox08b40_set_gain:  gain reg: 3
[  121.593183] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3014 = 3
[  121.600464] ox08b40 2-0036: ox08b40_set_exposure: val: 29708
[  121.606296] ox08b40 2-0036: ox08b40_set_coarse_time: coarse1:4066, shs1:-2942, FL:1125
[  121.614449] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3022 = 1
[  121.621713] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3021 = f4
[  121.629065] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3020 = 82
[  121.636423] ox08b40 2-0036: ox08b40_set_frame_rate: val: 30000000, , frame_length: 4562
[  121.644663] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x301a = 0
[  121.651921] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3019 = 11
[  121.659283] ox08b40 2-0036: ox08b40_write_reg: i2c write skipped, 0x3018 = d2
[  121.666637] ox08b40 2-0036: ============== ox08b40_start_streaming:
[  121.673081] ox08b40 2-0036: ============== ox08b40_write_table:

I capture raw using v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=RG12 --stream-mmap=3 --stream-skip=10 --stream-to=08b-dot.raw --stream-count=1 --stream-poll and view it on my pc tool, it seems ok with the raw.

You may need to confirm the sensor REG dump to compare to narrow down the problem.

Hi @ShaneCCC
We were trying some modification on the mode, and found that when pixel_phase changing from rggb to bggr, we got kernel panic:

[   10.078067] tegra-camrtc-capture-vi tegra-capture-vi: subdev ox08b40 2-0036 bound
[   10.086679] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   10.095723] Mem abort info:
[   10.098600]   ESR = 0x96000004
[   10.101755]   EC = 0x25: DABT (current EL), IL = 32 bits
[   10.107255]   SET = 0, FnV = 0
[   10.110404]   EA = 0, S1PTW = 0
[   10.113638] Data abort info:
[   10.116598]   ISV = 0, ISS = 0x00000004
[   10.120547]   CM = 0, WnR = 0
[   10.123615] [0000000000000000] user address but active_mm is swapper
[   10.130171] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[   10.135902] Modules linked in:
[   10.139068] CPU: 0 PID: 174 Comm: kworker/0:3 Not tainted 5.10.104-tegra #12
[   10.146319] Hardware name: Unknown Jetson AGX Orin/Jetson AGX Orin, BIOS 2.1-32413640 01/24/2023
[   10.155398] Workqueue: events deferred_probe_work_func
[   10.160686] pstate: a0c00009 (NzCv daif +PAN +UAO -TCO BTYPE=--)
[   10.166894] pc : camera_common_g_fmt+0x48/0xa0
[   10.171463] lr : camera_common_g_fmt+0x2c/0xa0
[   10.176031] sp : ffff80001247b220
[   10.179376] usb 1-3: new full-speed USB device number 2 using tegra-xusb
[   10.179444] x29: ffff80001247b220 x28: ffff15b3c079c220
[   10.191814] x27: 0000000000000038 x26: ffffcd8dc0587358
[   10.197272] x25: ffff15b3c079c9d0 x24: ffff15b3c0740000
[   10.202729] x23: ffffcd8dc0174ce0 x22: ffff15a4c71f2cb8
[   10.208187] x21: ffff80001247b310 x20: ffff15a4c71f4020
[   10.213652] x19: ffff80001247b368 x18: 0000000000000001
[   10.219118] x17: 0000000000000000 x16: ffff80001247b458
[   10.224581] x15: ffffffffffffffff x14: ffffff0000000000
[   10.230037] x13: ffffffffffffffff x12: 0000000000000003
[   10.235494] x11: 0101010101010101 x10: ffff7f7f7f7f7f7f
[   10.240952] x9 : 7f7f7f7f7f7f7f7f x8 : fefeff7273716e6f
[   10.246410] x7 : 1d00161142ffffff x6 : ffff00421116001d
[   10.251872] x5 : ffffff0000000000 x4 : 6b7b232988000000
[   10.257329] x3 : 0000000000000001 x2 : ffff15a4c71f2c80
[   10.262791] x1 : 0000000000000000 x0 : 0000000000000000
[   10.268254] Call trace:
[   10.270764]  camera_common_g_fmt+0x48/0xa0
[   10.274986]  v4l2sd_get_fmt+0x2c/0x40
[   10.278767]  call_get_fmt+0x78/0xa0
[   10.282364]  tegra_channel_fmts_bitmap_init+0x1c8/0x2d0
[   10.287731]  tegra_channel_init_subdevices+0x190/0x790
[   10.293009]  tegra_vi_graph_notify_complete+0x2f8/0x670
[   10.298374]  v4l2_async_notifier_try_complete.part.0+0x5c/0x80
[   10.304375]  v4l2_async_register_subdev+0x104/0x1c0
[   10.309392]  tegracam_v4l2subdev_register+0x100/0x170
[   10.314605]  ox08b40_probe+0x244/0x2b0
[   10.318479]  i2c_device_probe+0xb0/0x2e0
[   10.322515]  really_probe+0xf8/0x3d0
[   10.326193]  driver_probe_device+0x60/0xc0
[   10.330405]  __device_attach_driver+0x8c/0xd0
[   10.334886]  bus_for_each_drv+0x8c/0xe0
[   10.338826]  __device_attach+0xf8/0x160
[   10.342770]  device_initial_probe+0x28/0x40
[   10.347070]  bus_probe_device+0xa4/0xb0
[   10.351021]  device_add+0x364/0x750
[   10.354612]  device_register+0x2c/0x40
[   10.358471]  i2c_new_client_device+0x148/0x280
[   10.363036]  of_i2c_register_device+0x88/0xb0
[   10.367516]  of_i2c_register_devices+0xb0/0x160
[   10.372174]  i2c_register_adapter+0x240/0x650
[   10.376653]  __i2c_add_numbered_adapter+0x64/0xb0
[   10.381487]  i2c_add_adapter+0xa8/0xe0
[   10.385344]  i2c_add_numbered_adapter+0x40/0x50
[   10.390006]  tegra_i2c_probe+0x4ec/0x6c0
[   10.394048]  platform_drv_probe+0x5c/0xb0
[   10.398174]  really_probe+0xf8/0x3d0
[   10.401852]  driver_probe_device+0x60/0xc0
[   10.406067]  __device_attach_driver+0x8c/0xd0
[   10.410548]  bus_for_each_drv+0x8c/0xe0
[   10.414493]  __device_attach+0xf8/0x160
[   10.418439]  device_initial_probe+0x28/0x40
[   10.422734]  bus_probe_device+0xa4/0xb0
[   10.426678]  deferred_probe_work_func+0x90/0xd0
[   10.431358]  process_one_work+0x1c4/0x4a0
[   10.435481]  worker_thread+0x200/0x430
[   10.439344]  kthread+0x148/0x170
[   10.442681]  ret_from_fork+0x10/0x24
[   10.446369] Code: 540002c0 f85e8001 52800023 52800000 (b9400024)
[   10.452680] ---[ end trace 7d907f797750c15f ]---
[   10.457429] Kernel panic - not syncing: Oops: Fatal exception
[   10.463330] SMP: stopping secondary CPUs
[   10.467817] Kernel Offset: 0x4d8daedf0000 from 0xffff800010000000
[   10.474091] PHYS_OFFSET: 0xffffea5c40000000
[   10.478398] CPU features: 0x0040006,4a80aa38
[   10.482791] Memory Limit: none
[   10.485939] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]---

Is it a must to use rggb when csi_pixel_bit_depth is 12?