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.