Testing IMX390 camera with Jetson Xavier

Hi ereryone!
I use Jetson_Linux_R32.1.0 in Jetson Xavier boarad.
IMX390 direct access Xavier with no serializer and deserializer.
I have modified dtb below.
tegra194-camera-imx390-a00.dtsi
tegra194-p2822-0000-camera-imx390-a00.dtsi
tegra194-p2822-camera-modules.dtsi
The four lanes and port0 are used. I think dtb is correct.
I have modified driver imx390.c. The function of imx390_probe() can effictive running.
The /dev/video0 can open.
The error appeared when caputre video.
Need I modify camera-plugin-manager.dtsi or some other suggestions?

[  208.533226] wangming imx390_power_on 
[  208.538486] wangming imx390_set_fmt
[  208.538812] wangming imx390_set_fmt 
[  208.539234] wangming imx390_g_input_status 
[  208.574592] wangming imx390_s_stream s_data->mode = 0
[  208.575381] imx390 2-0021: imx390_s_stream++ enable 1
[  208.981752] [RCE] Configuring VI GoS.
[  208.981871] [RCE] VM GOS[#0] addr=0xe4900000
[  208.982087] [RCE] VM GOS[#1] addr=0xe4901000
[  208.982161] [RCE] VM GOS[#2] addr=0xe4902000
[  208.982209] [RCE] VM GOS[#3] addr=0xe4903000
[  208.982761] [RCE] VM GOS[#4] addr=0xe4904000
[  208.982814] [RCE] VM GOS[#5] addr=0xe4905000
[  208.982880] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[  208.983087] [RCE] VI GOS[#0] set to VM GOS[4] base 0xe4904000
[  211.622296] tegra194-vi5 15c10000.vi: no reply from camera processor
[  211.622873] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[  211.623614] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[  211.633025] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

cat /sys/kernel/debug/tracing/trace

# tracer: nop
#
# entries-in-buffer/entries-written: 1541/1541   #P:8
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:2-1172  [000] ....   208.589474: rtos_queue_send_from_isr_failed: tstamp:6719443849 queue:0x0bcb41f8
     kworker/0:2-1172  [000] ....   208.589494: rtos_queue_send_from_isr_failed: tstamp:6719446349 queue:0x0bcb8a60
     kworker/0:2-1172  [000] ....   208.589503: rtos_queue_send_from_isr_failed: tstamp:6719448836 queue:0x0bcba5e0
     kworker/0:2-1172  [000] ....   208.589510: rtos_queue_send_from_isr_failed: tstamp:6719451284 queue:0x0bcbb3a0
     kworker/0:2-1172  [000] ....   208.589517: rtos_queue_send_from_isr_failed: tstamp:6719453732 queue:0x0bcbc160
     kworker/0:2-1172  [000] ....   208.589528: rtcpu_nvcsi_intr: tstamp:6719479930 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000089
     kworker/0:2-1172  [000] ....   208.589536: rtcpu_nvcsi_intr: tstamp:6719479930 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000088
     kworker/0:2-1172  [000] ....   208.981407: rtos_queue_peek_from_isr_failed: tstamp:6730737381 queue:0x0bcbcf78
     kworker/0:2-1172  [000] ....   208.981452: rtcpu_start: tstamp:6730758931
     kworker/0:2-1172  [000] ....   208.981509: rtos_queue_send_from_isr_failed: tstamp:6730831248 queue:0x0bcb41f8
     kworker/0:2-1172  [000] ....   208.981528: rtos_queue_send_from_isr_failed: tstamp:6730831384 queue:0x0bcb8a60
     kworker/0:2-1172  [000] ....   208.981545: rtos_queue_send_from_isr_failed: tstamp:6730831523 queue:0x0bcba5e0
     kworker/0:2-1172  [000] ....   208.981561: rtos_queue_send_from_isr_failed: tstamp:6730831659 queue:0x0bcbb3a0
     kworker/0:2-1172  [000] ....   208.981621: rtos_queue_send_from_isr_failed: tstamp:6730831791 queue:0x0bcbc160
     kworker/0:2-1172  [000] ....   208.981641: rtcpu_string: tstamp:6730832289 id:0x04010000 str:"Configuring VI GoS.
"
     kworker/0:2-1172  [000] ....   208.981804: rtcpu_string: tstamp:6730832450 id:0x04010000 str:"VM GOS[#0] addr=0xe4900000
"
     kworker/0:2-1172  [000] ....   208.982018: rtcpu_string: tstamp:6730832713 id:0x04010000 str:"VM GOS[#1] addr=0xe4901000
"
     kworker/0:2-1172  [000] ....   208.982111: rtcpu_string: tstamp:6730832989 id:0x04010000 str:"VM GOS[#2] addr=0xe4902000
"
     kworker/0:2-1172  [000] ....   208.982184: rtcpu_string: tstamp:6730833209 id:0x04010000 str:"VM GOS[#3] addr=0xe4903000
"
     kworker/0:2-1172  [000] ....   208.982230: rtcpu_string: tstamp:6730833429 id:0x04010000 str:"VM GOS[#4] addr=0xe4904000
"
     kworker/0:2-1172  [000] ....   208.982787: rtcpu_string: tstamp:6730833648 id:0x04010000 str:"VM GOS[#5] addr=0xe4905000
"
     kworker/0:2-1172  [000] ....   208.982834: rtcpu_string: tstamp:6730848818 id:0x04010000 str:"vi5_hwinit: firmware CL2018101701 protocol versi"
     kworker/0:2-1172  [000] ....   208.982856: rtcpu_string: tstamp:6730848923 id:0x04010000 str:"on 2.2
"

hello wmlovetoday,

plugin-manager were designed for device registration during kernel initialization. since you’re able to probe imx390 device and register device node, you don’t need to modify plugin-manger device tee.
your failure messages shows the VI engine cannot read the sensor streaming.

[  211.622296] tegra194-vi5 15c10000.vi: no reply from camera processor
[  211.622873] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[  211.623614] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[  211.633025] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

due to IMX390 is a reference driver for camera modules that use the Serializer/Deserializer (GMSL or FPD Link).
could you please refer to Sensor Driver Programming Guide, you should check you had update device tree correctly.
thanks

Hi JerryChang.
Thanks for you reply. I will double check my dtbs and sensor module and keep up to date.

Hi JerryChang.
My dts is below. Help to check.

/ {
	host1x {
		vi@15c10000 {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					tu390_vi_in0: endpoint {
						vc-id = <0>;
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&tu390_csi_out0>;
					};
				};
			};
		};
		nvcsi@15a00000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						tu390_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&tu390_imx390_out0>;
						};
					};
					port@1 {
						reg = <1>;
						tu390_csi_out0: endpoint@1 {
							remote-endpoint = <&tu390_vi_in0>;
						};
					};
				};
			};
		};
	}; 

	i2c@3180000 {
		imx390_tu@21 {
			compatible = "nvidia,tu390";
			reg = <0x21>;
			status = "okay";
			devnode = "video0";	
			/* Physical dimensions of sensor */
			physical_w = "15.0";
			physical_h = "12.5";
			sensor_model ="tu390";

			post_crop_frame_drop = "0";
			use_decibel_gain = "true";
			delayed_gain = "true";
			use_sensor_mode_id = "true";
			
			clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,<&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
			mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_a";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				dynamic_pixel_bit_depth = "12";
				csi_pixel_bit_depth = "12";
				mode_type = "bayer";
				pixel_phase = "rggb";

				active_w = "1920";
				active_h = "1080";
				pixel_t = "bayer_rggb";
				readout_orientation = "0";
				line_length = "4400";
				inherent_gain = "1";
				mclk_multiplier = "6.18";
				pix_clk_hz = "148500000";

				min_gain_val = "0"; /* dB */
				max_gain_val = "30"; /* dB */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "1.5";
				max_framerate = "30";
				min_exp_time = "118"; /*us,4 lines*/
				max_exp_time = "660000";
				embedded_metadata_height = "1";   /*1 front read is reg*/
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					tu390_imx390_out0: endpoint {
						vc-id = <0>;
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&tu390_csi_in0>;
					};
				};
			};
		};
	};
};
/ {
	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";	
		status = "okay";	
		num_csi_lanes = <4>;   							/*1*/
		max_lane_speed = <4000000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;
		modules {
			module0 {
				status = "okay";
				badge = "imx390_rear";
				position = "rear";
				orientation = "1";
				drivernode0 {
					status = "okay";
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "imx390 30-0021";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/imx390_tu@21";
				};
			};
		};
	};
};

