GMSL2 MAX9296a MAX96717 ISX031

Hello,

I got a problem get the streaming out of the ISX031 which is connected over GMSL.
The camera sensor is connected to a MAX96717 Serializer and the serializer is connected over a MAX9626a deserializer to CSI connector.
As I could see the drivers are loaded and the gmsl seems to be established, but the driver of the sensor won’t enter the s_stream.
What am I missing.

I’m using the Jetpack 6.2.1 with the 5.15.148-tegra kernel.

My devicetree:
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

/dts-v1/;
/plugin/;

include <dt-bindings/tegra234-p3767-0000-common.h>
include <dt-bindings/clock/tegra234-clock.h>
include <dt-bindings/gpio/tegra234-gpio.h>

define CAM0_PWDN TEGRA234_MAIN_GPIO(H, 6)
define CAM1_PWDN TEGRA234_MAIN_GPIO(AC, 0)
define CAM2_PWDN TEGRA234_AON_GPIO(CC, 1) // GPIO04
define CAM3_PWDN TEGRA234_AON_GPIO(EE, 2) // GPIO10
define CAMERA_I2C_MUX_BUS(x) (0x1E + x)

// CAM0_MCLK - Pin_116 - GPIO(P, 0)
// CAM1_MCLK - Pin_122 - GPIO(P, 1)
// CAM2_MCLK - GPIO02 - GPIO(Q, 5)
// CAM3_MCLK - GPIO11 - GPIO(Q, 6)

