Cannot enable camera on CAM0 and get error vi_capture_control_message: NULL VI channel received

I was porting two cameras on Jetson Orin NANO and I have already enabled one camera on CAM1 by below command.

DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video1 ! \
"video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080" ! \
videoconvert ! xvimagesink sync=false

However, I cannot enable the same camera on CAM0 and I got the error message:

$ DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080" ! videoconvert ! xvimagesink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[  605.517215] bwmgr API not supported
[  635.318419] bwmgr API not supported
[  637.925707] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  637.934869] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  637.945920] (NULL device *): vi_capture_control_message: NULL VI channel received
[  637.953691] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  637.964423] (NULL device *): vi_capture_control_message: NULL VI channel received
[  637.972172] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  637.983127] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  640.741508] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  640.750672] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  640.761516] (NULL device *): vi_capture_control_message: NULL VI channel received
[  640.769232] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  640.779913] (NULL device *): vi_capture_control_message: NULL VI channel received
[  640.787654] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  640.798633] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

I checked and compared the device tree for tegra-capture-vi and nvcsi:
Is there any wrong setting for them?

tegra-capture-vi  {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			vi_port0: port@0 {
				reg = <0>;
				rpi22_ap1302_vi_in0: endpoint {
					port-index = <0>;
					bus-width = <2>;
					remote-endpoint = <&rpi22_ap1302_csi_out0>;
				};
			};
			vi_port1: port@1 {
				reg = <1>;
				rpi22_ap1302_vi_in1: endpoint {
					port-index = <2>;
					bus-width = <2>;
					remote-endpoint = <&rpi22_ap1302_csi_out1>;
				};
			};
		};
	};

	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			csi_chan0: channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan0_port0: port@0 {
						reg = <0>;
						rpi22_ap1302_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <2>;
							remote-endpoint = <&rpi22_ap1302_out0>;
						};
					};
					csi_chan0_port1: port@1 {
						reg = <1>;
						rpi22_ap1302_csi_out0: endpoint@1 {
							remote-endpoint = <&rpi22_ap1302_vi_in0>;
						};
					};
				};
			};
			csi_chan1: channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan1_port0: port@0 {
						reg = <0>;
						rpi22_ap1302_csi_in1: endpoint@2 {
							port-index = <2>;
							bus-width = <2>;
							remote-endpoint = <&rpi22_ap1302_out1>;
						};
					};
					csi_chan1_port1: port@1 {
						reg = <1>;
						rpi22_ap1302_csi_out1: endpoint@3 {
							remote-endpoint = <&rpi22_ap1302_vi_in1>;
						};
					};
				};
			};
		};
	};

hello jerry.liu21023,

please note that, CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N on Orin Nano.
you may use the lane_polarity property in device tree to configure this.
please see-also reference device tree,
$public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-camera-rbpcv2-imx219.dtsi

Hi JerryChang,

Thanks! I also saw the reference device tree.

I think I got images from the wrong CSIx port instead of lane polarity.

For CAM1, lane_polarity is “0” and I think I received the MIPI data from CSI2_D0/D1.

For CAM0, I should receive the MIPI data from CSI1_D0/D1.

Anyway, I modified the CSI port-index to “1” and I can get the image from my camera now.

Then I saw the spec of Orin NANO and I found it seems to only support 2 lane camera on CAM0.

If I want to enable the camera with 4 lane setting on CAM0, is it possible to support 4 lane camera on CAM0?

no, it’s now only IMX477 4-lane support on CAM1.
it’ll need additional fixes to support 4-lane configure on CAM0. sorry, I don’t have rough ETA for this item.

Hi JerryChang,

Thanks! And I want to confirm how many virtual channels each CSIx can support.
Is each CSIx possible to support 4 virtual channels if I want to use 2 lane camera x4 on the same CSIx?

hello jerry.liu21023,

it’s mentioned in [Jetson Orin Nano Series Module Data Sheet].
re-cap as below…

Orin Nano can support up to 16 virtual channels (VC)


please see-also developer guide for Jetson Virtual Channel with GMSL Camera Framework.
it’s possible, it depends-on your Aggregator configurations.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.