I run command sudo ./flash.sh -r -k kernel-dtb jetson-xavier mmcblk0p1 to update dtb.
After I run capture command v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --stream-mmap --stream-count=100 -d /dev/video0.
The kernel log is below:

[   36.722047] tu390 2-0021: camera_common_mclk_enable: enable MCLK with 24000000 Hz
[   36.722263] tu390 2-0021: camera_common_dpd_disable: csi 0
[   36.722382] tu390 2-0021: camera_common_dpd_disable: csi 1
[   36.722477] wangming imx390_power_on 
[   36.735062] wangming imx390_set_fmt 
[   36.735157] tu390 2-0021: camera_common_try_fmt: size 1920 x 1080
[   36.735270] tu390 2-0021: camera_common_try_fmt: use_sensor_mode_id 0
[   36.735427] wangming imx390_set_fmt 
[   36.735495] tu390 2-0021: camera_common_s_fmt(12306) size 1920 x 1080
[   36.735617] tu390 2-0021: camera_common_try_fmt: size 1920 x 1080
[   36.735723] tu390 2-0021: camera_common_try_fmt: use_sensor_mode_id 0
[   36.735861] wangming imx390_g_input_status 
[   36.750911] tu390 2-0021: imx390_s_stream++ enable 1
[   36.751243] tu390 2-0021: imx390_s_stream start stream 
[   36.842402] tegradc 15200000.nvdisplay: blank - powerdown
[   36.907357] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[   37.132175] tegradc 15200000.nvdisplay: blank - powerdown
[   37.426002] tegradc 15200000.nvdisplay: blank - powerdown
[   37.710246] tegradc 15200000.nvdisplay: blank - powerdown
[   37.999814] tegradc 15200000.nvdisplay: blank - powerdown
[   38.275323] tegradc 15200000.nvdisplay: blank - powerdown
[   38.548619] tegradc 15200000.nvdisplay: blank - powerdown
[   38.867707] tegradc 15200000.nvdisplay: blank - powerdown
[   39.158169] tegradc 15200000.nvdisplay: blank - powerdown
[   39.443919] tegradc 15200000.nvdisplay: blank - powerdown
[   39.627316] tegra194-vi5 15c10000.vi: no reply from camera processor
[   39.627474] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[   39.627609] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[   39.629338] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[   39.730252] tegradc 15200000.nvdisplay: blank - powerdown

Is it right the log camera_common_dpd_disable: csi 0 camera_common_dpd_disable: csi 1 ?

Hi,
Have you checked with default parameter in imx390_mode_tbls.h?
Since embedded_metadata_height is different from original dtsi, you seem to use your own paramter.
What’s the result from using default settings in dtsi and parameters in imx390_mode_tbsl.h.

Also you can check whether sensor is running by checking frame counter register.

hello wmlovetoday,

Is it right the log camera_common_dpd_disable: csi 0 camera_common_dpd_disable: csi 1 ?
please check the power-on sequence, it’s expected to disable CSI IOs DPD mode to turn on camera.

you’re having kernel function calls to enable imx390 streaming, but the following no reply messages means VI engine did not received the sensor signaling. you may also enable VI tracing logs to ensure the details.
suggest you should check the regulator settings and also the imx390 power-on sequence, please arrange oscilloscope to co-work with your hardware engineer and probe the MIPI signaling.

BTW, please also check rary’s suggestion in comment #6, thanks

Hi rary.
good idea, I am trying now. I detect signal use oscilloscope before this.

Hi rary,JerryChang,
Our 390 modules no power control pin, so it only changed “pw->state=SWITCH_ON” in the function of “imx390_power_on” and changed “pw->state=SWITCH_OFF” in the function of “imx390_power_off” .
Now I am sure imx390 works, because I write 390’s configure tables in function of “imx390_probe” after “imx390_power_get”.
I read 390’ register after this, the device status is ACTIVE, the frame counter register is increasing.

After I check the hardware board, I found 390 moudle direct access Xavier in Csi Port G with no serializer and deserializer.
After I modified dtbs, can not find /dev/video.

host1x {
		vi@15c10000 {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@5 {
					reg = <5>;
					tu390_vi_in0: endpoint {
						vc-id = <0>;
						port-index = <5>;
						bus-width = <4>;
						remote-endpoint = <&tu390_csi_out0>;
					};
				};
			};
		};
		nvcsi@15a00000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@6 {
				reg = <6>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						tu390_csi_in0: endpoint@12 {
							port-index = <6>;
							bus-width = <4>;
							remote-endpoint = <&tu390_imx390_out0>;
						};
					};
					port@1 {
						reg = <1>;
						tu390_csi_out0: endpoint@13 {
							remote-endpoint = <&tu390_vi_in0>;
						};
					};
				};
			};
		};
	};

in tegra194-p2822-camera-modules.dtsi