/ {
overlay-name = “MAX9296A → MAX96717 → ISX031 2-lane”;
jetson-header-name = “Jetson 24pin CSI Connector”;
compatible = JETSON_COMPATIBLE_P3768;

fragment-camera@0 {
	target-path = "/";
	__overlay__ {

tegra-capture-vi  {
	num-channels = <1>;
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			status = "okay";
			reg = <0>;
			dsboard_ornx_vi_in0: endpoint {
				status = "okay";
				port-index = <0>;
				bus-width = <2>;
				remote-endpoint = <&dsboard_ornx_csi_out0>;
			};
		};
	};
};

bus@0 {
	host1x@13e00000 {
		nvcsi@15a00000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			channel@0 {
				status = "okay";
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						dsboard_ornx_csi_in0: endpoint@0 {
							status = "okay";
							port-index = <0>;
							bus-width = <2>;
							vc-id = <0>;
							remote-endpoint = <&des0_out_ep>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						dsboard_ornx_csi_out0: endpoint@1 {
							status = "okay";
							remote-endpoint = <&dsboard_ornx_vi_in0>;
						};
					};
				};
			};
		};
	};

	i2c@3180000 {
		pca9544a_70: pca9544a@70 {
			status = "okay";
			force_bus_start = <CAMERA_I2C_MUX_BUS(0)>;

			i2c@0 {
				reg = <0>;
				i2c-mux,deselect-on-exit;
				#address-cells = <1>;
				#size-cells = <0>;
				
				des0: deserializer@48 {
					compatible = "maxim,max9296a";
					reg = <0x48>;                 /* <-- adjust to your strap/address */

					/* Required by the base maxim-deserializer.yaml */
					#address-cells = <1>;
					#size-cells = <0>;
					maxim,tunnel-mode = <1>;
					
					/* Enable link 0 to establish GMSL connection */
					maxim,link-enable-mask = <0x01>;
					maxim,him-enable;  /* High immunity mode for better signal integrity */

					/*
					* max9296a binding limits this to maxItems=2.
					* Values are example alias addresses.
					*/
					i2c-alias-pool = <0x60 0x61>;

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

						/* Output port: deserializer -> SoC CSI receiver */
						port@0 {
							reg = <0>;
							max9296_chan0_out: endpoint {
								remote-endpoint = <&dsboard_ornx_csi_in0>;
								clock-lanes = <0>;
								data-lanes = <1 2>;
							};
						};							/* Input port: serializer -> deserializer */
						port@1 {
							reg = <1>;
							max9296_chan0_in: endpoint {
								remote-endpoint = <&ser0_out_ep>;
							};
						};
					};
					
					/*
					* max9296a binding: i2c@0..1 with reg 0..1
					* This creates “virtual” downstream I2C adapters per link.
					*/
					i2c-atr {
						#address-cells = <1>;
						#size-cells = <0>;

						/* Link 0 downstream I2C */
						des0_i2c0: i2c@0 {
							reg = <0>;
							#address-cells = <1>;
							#size-cells = <0>;

							/*
							* Serializer on link0.
							* (reg = serializer I2C address on the remote bus)
							*/
							ser0: serializer@40 {
								compatible = "maxim,max96717";
								reg = <0x40>;      /* <-- adjust to your strap/address */

								#address-cells = <1>;
								#size-cells = <0>;

								/* Required by maxim,max96717.yaml */
								gpio-controller;
								#gpio-cells = <2>;

								/*
								* max96717 binding limits this to maxItems=1.
								* Used for aliasing access to devices behind the serializer.
								*/
								i2c-alias-pool = <0x30>;

								/*
								* max96717 binding allows only i2c@0 (reg max 0).
								* Put your image sensor behind the serializer here.
								*/
								i2c-atr {
									#address-cells = <1>;
									#size-cells = <0>;

									ser0_i2c0: i2c@0 {
										reg = <0>;
										#address-cells = <1>;
										#size-cells = <0>;

										/* Optional: example sensor placeholder */
										sensor0: sensor@1a {
											compatible = "sony,isx031";
											reg = <0x1a>;
											
											/* Add these required properties */
											devnode = "video0";
											physical_w = "15.0";
											physical_h = "12.5";
											sensor_model = "isx031";
											use_sensor_mode_id = "true";

											/* GMSL link configuration - REQUIRED for GMSL framework */
											gmsl-link {
												src-csi-port = "a";      /* Port at which sensor is connected to serializer */
												dst-csi-port = "a";      /* Destination CSI port on Jetson (NVCSI) */
												serdes-csi-link = "a";   /* GMSL link (link A) */
												csi-mode = "1x2";        /* 1 sensor, 2 lanes */
												st-vc = <0>;             /* Source virtual channel ID */
												vc-id = <0>;             /* Destination virtual channel ID assigned by deserializer */
												num-lanes = <2>;         /* Number of CSI lanes */
												streams = "yuv8";        /* Stream type */
											};

											/* Add mode configuration matching your ISX031 specs */
											mode0 { /* ISX031_MODE_1920x1280_YUYV */
												mclk_khz = "24000";
												num_lanes = "2";
												tegra_sinterface = "serial_a";
												phy_mode = "DPHY";
												discontinuous_clk = "no";
												dpcm_enable = "false";
												cil_settletime = "0";
												vc_id = "0";             /* REQUIRED: Virtual channel ID for ARGUS */

												active_w = "1920";
												active_h = "1280";
												mode_type = "yuv";
												pixel_phase = "yuyv";
												csi_pixel_bit_depth = "16";
												readout_orientation = "0";
												line_length = "2120";
												inherent_gain = "1";
												pix_clk_hz = "125000000";
												serdes_pix_clk_hz = "300000000";

												gain_factor = "10";
												framerate_factor = "1000000";
												exposure_factor = "1000000";
												min_gain_val = "1"; /* dB */
												max_gain_val = "480"; /* dB */
												step_gain_val = "3"; /* 0.3 */
												default_gain = "1";
												min_hdr_ratio = "1";
												max_hdr_ratio = "1";
												min_framerate = "30000000"; /* 30.0 fps */
												max_framerate = "30000000"; /* 30.0 fps */
												step_framerate = "1";
												default_framerate = "30000000"; /* 30.0 fps */
												min_exp_time = "30"; /* us, 2 lines */
												max_exp_time = "660000";
												step_exp_time = "1";
												default_exp_time = "33334"; /* us */

												embedded_metadata_height = "0";
											};

											/* Example media graph endpoint from sensor -> serializer input */
											port {
												sensor0_out: endpoint {
													remote-endpoint = <&ser0_in_ep>;
													/* data-lanes/clock-lanes if CSI-2 sensor */
													clock-lanes = <0>;
													data-lanes = <1 2>; 
												};
											};
										};
									};
								};

								

								/*
								* Per maxim,max96717.yaml:
								*  - pipe reg must be 0
								*  - maxim,phy-id must be 0
								*/
								pipe@0 {
									reg = <0>;
									maxim,phy-id = <0>;
									maxim,stream-id = <0>; /* allowed by base serializer schema */
								};

								/*
								* Per maxim,max96717.yaml:
								*  - maxim,pipe-id must be 0
								*  - maxim,vc-id 0..15
								*/
								channel@0 {
									reg = <0>;
									maxim,pipe-id = <0>;
									maxim,vc-id = <0>;
									
									ports {
										#address-cells = <1>;
										#size-cells = <0>;

										/* Output port: serializer -> deserializer link */
										port@0 {
											reg = <0>;
											ser0_out_ep: endpoint {
												remote-endpoint = <&des0_link0_in_ep>;
											};
										};

										/* Input port: sensor -> serializer */
										port@1 {
											reg = <1>;
											ser0_in_ep: endpoint {
												remote-endpoint = <&sensor0_out>;
											};
										};
									};
									
								};
							};
						};

						/* Link 1 downstream I2C (unused in this minimal example) */
						des0_i2c1: i2c@1 {
							reg = <1>;
							#address-cells = <1>;
							#size-cells = <0>;
							/* Add ser1 here if you use link 1 */
						};
					};

					/*
					* MAX9296A-specific constraints (from maxim,max9296a.yaml):
					*  - pipe reg 0..3
					*  - maxim,link-id 0..1
					*  - maxim,phy-id 0..1
					*/
					pipe@0 {
						reg = <0>;
						maxim,link-id = <0>;
						maxim,phy-id  = <0>;
						maxim,stream-id = <0>;
					};

					/*
					* MAX9296A channel constraints:
					*  - maxim,pipe-id 0..3
					*  - maxim,phy-id 0..1
					* Base deserializer schema requires ports with port@0 + port@1.
					*/
					channel@0 {
						reg = <0>;
						maxim,pipe-id = <0>;
						maxim,phy-id  = <0>;
						maxim,src-vc-id = <0>;
						maxim,dst-vc-id = <0>;
						ports {
							#address-cells = <1>;
							#size-cells = <0>;

							/* Output port: deserializer -> SoC CSI receiver */
							port@0 {
								reg = <0>;
								des0_out_ep: endpoint {
									remote-endpoint = <&dsboard_ornx_csi_in0>;
									/* Typical CSI-2 properties if your endpoint schema expects them */
									clock-lanes = <0>;
									data-lanes = <1 2>;
								};
							};

							/* Input port: serializer -> deserializer */
							port@1 {
								reg = <1>;
								des0_link0_in_ep: endpoint {
									remote-endpoint = <&ser0_out_ep>;
								};
							};
						};
						
					};
				};
			};
		};
	};
};

