Imx390 probing

Hi, I’m using li-imx390-gmsl cam with Orin and getting green screen output with gstreamer

dmesg:

[23134.309562] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[23134.318733] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[23134.329562] (NULL device *): vi_capture_control_message: NULL VI channel received
[23134.337500] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[23134.348200] (NULL device *): vi_capture_control_message: NULL VI channel received
[23134.355912] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[23134.366697] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

trace:

# tracer: nop
#
# entries-in-buffer/entries-written: 39/39   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        v4l2-ctl-4303    [003] .... 22982.631132: tegra_channel_open: vi-output, imx390 30-001b
        v4l2-ctl-4303    [003] .... 22982.635895: tegra_channel_set_power: imx390 30-001b : 0x1
        v4l2-ctl-4303    [003] .... 22982.635905: camera_common_s_power: status : 0x1
        v4l2-ctl-4303    [002] .... 22982.698039: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-4303    [002] .... 22982.698044: csi_s_power: enable : 0x1
        v4l2-ctl-4303    [002] .... 22982.700313: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
        v4l2-ctl-4303    [003] .... 22982.701614: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-4303    [003] .... 22982.714907: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-4303    [003] .... 22982.714909: csi_s_stream: enable : 0x1
        v4l2-ctl-4303    [003] .... 22982.715211: tegra_channel_set_stream: imx390 30-001b : 0x1
     kworker/1:1-4088    [001] .... 22982.750150: rtcpu_vinotify_event: tstamp:719088392063 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:23010812736864 data:0x399d580010000000
     kworker/1:1-4088    [001] .... 22982.750151: rtcpu_vinotify_event: tstamp:719088392220 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:23010812743296 data:0x0000000031000001
     kworker/1:1-4088    [001] .... 22982.750152: rtcpu_vinotify_event: tstamp:719088392375 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:23010812788640 data:0x399d550010000000
     kworker/1:1-4088    [001] .... 22982.750152: rtcpu_vinotify_event: tstamp:719088392508 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:23010812795168 data:0x0000000031000002
 vi-output, imx3-4305    [003] .... 22985.374284: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13

extracted_proc.txt (466.9 KB)

hello freemansdubz,

may I know what’s the Jetpack release version you’re now using.
also, is it a camera module from Leopard Imaging Inc.?

Hello Jerry. Yes, camera module from Leopard Imaging. I’m using Jetpack 5.1.1 R35.3.1