vi_base: vi@15c10000 {
			ports {
				vi_port0: port@0 {
					status = "disabled";
					vi_in0: endpoint {
						vc-id = <0>;
						status = "disabled";
					};
				};
				vi_port1: 
				vi_port2:
				vi_port3: 
				vi_port4: /*same with vi_port0*/
		
				vi_port5: port@5 {
					status = "okay";
					vi_in5: endpoint {
						vc-id = <0>;
						status = "okay";
					};
				}; 
			};
		}; 
		csi_base: nvcsi@15a00000 {
			num-tpg-channels = <36>;
			csi_chan0: channel@0 {
				status = "disabled";
				ports {
					csi_chan0_port0: port@0 {
						status = "disabled";
						csi_in0: endpoint@0 {
							status = "disabled";
						};
					};
					csi_chan0_port1: port@1 {
						status = "disabled";
						csi_out0: endpoint@1 {
							status = "disabled";
						};
					};
				};
			};
			csi_chan1: channel@1 
			csi_chan2: channel@2 
			csi_chan3: channel@3 
			csi_chan4: channel@4 
			csi_chan5: channel@5    /*same with csi_chan0*/
			csi_chan6: channel@6 {
				status = "okay";
				ports {
					csi_chan6_port0: port@0 {
						status = "okay";
						csi_in6: endpoint@12 {
							status = "okay";
						};
					};
					csi_chan6_port1: port@1 {
						status = "okay";
						csi_out6: endpoint@13 {
							status = "okay";
						};
					};
				};
			};
		};

I find the first VI port must be enabled in “target dtb” such as “tegra194-p2888-0001-p2822-0000.dtb”,
otherwise the function "tegra_vi_graph_init"will exit.
when kernel Start to finish, run dmesg :

[    4.582590] tu390 2-0021: tu390 client->addr=21 client->name=tu390
[    4.582697] wangming0 camera_common_find_datafmt code = 3012 
[    5.208633] tu390_write_regs:write table end, imx390_1920x1080_crop_30fps[3195].addr=ff01
[    5.253773] comready pin TP1=1
[    5.254096] 390 IS active
[    5.254306] wangming0 camera_common_initialize 
[    5.254418] wangming0 camera_common_parse_ports node=imx390_tu
[    5.254575] wangming1 camera_common_parse_ports node=endpoint
[    5.254717] tu390 2-0021: camera_common_parse_ports: port 6 num of lanes 4
[    5.254869] wangming0 camera_common_parse_general_properties 
[    5.255104] tu390 2-0021: tu390_probe: name tu390_g
[    5.255219] tu390 2-0021: camera_common_create_debugfs tu390_g
[    5.255627] wangming imx390_ctrls_init 
[    5.255722] tu390 2-0021: imx390_ctrls_init++
[    5.256061] tu390 2-0021: Detected IMX390 sensor
..........................
[    9.720829] tegra194-isp5 14800000.isp: initialized
[    9.728719] tegra194-vi5 15c10000.vi: initialized
[    9.733818] tegra194-vi5 15c10000.vi: subdev tu390 2-0021 bound

The camera_common_enum_mbus_code() and camera_common_g_fmt() imx390_open()no run.
Next I enable dev_dbg() to get more information.

hello wmlovetoday,

yes, you should power-on the device before driver probing.
it seems you had wrong port binding between VI and CSI,
please refer to Sensor Software Driver Programming Guide and check the [Port Index] session for the port binding.
thanks

Hi JerryChang,
After change VI and NVCSI in dtbs,the capture logs below:

Capability Informations:
 driver: tegra-video
 card: vi-output, tu390 2-0021
 bus_info: platform:15c10000.vi:5
 version: 0004098C
 capabilities: 84200001
[  101.661706] wangming imx390_set_fmt 
[  101.661878] wangming imx390_set_fmt 
Stream Format Informations:
 type: 1
 width: 1920
 height: 1080
 pixelformat: RG12
 field: 1
 bytesperline: 3840
 sizeimage: 4147200
 colorspace: 8
 priv: -17970434
 raw_date: €
buffer_mapping ok.
[  101.679800] tu390 2-0021: imx390_s_stream++ enable 1
[  101.680113] tu390 2-0021: imx390_s_stream start stream 
[  101.788188] wangming imx390_read_reg r5001=3
[  101.905727] tegra194-vi5 15c10000.vi: corr_err: discarding frame 25, flags: 0, err_data 16384
[  101.942810] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 39846501
[  102.167699] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 48235109
[  102.243955] tegra194-vi5 15c10000.vi: corr_err: discarding frame 8223, flags: 0, err_data 512
[  102.280581] tegra194-vi5 15c10000.vi: corr_err: discarding frame 51, flags: 0, err_data 512
[  102.468251] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  102.542704] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 39846501
[  102.695219] tegra194-vi5 15c10000.vi: corr_err: discarding frame 4137, flags: 0, err_data 16384
[  102.730523] tegra194-vi5 15c10000.vi: corr_err: discarding frame 47, flags: 0, err_data 512
[  102.768300] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  102.843275] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  102.843840] tegra194-vi5 15c10000.vi: corr_err: discarding frame 51, flags: 0, err_data 16384
[  102.880565] tegra194-vi5 15c10000.vi: corr_err: discarding frame 51, flags: 0, err_data 16384
[  102.917668] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 39846501
[  103.067688] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 48235109
[  103.143916] tegra194-vi5 15c10000.vi: corr_err: discarding frame 51, flags: 0, err_data 512
[  103.180572] tegra194-vi5 15c10000.vi: corr_err: discarding frame 51, flags: 0, err_data 512
[  103.218374] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  103.367638] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 48235109
[  103.443834] tegra194-vi5 15c10000.vi: corr_err: discarding frame 60, flags: 0, err_data 16384
[  103.480530] tegra194-vi5 15c10000.vi: corr_err: discarding frame 75, flags: 0, err_data 512
[  103.518290] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  103.668103] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  103.668746] tegra194-vi5 15c10000.vi: corr_err: discarding frame 68, flags: 0, err_data 16384
[  103.705565] tegra194-vi5 15c10000.vi: corr_err: discarding frame 75, flags: 0, err_data 16384
[  103.743237] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 165
[  103.817664] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 112, err_data 39846501
[  104.867893] tu390 2-0021: imx390_s_stream++ enable 0
[  104.868169] tu390 2-0021: imx390_s_stream stop stream 

nvidia@nvidia-desktop:~/390$ sudo media-ctl -p -d /dev/media0
[sudo] password for nvidia: 
Media controller API version 0.1.0

Media device information
------------------------
driver          tegra194-vi5
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  0.0.0

Device topology
- entity 1: tu390 2-0021 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
[  243.964422] wangming imx390_open 
[  243.964579] tu390 2-0021: imx390_open:
[  243.964671] wangming imx390_get_fmt 
                [fmt:SRGGB12_1X12/1920x1080 field:none colorspace:srgb]
                -> "15a00000.nvcsi--1":0 [ENABLED]

- entity 3: 15a00000.nvcsi--1 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "tu390 2-0021":0 [ENABLED]
        pad1: Source
                -> "vi-output, tu390 2-0021":0 [ENABLED]