tegra-camera-platform {
	compatible = "nvidia, tegra-camera-platform";
	/**
	* Physical settings to calculate max ISO BW
	*
	* num_csi_lanes = <>;
	* Total number of CSI lanes when all cameras are active
	*
	* max_lane_speed = <>;
	* Max lane speed in Kbit/s
	*
	* min_bits_per_pixel = <>;
	* Min bits per pixel
	*
	* vi_peak_byte_per_pixel = <>;
	* Max byte per pixel for the VI ISO case
	*
	* vi_bw_margin_pct = <>;
	* Vi bandwidth margin in percentage
	*
	* max_pixel_rate = <>;
	* Max pixel rate in Kpixel/s for the ISP ISO case
	*
	* isp_peak_byte_per_pixel = <>;
	* Max byte per pixel for the ISP ISO case
	*
	* isp_bw_margin_pct = <>;
	* Isp bandwidth margin in percentage
	*/
	num_csi_lanes = <8>;
	max_lane_speed = <1500000>;
	min_bits_per_pixel = <10>;
	vi_peak_byte_per_pixel = <2>;
	vi_bw_margin_pct = <25>;
	max_pixel_rate = <7500000>;
	isp_peak_byte_per_pixel = <5>;
	isp_bw_margin_pct = <25>;

	/**
	 * The general guideline for naming badge_info contains 3 parts, and is as follows,
	 * The first part is the camera_board_id for the module; if the module is in a FFD
	 * platform, then use the platform name for this part.
	 * The second part contains the position of the module, ex. "rear" or "front".
	 * The third part contains the last 6 characters of a part number which is found
	 * in the module's specsheet from the vendor.
	 */
	modules {
		module0 {
			status = "okay";
			badge = "dsboard_ornx_bottomleft";
			position = "bottomleft";
			orientation = "1";
			drivernode0 {
				status = "okay";
				pcl_id = "v4l2_sensor";
				sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/pca9544a@70/i2c@0/deserializer@48/i2c-atr/i2c@0/serializer@40/i2c-atr/i2c@0/sensor@1a";
			};
		};
	};
};

	}; //__overlay__ ends
}; //fragment-camera@0 ends