I’ve edited device-tree and now its possible to capture raw image with v4l2-ctl. But sensor does not provide correct image, it only reacts to light
There is edited deice-tree:

			i2c@0 {
				reg = <0x00>;
				i2c-mux,deselect-on-exit;
				#address-cells = <0x01>;
				#size-cells = <0x00>;
				i2c-mux-idle-disconnect;

				imx390isp_a@1b {
					compatible = "sony,imx390\0nvidia,imx390isp";
					def-addr = <0x21>;
					physical_w = "15.0";
					physical_h = "12.5";
					sensor_model = "imx390isp";
					post_crop_frame_drop = "0";
					use_sensor_mode_id = "true";
					reg = <0x1b>;
					reg_mux = <0x00>;
					clocks = <0x02 0x24 0x02 0x24>;
					clock-names = "extperiph1\0pllp_grtba";
					mclk = "extperiph1";
					nvidia,gmsl-ser-device = <0x0a>;
					nvidia,gmsl-dser-device = <0x0b>;

					mode0 {
						mclk_khz = "24000";
						tegra_sinterface = "serial_a";
						vc_id = "0";
						num_lanes = "2";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";
						mode_type = "bayer";
						pixel_phase = "rggb";
						csi_pixel_bit_depth = "12";
						dynamic_pixel_bit_depth = "12";
						active_w = "1920";
						active_h = "1080";
						readout_orientation = "0";
						line_length = "2200";
						inherent_gain = "1";
						pix_clk_hz = "74250000";
						serdes_pix_clk_hz = "200000000";
						gain_factor = "10";
						min_gain_val = "0";
						max_gain_val = "300";
						step_gain_val = "3";
						default_gain = "0";
						min_hdr_ratio = "1";
						max_hdr_ratio = "1";
						framerate_factor = "1000000";
						min_framerate = "30000000";
						max_framerate = "30000000";
						step_framerate = "1";
						default_framerate = "30000000";
						exposure_factor = "1000000";
						min_exp_time = "118";
						max_exp_time = "33333";
						step_exp_time = "1";
						default_exp_time = "33333";
						embedded_metadata_height = "0";
					};

					ports {
						#address-cells = <0x01>;
						#size-cells = <0x00>;

						port@0 {
							reg = <0x00>;

							endpoint {
								vc-id = <0x00>;
								port-index = <0x00>;
								bus-width = <0x02>;
								remote-endpoint = <0x0c>;
								phandle = <0x2b8>;
							};
						};
					};

					gmsl-link {
						src-csi-port = "b";
						dst-csi-port = "a";
						serdes-csi-link = "a";
						csi-mode = "1x4";
						st-vc = <0x00>;
						vc-id = <0x00>;
						num-lanes = <0x04>;
						streams = "ued-u1\0raw12";
					};
				};

				imx390isp_b@1c {
					compatible = "sony,imx390\0nvidia,imx390isp";
					def-addr = <0x21>;
					physical_w = "15.0";
					physical_h = "12.5";
					sensor_model = "imx390isp";
					post_crop_frame_drop = "0";
					use_sensor_mode_id = "true";
					reg = <0x1c>;
					reg_mux = <0x00>;
					clocks = <0x02 0x24 0x02 0x24>;
					clock-names = "extperiph1\0pllp_grtba";
					mclk = "extperiph1";
					nvidia,gmsl-ser-device = <0x0d>;
					nvidia,gmsl-dser-device = <0x0b>;

					mode0 {
						tegra_sinterface = "serial_a";
						vc_id = "1";
						mclk_khz = "24000";
						num_lanes = "2";
						discontinuous_clk = "no";
						dpcm_enable = "false";
						cil_settletime = "0";
						mode_type = "bayer";
						pixel_phase = "rggb";
						csi_pixel_bit_depth = "12";
						dynamic_pixel_bit_depth = "12";
						active_w = "1920";
						active_h = "1080";
						readout_orientation = "0";
						line_length = "2200";
						inherent_gain = "1";
						pix_clk_hz = "74250000";
						serdes_pix_clk_hz = "200000000";
						gain_factor = "10";
						min_gain_val = "0";
						max_gain_val = "300";
						step_gain_val = "3";
						default_gain = "0";
						min_hdr_ratio = "1";
						max_hdr_ratio = "1";
						framerate_factor = "1000000";
						min_framerate = "30000000";
						max_framerate = "30000000";
						step_framerate = "1";
						default_framerate = "30000000";
						exposure_factor = "1000000";
						min_exp_time = "118";
						max_exp_time = "33333";
						step_exp_time = "1";
						default_exp_time = "33333";
						embedded_metadata_height = "0";
					};

					ports {
						#address-cells = <0x01>;
						#size-cells = <0x00>;

						port@0 {
							reg = <0x00>;

							endpoint {
								vc-id = <0x01>;
								port-index = <0x00>;
								bus-width = <0x02>;
								remote-endpoint = <0x0e>;
								phandle = <0x2ba>;
							};
						};
					};

					gmsl-link {
						src-csi-port = "b";
						dst-csi-port = "a";
						serdes-csi-link = "b";
						csi-mode = "1x4";
						st-vc = <0x00>;
						vc-id = <0x01>;
						num-lanes = <0x04>;
						streams = "ued-u1\0raw12";
					};
				};

				max9296@48 {
					compatible = "maxim,max9296";
					streams = "yuv8";
					reg = <0x48>;
					csi-mode = "2x4";
					max-src = <0x02>;
					fsync-gpio = <0x06>;
					reset-gpios = <0x04 0x3e 0x00>;
					phandle = <0x0b>;
				};

				max9295_prim@62 {
					compatible = "maxim,max9295";
					reg = <0x62>;
					is-prim-ser;
					phandle = <0x313>;
				};

				max9295_a@40 {
					compatible = "maxim,max9295";
					reg = <0x40>;
					nvidia,gmsl-dser-device = <0x0b>;
					phandle = <0x0a>;
				};

				max9295_b@60 {
					compatible = "maxim,max9295";
					reg = <0x60>;
					nvidia,gmsl-dser-device = <0x0b>;
					phandle = <0x0d>;
				};
			};

And also images from sensor


these looks like out-of-focus.
please try change the focal length. you may rotate your lens manually to adjust it.

Thanks for help. Root cause was incorrect device-tree. After editing dts from source and recompiling kernel and dtb I can probe single camera.

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