- entity 6: vi-output, tu390 2-0021 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "15a00000.nvcsi--1":1 [ENABLED]

hello wmlovetoday,

suggest you share the commands,
there are two approach to access camera sensor, please also check Camera Software Development Solution chapter for the commands to access camera sensor.
you may also enable VI tracing logs for reference.

BTW,
https://developer.nvidia.com/embedded/jetpack, JetPack-4.2.1 is now live.
please moving to the latest jetpack release for further support.
thanks

Hi JerryChang,
the commands is v4l2-ctl --set-fmt-video=width=1920,height=1092,pixelformat=RG12 --stream-mmap --stream-count=100 -d /dev/video0

[   80.560039] wangming imx390_set_fmt 
[   80.560145] wangming imx390_set_fmt 
[   80.560248] wangming imx390_g_input_status 
[   80.566608] tu390 2-0021: imx390_s_stream++ enable 1
[   80.566900] tu390 2-0021: imx390_s_stream start stream 
[   80.672730] wangming imx390_read_reg r5001=3
[   80.709544] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.747059] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.784552] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.822173] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.859646] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.897113] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.934541] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   80.972072] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384
[   81.009532] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 16384

sudo cat /sys/kernel/debug/tracing/trace

entries-in-buffer/entries-written: 1305/1305   #P:8
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:0-4     [000] ....   330.369697: rtos_queue_send_from_isr_failed: tstamp:10522779941 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.369716: rtos_queue_send_from_isr_failed: tstamp:10522782435 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.369729: rtos_queue_send_from_isr_failed: tstamp:10522784902 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.369736: rtos_queue_send_from_isr_failed: tstamp:10522787330 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.369743: rtos_queue_send_from_isr_failed: tstamp:10522789759 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.369753: rtcpu_nvcsi_intr: tstamp:10522841458 class:GLOBAL type:PHY_INTR0 phy:3 cil:0 st:0 vc:0 status:0x00000110
     kworker/0:0-4     [000] ....   330.369760: rtcpu_nvcsi_intr: tstamp:10522841458 class:CORRECTABLE_ERR type:PHY_INTR phy:3 cil:0 st:0 vc:0 status:0x00000110
     kworker/0:0-4     [000] ....   330.369766: rtcpu_nvcsi_intr: tstamp:10522851875 class:GLOBAL type:PHY_INTR0 phy:3 cil:1 st:0 vc:0 status:0x00000110
     kworker/0:0-4     [000] ....   330.369902: rtcpu_nvcsi_intr: tstamp:10522851875 class:CORRECTABLE_ERR type:PHY_INTR phy:3 cil:1 st:0 vc:0 status:0x00000110
     kworker/0:0-4     [000] ....   330.480946: rtos_queue_peek_from_isr_failed: tstamp:10526472492 queue:0x0bcbcf78
     kworker/0:0-4     [000] ....   330.480950: rtcpu_start: tstamp:10526490692
     kworker/0:0-4     [000] ....   330.480952: rtos_queue_send_from_isr_failed: tstamp:10526527881 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.480953: rtos_queue_send_from_isr_failed: tstamp:10526528019 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.480954: rtos_queue_send_from_isr_failed: tstamp:10526528156 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.480955: rtos_queue_send_from_isr_failed: tstamp:10526528290 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.480956: rtos_queue_send_from_isr_failed: tstamp:10526528423 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.480958: rtcpu_string: tstamp:10526528926 id:0x04010000 str:"Configuring VI GoS.
"
     kworker/0:0-4     [000] ....   330.480982: rtcpu_string: tstamp:10526529088 id:0x04010000 str:"VM GOS[#0] addr=0xe4900000
"
     kworker/0:0-4     [000] ....   330.480992: rtcpu_string: tstamp:10526529335 id:0x04010000 str:"VM GOS[#1] addr=0xe4901000
"
     kworker/0:0-4     [000] ....   330.481018: rtcpu_string: tstamp:10526529601 id:0x04010000 str:"VM GOS[#2] addr=0xe4902000
"
     kworker/0:0-4     [000] ....   330.481039: rtcpu_string: tstamp:10526529839 id:0x04010000 str:"VM GOS[#3] addr=0xe4903000
"
     kworker/0:0-4     [000] ....   330.481053: rtcpu_string: tstamp:10526530057 id:0x04010000 str:"VM GOS[#4] addr=0xe4904000
"
     kworker/0:0-4     [000] ....   330.481297: rtcpu_string: tstamp:10526530276 id:0x04010000 str:"VM GOS[#5] addr=0xe4905000
"
     kworker/0:0-4     [000] ....   330.481312: rtcpu_string: tstamp:10526545468 id:0x04010000 str:"vi5_hwinit: firmware CL2018101701 protocol versi"
     kworker/0:0-4     [000] ....   330.481319: rtcpu_string: tstamp:10526545573 id:0x04010000 str:"on 2.2
"
     kworker/0:0-4     [000] ....   330.481336: rtos_queue_send_from_isr_failed: tstamp:10526609090 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.481341: rtos_queue_send_from_isr_failed: tstamp:10526609262 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.481345: rtos_queue_send_from_isr_failed: tstamp:10526609402 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.481350: rtos_queue_send_from_isr_failed: tstamp:10526609555 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.481354: rtos_queue_send_from_isr_failed: tstamp:10526609687 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.481359: rtcpu_string: tstamp:10526610600 id:0x04010000 str:"VI GOS[#0] set to VM GOS[4] base 0xe4904000