fragment@1 {
    target-path = "/bus@0/gpio@2200000";
    __overlay__ {
        camera-control-output-high {
            gpio-hog;
            output-high;
            gpios = <CAM0_PWDN GPIO_ACTIVE_HIGH>;
            label = "cam0-pwdn";
        };
    };
};

};

Here is the oputput of the media-ctl

This is the output after the command:
v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=5 --stream-to=/tmp/capture.raw

Hope sombody could help me with that and could tell me what am I missing.

Kind regards

Try on another camera port(CSI-2) and get the trace log.

sudo su
modprobe rtcpu_debug

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0

cat /sys/kernel/debug/tracing/trace

At the moment I didn’t get it working on the csi-2 port, so I made the trace log on csi-0 port.
I will upload the trace log of the csi-2 as I get to work.

So here is the trace log from csi-0:

tracer: nop

# 

# entries-in-buffer/entries-written: 119/119   #P:6

# 

# \_-------=> irqs-off

# / \_------=> need-resched

# | / \_-----=> need-resched-lazy

# || / \_----=> hardirq/softirq

# ||| / \_—=> preempt-depth

# |||| / \_–=> preempt-lazy-depth

# ||||| / \_-=> migrate-disable

# |||||| /     delay

# TASK-PID     CPU#  |||||||  TIMESTAMP  FUNCTION

# | |         |   |||||||      |         |

v4l2-ctl-5594    [001] .......   545.514525: tegra_channel_open: vi-output, max9296a 9-0048:0
v4l2-ctl-5594    [001] .......   545.532924: tegra_channel_set_power: max9296a 9-0048:0 : 0x1
v4l2-ctl-5594    [001] .......   545.532927: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-5594    [001] .......   545.532930: csi_s_power: enable : 0x1
v4l2-ctl-5594    [001] .......   545.534598: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20

vi-output, max9-5595    \[003\] …   545.543678: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   545.543687: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   545.543689: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   545.543691: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
v4l2-ctl-5594    \[001\] …   545.543710: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-5594    \[001\] …   545.544844: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-5594    \[001\] …   545.544846: csi_s_stream: enable : 0x1
v4l2-ctl-5594    \[001\] …   545.545166: tegra_channel_set_stream: max9296a 9-0048:0 : 0x1
kworker/5:2-4955    \[005\] …   545.564804: rtcpu_string: tstamp:17903188561 id:0x04010000 str:“VM0 activating.”
kworker/5:2-4955    \[005\] …   545.564809: rtcpu_vinotify_event: tstamp:17903697984 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:572907874688 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   545.564810: rtcpu_vinotify_event: tstamp:17903698123 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:572907881088 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   545.564811: rtcpu_vinotify_event: tstamp:17903698277 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:572907884096 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   545.564811: rtcpu_vinotify_event: tstamp:17903698411 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:572907931232 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   545.564812: rtcpu_vinotify_event: tstamp:17903698563 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:572907937728 data:0x0000000031000002
vi-output, max9-5596    \[002\] …   548.054099: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[003\] …   548.054214: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   548.054223: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   548.054225: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   548.054227: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   548.084686: rtcpu_vinotify_event: tstamp:17982124131 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:575418407616 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   548.084689: rtcpu_vinotify_event: tstamp:17982124289 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:575418414048 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   548.084690: rtcpu_vinotify_event: tstamp:17982124424 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:575418417056 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   548.084691: rtcpu_vinotify_event: tstamp:17982124578 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:575418459712 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   548.084692: rtcpu_vinotify_event: tstamp:17982124712 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:575418466208 data:0x0000000031000002
vi-output, max9-5596    \[002\] …   550.613834: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[003\] …   550.614170: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   550.614183: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   550.614185: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   550.614187: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   550.660588: rtcpu_vinotify_event: tstamp:18061902607 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:577978363712 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   550.660591: rtcpu_vinotify_event: tstamp:18061902744 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:577978370112 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   550.660592: rtcpu_vinotify_event: tstamp:18061902900 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:577978373120 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   550.660593: rtcpu_vinotify_event: tstamp:18061903032 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:577978420256 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   550.660594: rtcpu_vinotify_event: tstamp:18061903185 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:577978426784 data:0x0000000031000002
vi-output, max9-5596    \[003\] …   553.172961: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[000\] …   553.173063: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   553.173073: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   553.173074: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   553.173075: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   553.184484: rtcpu_vinotify_event: tstamp:18141790152 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:580537253280 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   553.184487: rtcpu_vinotify_event: tstamp:18142120549 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:580537272992 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   553.184488: rtcpu_vinotify_event: tstamp:18142120688 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:580537276000 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   553.184489: rtcpu_vinotify_event: tstamp:18142120841 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:580537333888 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   553.184490: rtcpu_vinotify_event: tstamp:18142120973 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:580537340384 data:0x0000000031000002
vi-output, max9-5596    \[003\] …   555.732991: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[000\] …   555.733089: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   555.733098: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   555.733099: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   555.733100: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   555.760386: rtcpu_vinotify_event: tstamp:18221898897 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:583097287040 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   555.760389: rtcpu_vinotify_event: tstamp:18221899063 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:583097293440 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   555.760390: rtcpu_vinotify_event: tstamp:18221899220 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:583097296448 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   555.760391: rtcpu_vinotify_event: tstamp:18221899352 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:583097338720 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   555.760392: rtcpu_vinotify_event: tstamp:18221899505 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:583097345184 data:0x0000000031000002
vi-output, max9-5596    \[003\] …   558.292932: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[000\] …   558.293049: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   558.293062: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   558.293063: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[000\] …   558.293065: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   558.336289: rtcpu_vinotify_event: tstamp:18302015505 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:585657240576 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   558.336292: rtcpu_vinotify_event: tstamp:18302015662 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:585657247008 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   558.336293: rtcpu_vinotify_event: tstamp:18302015798 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:585657250016 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   558.336294: rtcpu_vinotify_event: tstamp:18302015950 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:585657292704 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   558.336295: rtcpu_vinotify_event: tstamp:18302016082 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:585657299200 data:0x0000000031000002
vi-output, max9-5596    \[001\] …   560.852896: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[000\] …   560.853025: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   560.853058: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   560.853065: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   560.853066: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   560.860192: rtcpu_vinotify_event: tstamp:18381789442 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:588217220160 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   560.860195: rtcpu_vinotify_event: tstamp:18381789579 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:588217226560 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   560.916190: rtcpu_vinotify_event: tstamp:18382098074 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:588217238048 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   560.916193: rtcpu_vinotify_event: tstamp:18382098215 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:588217319488 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   560.916193: rtcpu_vinotify_event: tstamp:18382098372 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:588217325984 data:0x0000000031000002
vi-output, max9-5596    \[001\] …   563.412917: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[003\] …   563.413044: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   563.413054: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   563.413056: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   563.413057: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   563.436107: rtcpu_vinotify_event: tstamp:18461876536 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:590777237248 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   563.436111: rtcpu_vinotify_event: tstamp:18461876692 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:590777243648 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   563.436112: rtcpu_vinotify_event: tstamp:18461876829 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:590777246656 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   563.436113: rtcpu_vinotify_event: tstamp:18461876981 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:590777289344 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   563.436114: rtcpu_vinotify_event: tstamp:18461877114 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:590777295840 data:0x0000000031000002
vi-output, max9-5596    \[001\] …   565.973032: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[003\] …   565.973135: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   565.973141: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   565.973142: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   565.973143: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   566.011994: rtcpu_vinotify_event: tstamp:18541993060 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:593337323840 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   566.011997: rtcpu_vinotify_event: tstamp:18541993202 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:593337330240 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   566.011998: rtcpu_vinotify_event: tstamp:18541993359 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:593337333248 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   566.011999: rtcpu_vinotify_event: tstamp:18541993494 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:593337380832 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   566.012000: rtcpu_vinotify_event: tstamp:18541993648 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:593337387296 data:0x0000000031000002
vi-output, max9-5596    \[001\] …   568.532949: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, max9-5595    \[003\] …   568.533117: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   568.533125: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   568.533126: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
vi-output, max9-5595    \[003\] …   568.533127: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:5595 tid:5595
kworker/5:2-4955    \[005\] …   568.587911: rtcpu_vinotify_event: tstamp:18621791991 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:595897311136 data:0x799d580010000000
kworker/5:2-4955    \[005\] …   568.587914: rtcpu_vinotify_event: tstamp:18621792147 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:595897317536 data:0x0000000031000001
kworker/5:2-4955    \[005\] …   568.587915: rtcpu_vinotify_event: tstamp:18621792284 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:595897320544 data:0x0000000007020001
kworker/5:2-4955    \[005\] …   568.587917: rtcpu_vinotify_event: tstamp:18622109501 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:595897398496 data:0x799d550010000000
kworker/5:2-4955    \[005\] …   568.587918: rtcpu_vinotify_event: tstamp:18622109640 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:595897404992 data:0x0000000031000002
v4l2-ctl-5594    \[001\] …   570.401300: tegra_channel_close: vi-output, max9296a 9-0048:0
vi-output, max9-5596    \[001\] …   571.061005: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
v4l2-ctl-5594    \[000\] …   571.061113: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-5594    \[000\] …   571.061115: tegra_channel_set_stream: max9296a 9-0048:0 : 0x0
v4l2-ctl-5594    \[000\] …   571.062040: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-5594    \[000\] …   571.062043: csi_s_stream: enable : 0x0
v4l2-ctl-5594    \[001\] …   571.063694: tegra_channel_set_power: max9296a 9-0048:0 : 0x0
v4l2-ctl-5594    \[001\] …   571.063695: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-5594    \[001\] …   571.063696: csi_s_power: enable : 0x0
kworker/5:2-4955    \[005\] …   577.323610: rtcpu_string: tstamp:18895001205 id:0x04010000 str:“VM0 deactivating.”