"
     kworker/0:0-4     [000] ....   330.481377: rtcpu_vinotify_error: tstamp:10526615735 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:10526611436 data:0x00100000
     kworker/0:0-4     [000] ....   330.481382: rtos_queue_send_from_isr_failed: tstamp:10527026487 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.481387: rtos_queue_send_from_isr_failed: tstamp:10527026627 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.481391: rtos_queue_send_from_isr_failed: tstamp:10527026769 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.481396: rtos_queue_send_from_isr_failed: tstamp:10527026902 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.481400: rtos_queue_send_from_isr_failed: tstamp:10527027034 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.481526: rtcpu_vinotify_event: tstamp:10527090381 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:10526611436 data:0x00100000
     kworker/0:0-4     [000] ....   330.481532: rtcpu_vinotify_event: tstamp:10527090513 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10434226720 data:0x10000000
     kworker/0:0-4     [000] ....   330.481537: rtcpu_vinotify_event: tstamp:10527090679 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10434259584 data:0x31000001
     kworker/0:0-4     [000] ....   330.481541: rtcpu_vinotify_event: tstamp:10527090805 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10434266080 data:0x10000000
     kworker/0:0-4     [000] ....   330.481546: rtcpu_vinotify_event: tstamp:10527090946 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:10434277984 data:0x07020001
     kworker/0:0-4     [000] ....   330.481551: rtcpu_vinotify_event: tstamp:10527091068 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10434308448 data:0x31000002
     kworker/0:0-4     [000] ....   330.481555: rtcpu_vinotify_event: tstamp:10527091229 tag:FS channel:0x00 frame:249 vi_tstamp:10526917478 data:0x00000015
     kworker/0:0-4     [000] ....   330.481560: rtcpu_vinotify_event: tstamp:10527091376 tag:ATOMP_FS channel:0x00 frame:249 vi_tstamp:10526917481 data:0x00000000
     kworker/0:0-4     [000] ....   330.481565: rtcpu_vinotify_event: tstamp:10527091535 tag:CHANSEL_FAULT channel:0x23 frame:249 vi_tstamp:10526918481 data:0x00004004
     kworker/0:0-4     [000] ....   330.481569: rtcpu_vinotify_event: tstamp:10527091657 tag:RESERVED_19 channel:0x23 frame:249 vi_tstamp:10443884768 data:0x01020001
     kworker/0:0-4     [000] ....   330.481574: rtcpu_vinotify_event: tstamp:10527091795 tag:CHANSEL_NOMATCH channel:0x20 frame:249 vi_tstamp:10526921606 data:0x000006e9
     kworker/0:0-4     [000] ....   330.481578: rtcpu_vinotify_event: tstamp:10527091918 tag:CHANSEL_FAULT channel:0x23 frame:249 vi_tstamp:10526940356 data:0x00004001
     kworker/0:0-4     [000] ....   330.481583: rtcpu_vinotify_event: tstamp:10527092090 tag:RESERVED_19 channel:0x23 frame:249 vi_tstamp:10444584704 data:0x01020001
     kworker/0:0-4     [000] ....   330.537009: rtcpu_vinotify_event: tstamp:10528081776 tag:FE channel:0x00 frame:249 vi_tstamp:10528077797 data:0x00000025
     kworker/0:0-4     [000] ....   330.537015: rtcpu_vinotify_event: tstamp:10528081924 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:249 vi_tstamp:10528077797 data:0x00000000
     kworker/0:0-4     [000] ....   330.537017: rtcpu_vinotify_event: tstamp:10528082068 tag:RESERVED_19 channel:0x23 frame:249 vi_tstamp:10480994464 data:0x01020001
     kworker/0:0-4     [000] ....   330.537021: rtos_queue_send_from_isr_failed: tstamp:10528164433 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.537024: rtos_queue_send_from_isr_failed: tstamp:10528164586 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.537034: rtos_queue_send_from_isr_failed: tstamp:10528164726 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.537184: rtos_queue_send_from_isr_failed: tstamp:10528164861 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.537350: rtos_queue_send_from_isr_failed: tstamp:10528164993 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.537367: rtcpu_vinotify_event: tstamp:10528609703 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:249 vi_tstamp:10528077797 data:0x01000000
     kworker/0:0-4     [000] ....   330.537381: rtcpu_vinotify_event: tstamp:10528609833 tag:RESERVED_19 channel:0x23 frame:249 vi_tstamp:10481017120 data:0x01020001
     kworker/0:0-4     [000] ....   330.537394: rtcpu_vinotify_event: tstamp:10528609983 tag:ATOMP_FE channel:0x00 frame:249 vi_tstamp:10528077799 data:0x00000000
     kworker/0:0-4     [000] ....   330.537408: rtcpu_vinotify_event: tstamp:10528610108 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:10481032384 data:0x07020002
     kworker/0:0-4     [000] ....   330.537422: rtcpu_vinotify_event: tstamp:10528610267 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10481146944 data:0x10000000
     kworker/0:0-4     [000] ....   330.537642: rtcpu_vinotify_event: tstamp:10528610388 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10481176704 data:0x31000003
     kworker/0:0-4     [000] ....   330.537657: rtcpu_vinotify_event: tstamp:10528610550 tag:FS channel:0x00 frame:250 vi_tstamp:10528089318 data:0x00000015
     kworker/0:0-4     [000] ....   330.537672: rtcpu_vinotify_event: tstamp:10528610679 tag:ATOMP_FS channel:0x00 frame:250 vi_tstamp:10528089320 data:0x00000000
     kworker/0:0-4     [000] ....   330.537686: rtcpu_vinotify_event: tstamp:10528610821 tag:CHANSEL_FAULT channel:0x23 frame:250 vi_tstamp:10528090321 data:0x00004004
     kworker/0:0-4     [000] ....   330.537700: rtcpu_vinotify_event: tstamp:10528610944 tag:RESERVED_19 channel:0x23 frame:250 vi_tstamp:10481383616 data:0x01020002
     kworker/0:0-4     [000] ....   330.537714: rtcpu_vinotify_event: tstamp:10528611085 tag:CHANSEL_NOMATCH channel:0x20 frame:250 vi_tstamp:10528093446 data:0x000006e9
     kworker/0:0-4     [000] ....   330.537727: rtcpu_vinotify_event: tstamp:10528611207 tag:CHANSEL_FAULT channel:0x23 frame:250 vi_tstamp:10528112195 data:0x00004001
     kworker/0:0-4     [000] ....   330.537741: rtcpu_vinotify_event: tstamp:10528611365 tag:RESERVED_19 channel:0x23 frame:250 vi_tstamp:10482083584 data:0x01020002
     kworker/0:0-4     [000] ....   330.593138: rtcpu_vinotify_event: tstamp:10529253628 tag:FE channel:0x00 frame:250 vi_tstamp:10529249636 data:0x00000025
     kworker/0:0-4     [000] ....   330.593167: rtcpu_vinotify_event: tstamp:10529253776 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:250 vi_tstamp:10529249637 data:0x00000000
     kworker/0:0-4     [000] ....   330.593174: rtcpu_vinotify_event: tstamp:10529253904 tag:RESERVED_19 channel:0x23 frame:250 vi_tstamp:10518493344 data:0x01020002
     kworker/0:0-4     [000] ....   330.593331: rtos_queue_send_from_isr_failed: tstamp:10529336802 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   330.593342: rtos_queue_send_from_isr_failed: tstamp:10529336957 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   330.593352: rtos_queue_send_from_isr_failed: tstamp:10529337129 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   330.593390: rtos_queue_send_from_isr_failed: tstamp:10529337261 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   330.593399: rtos_queue_send_from_isr_failed: tstamp:10529337394 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   330.593408: rtcpu_vinotify_event: tstamp:10529748869 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:250 vi_tstamp:10529249637 data:0x01000000
     kworker/0:0-4     [000] ....   330.593416: rtcpu_vinotify_event: tstamp:10529749013 tag:RESERVED_19 channel:0x23 frame:250 vi_tstamp:10518516000 data:0x01020002
     kworker/0:0-4     [000] ....   330.593425: rtcpu_vinotify_event: tstamp:10529749161 tag:ATOMP_FE channel:0x00 frame:250 vi_tstamp:10529249639 data:0x00000000
     kworker/0:0-4     [000] ....   330.593433: rtcpu_vinotify_event: tstamp:10529749284 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:10518531296 data:0x07020003
     kworker/0:0-4     [000] ....   330.593441: rtcpu_vinotify_event: tstamp:10529749428 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10518645760 data:0x10000000
     kworker/0:0-4     [000] ....   330.593449: rtcpu_vinotify_event: tstamp:10529749568 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10518678944 data:0x31000004
     kworker/0:0-4     [000] ....   330.593457: rtcpu_vinotify_event: tstamp:10529749711 tag:FS channel:0x00 frame:251 vi_tstamp:10529261158 data:0x00000015
     kworker/0:0-4     [000] ....   330.593466: rtcpu_vinotify_event: tstamp:10529749839 tag:ATOMP_FS channel:0x00 frame:251 vi_tstamp:10529261160 data:0x00000000
     kworker/0:0-4     [000] ....   330.593474: rtcpu_vinotify_event: tstamp:10529749979 tag:CHANSEL_FAULT channel:0x23 frame:251 vi_tstamp:10529262161 data:0x00004004
     kworker/0:0-4     [000] ....   330.593482: rtcpu_vinotify_event: tstamp:10529750101 tag:RESERVED_19 channel:0x23 frame:251 vi_tstamp:10518882496 data:0x01020003
     kworker/0:0-4     [000] ....   330.593490: rtcpu_vinotify_event: tstamp:10529750240 tag:CHANSEL_NOMATCH channel:0x20 frame:251 vi_tstamp:10529265286 data:0x000006e9
     kworker/0:0-4     [000] ....   330.593499: rtcpu_vinotify_event: tstamp:10529750363 tag:CHANSEL_FAULT channel:0x23 frame:251 vi_tstamp:10529284036 data:0x00004001
     kworker/0:0-4     [000] ....   330.593507: rtcpu_vinotify_event: tstamp:10529750503 tag:RESERVED_19 channel:0x23 frame:251 vi_tstamp:10519582464 data:0x01020003
     kworker/0:0-4     [000] ....   330.593515: rtcpu_vinotify_event: tstamp:10530425445 tag:FE channel:0x00 frame:251 vi_tstamp:10530421477 data:0x00000025
     kworker/0:0-4     [000] ....   330.593523: rtcpu_vinotify_event: tstamp:10530425591 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:251 vi_tstamp:10530421477 data:0x00000000
     kworker/0:0-4     [000] ....   330.593531: rtcpu_vinotify_event: tstamp:10530425718 tag:RESERVED_19 channel:0x23 frame:251 vi_tstamp:10555992224 data:0x01020003