Looks like doesn’t receive any data from the bus.

For the CSI-0 connector need modify the port-index to 1 and add lane_polarity = 6 in the sensor mode properties.

Thanks

I have changed to port-index 1 and lane polarity 6 but I got no change.

I’m using the max9296a and max96717 driver from this github page:

From my sensor driver I could see that the s_stream won’t get called when I execute the

v4l2-ctl --stream-mmap -c bypass_mode=0

If still the same that could be the sensor output signal have problem.

You may need to probe by scope to make sure the output follow the MIPI spec.

Thanks

Had to probe a lot and change things in the drivers for the deserializer and serializer, so that the subdevices are also called when s_stream is called.
I probed the csi lanes between serializer and sensor, I got csi signals form the sensor and in the MAX96717 with the CSI1_PKT_CNT I can see the serializer receives video packets.
Also on the MAX9296A I can see that video packets are received, but the csi lane between the jetson board and the deserializer don’t output anything. So my guess is that the nvcsi blocks the stream.

The output underneath is what happens after val2-ctl is started:

max9296a 9-0048: update 0 0x313 0x02 = 0x02
[ 2531.393447] max9296a 9-0048: update 0 0x330 0x80 = 0x80
[ 2531.393643] max96717 14-0040: write 0 0x2d3 = 0x92
[ 2531.394077] max96717 14-0040: update 0 0x2 0x40 = 0x40
[ 2531.394330] max96717 14-0040: update 0 0x2 0x43 = 0x43
[ 2531.394333] max96717 14-0040: Enabled video TX (reg 0x02 with VID_TX_EN bits)
[ 2531.394338] isx031_s_stream: enable=1
[ 2531.394340] sony_isx031 15-001a: sony_isx031 s_stream(1) code=0x2011 1920x1080
[ 2531.394343] sony_isx031 15-001a: sony_isx031 stream ON (mode_id=24)
[ 2531.404543] sony_isx031 15-001a: sony_isx031 streaming enabled
[ 2534.116690] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2534.116715] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2534.117629] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 2536.676441] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2536.676470] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2536.677722] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 2539.204547] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2539.204567] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2539.205941] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 2539.207080] max9296a 9-0048: update 0 0x330 0x80 = 0x00
[ 2539.208022] max9296a 9-0048: update 0 0x313 0x02 = 0x00
[ 2539.208237] max96717 14-0040: write 0 0x2d3 = 0x92
[ 2539.208723] max96717 14-0040: update 0 0x2 0x40 = 0x00

tracer: nop

entries-in-buffer/entries-written: 32/32 #P:6

_-------=> irqs-off

/ _------=> need-resched

| / _-----=> need-resched-lazy

|| / _-----=> hardirq/softirq

||| / _—=> preempt-depth

|||| / _–=> preempt-lazy-depth

||||| / _-=> migrate-disable

|||||| / delay

TASK-PID CPU# ||||||| TIMESTAMP FUNCTION

| | | ||||||| | |

  v4l2-ctl-28278   [000] .......  3820.612461: tegra_channel_open: vi-output, max9296a 9-0048:0
   v4l2-ctl-28278   [000] .......  3820.637287: tegra_channel_set_power: max9296a 9-0048:0 : 0x1
   v4l2-ctl-28278   [000] .......  3820.637291: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
   v4l2-ctl-28278   [000] .......  3820.637294: csi_s_power: enable : 0x1
  v4l2-ctl-28278   [000] .......  3820.637900: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 10

vi-output, max9-28279 [002] … 3820.648634: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [002] … 3820.648640: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [002] … 3820.648642: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [002] … 3820.648643: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
v4l2-ctl-28278 [004] … 3820.648683: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-28278 [004] … 3820.649787: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-28278 [004] … 3820.649791: csi_s_stream: enable : 0x1
v4l2-ctl-28278 [004] … 3820.650124: tegra_channel_set_stream: max9296a 9-0048:0 : 0x1
vi-output, max9-28280 [002] … 3823.298506: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 10
vi-output, max9-28279 [003] … 3823.298686: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3823.298701: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3823.298704: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3823.298706: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28280 [002] … 3825.862460: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 10
vi-output, max9-28279 [003] … 3825.862580: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3825.862590: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3825.862592: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
vi-output, max9-28279 [003] … 3825.862593: vi_task_submit: class_id:48 ch:0 syncpt_id:35 syncpt_thresh:0 pid:28279 tid:28279
v4l2-ctl-28278 [002] … 3827.521068: tegra_channel_close: vi-output, max9296a 9-0048:0
vi-output, max9-28280 [003] … 3828.386814: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 10
v4l2-ctl-28278 [001] … 3828.386935: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-28278 [001] … 3828.386937: tegra_channel_set_stream: max9296a 9-0048:0 : 0x0
v4l2-ctl-28278 [001] … 3828.391545: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-28278 [001] … 3828.391547: csi_s_stream: enable : 0x0
v4l2-ctl-28278 [001] … 3828.392346: tegra_channel_set_power: max9296a 9-0048:0 : 0x0
v4l2-ctl-28278 [001] … 3828.392347: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-28278 [001] … 3828.392349: csi_s_power: enable : 0x0

NVCSI won’t block the input.

Ok, but you got an idea why the

[ 1392.324458] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1392.324485] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1392.325085] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

is triggered when streaming.

Or where I could further debug this failing behaviour?

This timeout tell the VI driver waiting 2500ms but unable get frame data from the sensor.

Thanks

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