hello wmlovetoday,

couple of suggestion as below…

  1. could you please check you had assign the phy settings,
    for example,
<i>$l4t-r32.1/public_sources/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx274-a00.dtsi</i>

* == Signal properties ==
*
* phy_mode = "";
* PHY mode used by the MIPI lanes for this device
*

    mode0 { // IMX274_MODE_3840X2160
        ...
        phy_mode = "DPHY";
  1. suggest you also check you’d configure correct output data type.
    according to your register reporting.
CHANSEL_NOMATCH channel:0x20 frame:249 vi_tstamp:10526921606 data:0x000006e9

bit:5-10 means the CSI data type, which seems you’re using NvCsiDataType_User_8
you could also check header files for NVCSI datatypes.
$l4t-r32.1/public_sources/kernel/nvidia/include/soc/tegra/camrtc-capture.h

Hi JerryChang,
I check the dts that decompile from tegra194-p2888-0001-p2822-0000.dtb, phy_mode = “DPHY” was “remove”.
After I add phy_mode = “DPHY”,the CHANSEL_NOMATCH channel:0x20 is also appear.

kworker/0:4-10678 [000] ....   323.440920: rtcpu_vinotify_error: tstamp:10306944572 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:10306941701 data:0x00100000
     kworker/0:4-10678 [000] ....   323.440921: rtos_queue_send_from_isr_failed: tstamp:10307149612 queue:0x0bcb41f8
     kworker/0:4-10678 [000] ....   323.440922: rtos_queue_send_from_isr_failed: tstamp:10307149753 queue:0x0bcb8a60
     kworker/0:4-10678 [000] ....   323.440923: rtos_queue_send_from_isr_failed: tstamp:10307149895 queue:0x0bcba5e0
     kworker/0:4-10678 [000] ....   323.440925: rtos_queue_send_from_isr_failed: tstamp:10307150027 queue:0x0bcbb3a0
     kworker/0:4-10678 [000] ....   323.440926: rtos_queue_send_from_isr_failed: tstamp:10307150161 queue:0x0bcbc160
     kworker/0:4-10678 [000] ....   323.440927: rtcpu_vinotify_event: tstamp:10307421381 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:10306941701 data:0x00100000
     kworker/0:4-10678 [000] ....   323.440929: rtcpu_vinotify_event: tstamp:10307421513 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:11994699008 data:0x10000000
     kworker/0:4-10678 [000] ....   323.440930: rtcpu_vinotify_event: tstamp:10307421681 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:11994736096 data:0x31000001
     kworker/0:4-10678 [000] ....   323.440931: rtcpu_vinotify_event: tstamp:10307421808 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:11994742592 data:0x10000000
     kworker/0:4-10678 [000] ....   323.440932: rtcpu_vinotify_event: tstamp:10307421967 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:11994754496 data:0x07020001
     kworker/0:4-10678 [000] ....   323.440933: rtcpu_vinotify_event: tstamp:10307422089 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:11994784960 data:0x31000002
     kworker/0:4-10678 [000] ....   323.440934: rtcpu_vinotify_event: tstamp:10307422250 tag:FS channel:0x00 frame:71 vi_tstamp:10307106318 data:0x00000015
     kworker/0:4-10678 [000] ....   323.440935: rtcpu_vinotify_event: tstamp:10307422377 tag:ATOMP_FS channel:0x00 frame:71 vi_tstamp:10307106321 data:0x00000000
     kworker/0:4-10678 [000] ....   323.440936: rtcpu_vinotify_event: tstamp:10307422584 tag:CHANSEL_FAULT channel:0x23 frame:71 vi_tstamp:10307107321 data:0x00004004
     kworker/0:4-10678 [000] ....   323.440938: rtcpu_vinotify_event: tstamp:10307422752 tag:RESERVED_19 channel:0x23 frame:71 vi_tstamp:11999862176 data:0x01020001
     kworker/0:4-10678 [000] ....   323.440939: rtcpu_vinotify_event: tstamp:10307422910 tag:CHANSEL_NOMATCH channel:0x20 frame:71 vi_tstamp:10307110446 data:0x000006e9
     kworker/0:4-10678 [000] ....   323.440940: rtcpu_vinotify_event: tstamp:10307423032 tag:CHANSEL_FAULT channel:0x23 frame:71 vi_tstamp:10307129196 data:0x00004001
     kworker/0:4-10678 [000] ....   323.440941: rtcpu_vinotify_event: tstamp:10307423191 tag:RESERVED_19 channel:0x23 frame:71 vi_tstamp:12000562208 data:0x01020001
     kworker/0:4-10678 [000] ....   323.497690: rtcpu_vinotify_event: tstamp:10308270610 tag:FE channel:0x00 frame:71 vi_tstamp:10308266639 data:0x00000025
     kworker/0:4-10678 [000] ....   323.497697: rtcpu_vinotify_event: tstamp:10308270792 tag:CHANSEL_SHORT_FRAME channel:0x20 frame:71 vi_tstamp:10308266640 data:0x00000000
     kworker/0:4-10678 [000] ....   323.497700: rtcpu_vinotify_event: tstamp:10308270922 tag:RESERVED_19 channel:0x23 frame:71 vi_tstamp:12036972064 data:0x01020001

NVCSI_DATATYPE_USER_8, I will check it later.

I not sure my dtb is right. Below is decompile from tegra194-p2888-0001-p2822-0000.dtb,

<1> vi 
vi@15c10000 {
			compatible = "nvidia,tegra194-vi";
			reg = <0x0 0x15c10000 0x0 0x230000 0x0 0x15f00000 0x0 0x100000>;
			resets = <0x5 0x70 0x5 0x61>;
			reset-names = "vi", "tsctnvi";
			clocks = <0x4 0xa6 0x4 0xc4 0x4 0x51 0x4 0x52>;
			clock-names = "vi", "vi-const", "nvcsi", "nvcsilp";
			power-domains = <0x3 0xc>;
			nvidia,vi-falcon-device = <0x92>;
			iommus = <0x2 0x4>;
			iso-smmu;
			non-coherent;
			num-channels = <0x6>;     /* total 6, use VI stream 5*/
			linux,phandle = <0x6b>;
			phandle = <0x6b>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@0 {
					reg = <0x0>;
					status = "disabled";
					linux,phandle = <0x10c>;
					phandle = <0x10c>;

					endpoint {
						port-index = <0x0>;
						bus-width = <0x2>;
						remote-endpoint = <0x93>;
						vc-id = <0x0>;
						status = "disabled";
						linux,phandle = <0x9b>;
						phandle = <0x9b>;
					};
				};
                                port@1  port@2 port@3 port@4 are same with port@0, they are all disabled. 
<2> nvcsi 
nvcsi@15a00000 {
			compatible = "nvidia,tegra194-nvcsi";
			reg = <0x0 0x15a00000 0x0 0x50000>;
			power-domains = <0x3 0xc>;
			resets = <0x5 0x2b>;
			clocks = <0x4 0x51 0x4 0x52>;
			clock-names = "nvcsi", "nvcsilp";
			interrupts = <0x0 0x77 0x4>;
			num-ports = <0x6>;
			num-channels = <0x7>;  
/*************** Total 8, is it right I set 7 here? I want to use  port 6 and 7, because sensor output with 4 lanes.********/
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			num-tpg-channels = <0x24>;
			linux,phandle = <0x6c>;
			phandle = <0x6c>;
                        channel@0 {
				reg = <0x0>;
				status = "disabled";
				linux,phandle = <0x10e>;
				phandle = <0x10e>;

				ports {
					#address-cells = <0x1>;
					#size-cells = <0x0>;

					port@0 {
						reg = <0x0>;
						status = "disabled";
						linux,phandle = <0x10f>;
						phandle = <0x10f>;

						endpoint@0 {
							port-index = <0x0>;
							bus-width = <0x2>;
							remote-endpoint = <0x9a>;
							status = "disabled";
							linux,phandle = <0x2e>;
							phandle = <0x2e>;
						};
					};

					port@1 {
						reg = <0x1>;
						status = "disabled";
						linux,phandle = <0x110>;
						phandle = <0x110>;

						endpoint@1 {
							remote-endpoint = <0x9b>;
							status = "disabled";
							linux,phandle = <0x93>;
							phandle = <0x93>;
						};
					};
				};
			};
                         channel@1 channel@2 channel@3 channel@4 channel@5 are same with channel@0. 
                        channel@6 {      /* channel@6 is we used */
				reg = <0x6>;
				status = "okay";
				ports {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					port@0 {
						reg = <0x0>;
						status = "okay";

						endpoint@12 {
							status = "okay";
							port-index = <0x6>;
							bus-width = <0x4>;
							remote-endpoint = <0xa6>;
							linux,phandle = <0x39>;
							phandle = <0x39>;
						};
					};

					port@1 {
						reg = <0x1>;
						status = "okay";
						endpoint@13 {
							status = "okay";
							remote-endpoint = <0xa5>;
							linux,phandle = <0x98>;
							phandle = <0x98>;
						};
					};
				};
			};
/******** Because channel@6 with bus-width = <0x4>, so there is no channel@7, is it right? **************/

<3> tegra-camera-platform
tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		num_csi_lanes = <0x4>;
		max_lane_speed = <0x3d0900>;
		min_bits_per_pixel = <0xa>;
		vi_peak_byte_per_pixel = <0x2>;
		vi_bw_margin_pct = <0x19>;
		max_pixel_rate = <0xb71b0>;
		isp_peak_byte_per_pixel = <0x5>;
		isp_bw_margin_pct = <0x19>;
		tpg_max_iso = <0x3bc400>;
		status = "okay";
		linux,phandle = <0x114>;
		phandle = <0x114>;

		modules {

			module0 {
				badge = "tu390_rear";
				position = "rear";
				orientation = [31 00];
				status = "okay";
				linux,phandle = <0x107>;
				phandle = <0x107>;

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "tu390 30-0021";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tu390@21";
					status = "okay";
					linux,phandle = <0x108>;
					phandle = <0x108>;
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/lens_imx274@A6V26/";
					status = "disabled";
					linux,phandle = <0x118>;
					phandle = <0x118>;
				};
			};
<4>
tu390@21 {
			compatible = "nvidia,tu390";
			reg = <0x21>;
			status = "okay";
			devnode = "video0";
			physical_w = "15.0";
			physical_h = "12.5";
			sensor_model = "tu390";
			post_crop_frame_drop = [30 00];
			use_decibel_gain = "true";
			delayed_gain = "true";
			use_sensor_mode_id = "true";
			clocks = <0x4 0x24 0x4 0x24>;
			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			ldo-en-gpios = <0x13 0x3b 0x0>;
			pwdn-gpios = <0x13 0x3e 0x0>;
			fsync-gpios = <0x13 0x9e 0x0>;
			comready-gpios = <0x13 0x9d 0x0>;

			mode0 {
				mclk_khz = "24000";
				num_lanes = [34 00];
				tegra_sinterface = "serial_g";
				phy_mode = "DPHY";
				vc-id = [30 00];
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = [30 00];
				dynamic_pixel_bit_depth = "12";
				csi_pixel_bit_depth = "12";
				mode_type = "bayer";
				pixel_phase = "rggb";
				active_w = "1920";
				active_h = "1080";
				pixel_t = "bayer_rggb";
				readout_orientation = [30 00];
				line_length = "2200";
				inherent_gain = [31 00];
				mclk_multiplier = "6.18";
				pix_clk_hz = "742500000";
				min_gain_val = [30 00];
				max_gain_val = "30";
				min_hdr_ratio = [31 00];
				max_hdr_ratio = [31 00];
				min_framerate = "1.5";
				max_framerate = "30";
				min_exp_time = "118";
				max_exp_time = "660000";
				embedded_metadata_height = [30 00];
			};

Here is my dts file:
{
	host1x {
		vi@15c10000 {
			num-channels = <6>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@5 {
					reg = <5>;
					status = "okay";
					tu390_vi_in0: endpoint {
						vc-id = <0>;
						status = "okay";
						port-index = <5>;
						bus-width = <4>;
						remote-endpoint = <&tu390_csi_out0>;
					};
				};
			};
		};
		nvcsi@15a00000 {
			num-channels = <7>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@6 {
				reg = <6>;
				status = "okay";
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						status = "okay";
						tu390_csi_in0: endpoint@12 {
							status = "okay";
							port-index = <6>;
							bus-width = <4>;
							remote-endpoint = <&tu390_out0>;
						};
					};
					port@1 {
						reg = <1>;
						status = "okay";
						tu390_csi_out0: endpoint@13 {
							status = "okay";
							remote-endpoint = <&tu390_vi_in0>;
						};
					};
				};
			};
		};
	}; 
	/* set camera gpio direction to output */
	gpio@2200000 {
		camera-control-output-low {
			gpio-hog;
			output-low;
			gpios = <CAM0_PWDN 0  CAM0_LDO_EN 0
				 CAM0_FSYNC 0 CAM0_COMREADY 0
				 SLVS_CAM0_RST_L 0>;
			label = "cam0-pwdn", "cam0-ldo_en",
				"cam0-fsync", "cam0-comready";
		};
	};
	i2c@3180000 {
		tu390@21 {
			compatible = "nvidia,tu390";
			reg = <0x21>;
			status = "okay";
			devnode = "video0";	
			physical_w = "15.0";
			physical_h = "12.5";
			sensor_model ="tu390";
			post_crop_frame_drop = "0";
			use_decibel_gain = "true";
			delayed_gain = "true";
			use_sensor_mode_id = "true";
			
			clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,<&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			ldo-en-gpios = <&tegra_main_gpio CAM0_LDO_EN GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
			fsync-gpios = <&tegra_main_gpio CAM0_FSYNC GPIO_ACTIVE_HIGH>;
			comready-gpios = <&tegra_main_gpio CAM0_COMREADY GPIO_ACTIVE_HIGH>;

			mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_g";
				phy_mode = "DPHY";
				vc-id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				dynamic_pixel_bit_depth = "12";
				csi_pixel_bit_depth = "12";
				mode_type = "bayer";
				pixel_phase = "rggb";

				active_w = "1920";
				active_h = "1080";
				pixel_t = "bayer_rggb";
				readout_orientation = "0";
				line_length = "2200";    /* 4400*/
				inherent_gain = "1";
				mclk_multiplier = "30.94";   /* 30.94*/
				pix_clk_hz = "742500000";   /*  148500000*/

				min_gain_val = "0"; /* dB */
				max_gain_val = "30"; /* dB */
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "1.5";
				max_framerate = "30";
				min_exp_time = "118"; /*us,4 lines*/
				max_exp_time = "660000";
				embedded_metadata_height = "0";   /*front embedded data type is 0x2c may be non recognition by mipi*/
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					tu390_out0: endpoint {
						vc-id = <0>;
						port-index = <6>;
						bus-width = <4>;
						remote-endpoint = <&tu390_csi_in0>;
					};
				};
			};
		};
	};
};

/ {
	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";	
		status = "okay";	
		num_csi_lanes = <4>;   							/*1*/
		max_lane_speed = <4000000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;
/*tegra194-p2822-camera-modules.dtsi  to enable status */
		modules {
			module0 {
				status = "okay";
				badge = "tu390_rear";
				position = "rear";
				orientation = "1";
				drivernode0 {
					status = "okay";
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "tu390 30-0021";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/tu390@21";
				};
			};
		};
	};
};

hello wmlovetoday,

  1. please check my previous suggestion in comment #10, you’ll need correct the port binding between VI and CSI.

  2. I will not suggest using tools to disassembler the dtb file for modification and convert it as another dtb file for bring-up process, this indeed a quick method but surprise sometime happened.

Hi JerryChang,
I really don’t know where is the error.is it not right that CSI G and H to VI 5 ?
could tell me the error that binding between VI and CSI directly.

the log appare:
I see err_data in struct capture_descriptor. It was written by RTCPU, what meaning where can I get?

[   96.118826] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 512
[   96.152248] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 0, err_data 512
[   96.185650] tegra194-vi5 15c10000.vi: corr_err: discarding frame 3, flags: 0, err_data 512
[   96.219177] tegra194-vi5 15c10000.vi: corr_err: discarding frame 4, flags: 0, err_data 512
[   96.252582] tegra194-vi5 15c10000.vi: corr_err: discarding frame 5, flags: 0, err_data 512
[   96.286001] tegra194-vi5 15c10000.vi: corr_err: discarding frame 6, flags: 0, err_data 512
[   96.319421] tegra194-vi5 15c10000.vi: corr_err: discarding frame 7, flags: 0, err_data 512
[   96.352918] tegra194-vi5 15c10000.vi: corr_err: discarding frame 8, flags: 0, err_data 512
[   96.386401] tegra194-vi5 15c10000.vi: corr_err: discarding frame 9, flags: 0, err_data 512
[   96.419789] tegra194-vi5 15c10000.vi: corr_err: discarding frame 10, flags: 0, err_data 512

hello wmlovetoday,

  1. you’ll need to configure VI to receive data from CSI block.
    please also access Tutorials page, and expand [Developer Tools] session, please check the [V4L2 Sensor Driver Development Tutorial] for the description of the port bindings.

  2. there’s RTCPU firmware to handle camera operations.
    we don’t public release sources of RTCPU, this firmware is flash to rce-fw partition,
    for example,

[  96.5141 ] Writing partition rce-fw with camera-rtcpu-rce_sigheader.img.encrypt
[  96.5167 ] [................................................] 100%

Hi wmlovetoday:
I have the same problem as you now.Have you solved it?