Xavier camera issue with max96712+max9295+ar0233

We have connected max96712+max9295+ar0233 to I2C_GP2 on AGX Xavier module. When we boot up, meet the following issue:
2.544918] i2c /dev entries driver
[ 2.546917] max96712 1-0029: [MAX96712]: probing GMSL Deserializer
[ 2.546976] max96712 1-0029: reset-gpios not found 0
[ 2.547105] max96712 1-0029: max96712_probe: success
[ 2.547218] ar0233 1-0011: probing v4l2 sensor.
[ 2.547672] ar0233 1-0011: tegracam sensor driver:ar0233_v2.0.6
[ 2.547718] ar0233 1-0011: missing serializer dev handle
[ 2.547857] ar0233 1-0011: board setup failed
[ 2.547954] (NULL device *): max9295_sdev_pair: invalid input params
[ 2.548083] ar0233 1-0011: gmsl ser pairing failed
[ 2.548315] ar0233: probe of 1-0011 failed with error -22

It seems the max9295 can not pair, Could you tell me what causes this?

We configure the i2c devicetree as below: i2c@c240000 {

                            dser: max96712@29 {
                                    compatible = "nvidia,max96712";
                                    reg = <0x29>;
                                    csi-mode = "2x4";
                                    max-src = <1>;
                                    /*reset-gpios = <&tegra_main_gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;*/
                                    /*reset-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(M, 5) 0>;*/
                            };
                            ser_prim: max9295_prim@40 {
                                    compatible = "nvidia,max9295";
                                    reg = <0x40>;
                                    is-prim-ser;
                            };
                            ser_a: max9295_a@41 {
                                    compatible = "nvidia,max9295";
                                    reg = <0x41>;
                                    nvidia,gmsl-dser-device = <&dser>;
                            };
                            ar0233_a@11 {
                                    def-addr = <0x10>;
                                    /* Define any required hw resources needed by driver */
                                    /* ie. clocks, io pins, power sources */
                                    clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
                                                    <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
                                    clock-names = "extperiph1", "pllp_grtba";
                                    mclk = "extperiph1";
                                    nvidia,gmsl-ser-device = <&ser_a>;
                                    nvidia,gmsl-dser-device = <&dser>;
                                    madayi="test";
                            };
    };

Also we test the max96712 using i2cdump -f -y 1 0x29,it’s ok. We use i2cdump -f -y 1 0x40 to test max9295, it has error.

Please give me some advice, thanks!

Have a probe ths i2c signal to make sure if max9295 have ack, otherwise it could be something wrong with the max9295.

Please refer to OEM DG to check your I2C connection. The voltage level should be matched first. You can use oscilloscope to check the I2C signal too.

It is ok. The voltage level is wrong. Thanks

hello,
i am debugging my camera ar0233 to Xavier AGX with serdes (max9295/max96712), video format is UYVY 16bit. i am meeting the below error. It seems i can’t get the camera data.
[ 96.733817] max96712 7-0029: max96712 :i2c write 29, 0x6 = f3
[ 96.734183] max96712 7-0029: max96712 :i2c write 29, 0x18 = f
[ 96.840808] max96712 7-0029: max96712 :i2c write 29, 0x40b = 2
[ 98.148828] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 98.148980] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 98.152948] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 98.154982] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x39
[ 98.155171] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x41
[ 98.155317] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x37
[ 98.155479] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 100.708871] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 100.709036] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 100.709187] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 100.711107] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 103.268880] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 103.269047] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 103.269206] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 103.270993] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 105.828846] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 105.829013] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 105.829164] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 105.831140] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 108.388844] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 108.389011] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 108.389166] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 108.391782] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 110.948867] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 110.949035] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
i have tested the mip signal using Oscilloscope, it can output mipi.
Could you give me some advice? Thanks

hello,
our dtsi file is as below:{
host1x {
vi@15c10000 {
num-channels = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ar0233_vi_in0: endpoint {
vc-id = <1>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&ar0233_csi_out0>;
};
};
port@1 {
reg = <1>;
ar0233_vi_in1: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&ar0233_csi_out1>;
};
};
};
};

	nvcsi@15a00000 {
		num-channels = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel@0 {
			reg = <0>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ar0233_csi_in0: endpoint@0 {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ar0233_ar0233_out0>;
					};
				};
				port@1 {
					reg = <1>;
					ar0233_csi_out0: endpoint@1 {
						remote-endpoint = <&ar0233_vi_in0>;
					};
				};
			};
		};
                    channel@1 {
			reg = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ar0233_csi_in1: endpoint@2 {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ar0233_ar0233_out1>;
					};
				};
				port@1 {
					reg = <1>;
					ar0233_csi_out1: endpoint@3 {
						remote-endpoint = <&ar0233_vi_in1>;
					};
				};
			};
		};
	};
};

i2c@c250000 {
          ar0233_a@11 {
			compatible = "nvidia,ar0233";
			reg = <0x11>;

			/* Physical dimensions of sensor */
			physical_w = "15.0";
			physical_h = "12.5";

			sensor_model ="ar0233";

			/* Defines number of frames to be dropped by driver internally after applying */
			/* sensor crop settings. Some sensors send corrupt frames after applying */
			/* crop co-ordinates */
			post_crop_frame_drop = "0";

			/* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
			use_decibel_gain = "true";

			/* enable CID_SENSOR_MODE_ID for sensor modes selection */
			use_sensor_mode_id = "true";

			/**
			* A modeX node is required to support v4l2 driver
			* implementation with NVIDIA camera software stack
			*
			* mclk_khz = "";
			* Standard MIPI driving clock, typically 24MHz
			*
			* num_lanes = "";
			* Number of lane channels sensor is programmed to output
			*
			* tegra_sinterface = "";
			* The base tegra serial interface lanes are connected to
			*
			* vc_id = "";
			* The virtual channel id of the sensor.
			*
			* discontinuous_clk = "";
			* The sensor is programmed to use a discontinuous clock on MIPI lanes
			*
			* dpcm_enable = "true";
			* The sensor is programmed to use a DPCM modes
			*
			* cil_settletime = "";
			* MIPI lane settle time value.
			* A "0" value attempts to autocalibrate based on mclk_khz and pix_clk_hz
			*
			* active_w = "";
			* Pixel active region width
			*
			* active_h = "";
			* Pixel active region height
			*
			* dynamic_pixel_bit_depth = "";
			* sensor dynamic bit depth for sensor mode
			*
			* csi_pixel_bit_depth = "";
			* sensor output bit depth for sensor mode
			*
			* mode_type="";
			* Sensor mode type, For eg: yuv, Rgb, bayer, bayer_wdr_pwl
			*
			* pixel_phase="";
			* Pixel phase for sensor mode, For eg: rggb, vyuy, rgb888
			*
			* readout_orientation = "0";
			* Based on camera module orientation.
			* Only change readout_orientation if you specifically
			* Program a different readout order for this mode
			*
			* line_length = "";
			* Pixel line length (width) for sensor mode.
			* This is used to calibrate features in our camera stack.
			*
			* pix_clk_hz = "";
			* Sensor pixel clock used for calculations like exposure and framerate
			*
			*
			*
			*
			* inherent_gain = "";
			* Gain obtained inherently from mode (ie. pixel binning)
			*
			* min_gain_val = ""; (floor to 6 decimal places)
			* max_gain_val = ""; (floor to 6 decimal places)
			* Gain limits for mode
			* if use_decibel_gain = "true", please set the gain as decibel
			*
			* min_exp_time = ""; (ceil to integer)
			* max_exp_time = ""; (ceil to integer)
			* Exposure Time limits for mode (us)
			*
			*
			* min_hdr_ratio = "";
			* max_hdr_ratio = "";
			* HDR Ratio limits for mode
			*
			* min_framerate = "";
			* max_framerate = "";
			* Framerate limits for mode (fps)
			*
			* embedded_metadata_height = "";
			* Sensor embedded metadata height in units of rows.
			* If sensor does not support embedded metadata value should be 0.
			*/

			mode0 {/*mode AR0233_MODE_1920X1080_CROP_30FPS*/
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_a";
                                    phy_mode = "DPHY";
				vc_id = "1";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				dynamic_pixel_bit_depth = "16";
				csi_pixel_bit_depth = "16";
				mode_type = "yuv";
				pixel_phase = "uyvy";

				active_w = "1920";
				active_h = "1080";
				readout_orientation = "0";
				line_length = "2200";
				inherent_gain = "1";
				pix_clk_hz = "74250000";
				serdes_pix_clk_hz = "833333333";

				gain_factor = "10";
				min_gain_val = "0"; /* dB */
				max_gain_val = "300"; /* dB */
				step_gain_val = "3"; /* 0.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 = "59"; /*us, 2 lines*/
				max_exp_time = "33333";
				step_exp_time = "1";
				default_exp_time = "33333";/* us */
				embedded_metadata_height = "0";
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ar0233_ar0233_out0: endpoint {
						vc-id = <1>;
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ar0233_csi_in0>;
						};
					};
				};
			gmsl-link {
				src-csi-port = "b";
				dst-csi-port = "a";
				serdes-csi-link = "a";
				csi-mode = "1x4";
				st-vc = <0>;
				vc-id = <1>;
				num-lanes = <4>;
				streams = "ued-u1", "raw12";
				};
			};
    
		ar0233_b@12 {
			compatible = "nvidia,ar0233";
			reg = <0x12>;

			/* Physical dimensions of sensor */
			physical_w = "15.0";
			physical_h = "12.5";

			sensor_model ="ar0233";

			/* Defines number of frames to be dropped by driver internally after applying */
			/* sensor crop settings. Some sensors send corrupt frames after applying */
			/* crop co-ordinates */
			post_crop_frame_drop = "0";

			/* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
			use_decibel_gain = "true";

			/* enable CID_SENSOR_MODE_ID for sensor modes selection */
			use_sensor_mode_id = "true";

			/**
			* A modeX node is required to support v4l2 driver
			* implementation with NVIDIA camera software stack
			*
			* mclk_khz = "";
			* Standard MIPI driving clock, typically 24MHz
			*
			* num_lanes = "";
			* Number of lane channels sensor is programmed to output
			*
			* tegra_sinterface = "";
			* The base tegra serial interface lanes are connected to
			*
			* vc_id = "";
			* The virtual channel id of the sensor.
			*
			* discontinuous_clk = "";
			* The sensor is programmed to use a discontinuous clock on MIPI lanes
			*
			* dpcm_enable = "true";
			* The sensor is programmed to use a DPCM modes
			*
			* cil_settletime = "";
			* MIPI lane settle time value.
			* A "0" value attempts to autocalibrate based on mclk_khz and pix_clk_hz
			*
			* active_w = "";
			* Pixel active region width
			*
			* active_h = "";
			* Pixel active region height
			*
			* dynamic_pixel_bit_depth = "";
			* sensor dynamic bit depth for sensor mode
			*
			* csi_pixel_bit_depth = "";
			* sensor output bit depth for sensor mode
			*
			* mode_type="";
			* Sensor mode type, For eg: yuv, Rgb, bayer, bayer_wdr_pwl
			*
			* pixel_phase="";
			* Pixel phase for sensor mode, For eg: rggb, vyuy, rgb888
			*
			* readout_orientation = "0";
			* Based on camera module orientation.
			* Only change readout_orientation if you specifically
			* Program a different readout order for this mode
			*
			* line_length = "";
			* Pixel line length (width) for sensor mode.
			* This is used to calibrate features in our camera stack.
			*
			* pix_clk_hz = "";
			* Sensor pixel clock used for calculations like exposure and framerate
			*
			*
			*
			*
			* inherent_gain = "";
			* Gain obtained inherently from mode (ie. pixel binning)
			*
			* min_gain_val = ""; (floor to 6 decimal places)
			* max_gain_val = ""; (floor to 6 decimal places)
			* Gain limits for mode
			* if use_decibel_gain = "true", please set the gain as decibel
			*
			* min_exp_time = ""; (ceil to integer)
			* max_exp_time = ""; (ceil to integer)
			* Exposure Time limits for mode (us)
			*
			*
			* min_hdr_ratio = "";
			* max_hdr_ratio = "";
			* HDR Ratio limits for mode
			*
			* min_framerate = "";
			* max_framerate = "";
			* Framerate limits for mode (fps)
			*
			* embedded_metadata_height = "";
			* Sensor embedded metadata height in units of rows.
			* If sensor does not support embedded metadata value should be 0.
			*/

			mode0 {/*mode AR0233_MODE_1920X1080_CROP_30FPS*/
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_a";
                                    phy_mode = "DPHY";
				vc_id = "0";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";
				dynamic_pixel_bit_depth = "16";
				csi_pixel_bit_depth = "16";
				mode_type = "yuv";
				pixel_phase = "uyvy";

				active_w = "1920";
				active_h = "1080";
				readout_orientation = "0";
				line_length = "2200";
				inherent_gain = "1";
				pix_clk_hz = "74250000";
				serdes_pix_clk_hz = "833333333";

				gain_factor = "10";
				min_gain_val = "0"; /* dB */
				max_gain_val = "300"; /* dB */
				step_gain_val = "3"; /* 0.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 = "59"; /*us, 2 lines*/
				max_exp_time = "33333";
				step_exp_time = "1";
				default_exp_time = "33333";/* us */
				embedded_metadata_height = "0";
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ar0233_ar0233_out1: endpoint {
						vc-id = <0>;
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ar0233_csi_in1>;
						};
					};
				};
			gmsl-link {
				src-csi-port = "b";
				dst-csi-port = "a";
				serdes-csi-link = "b";
				csi-mode = "1x4";
				st-vc = <0>;
				vc-id = <0>;
				num-lanes = <4>;
				streams = "ued-u1", "raw12";
				};
			};

};

}

hello zhaocuiqin,

according to post #6, don’t you resolve the issue with voltage level?
anyway,
the following messages indicate VI engine cannot receive frame signaling correctly.

you may review your device tree property settings since you’re able to probe the signaling,

besides,
were you able to enable test-pattern-generator? this usually helps to narrow down the issue.
thanks

hi JerryChang,
Thanks for your reply.
the voltage level issue has be resolved since we can test mipi output.
I have uploaded the device tree property setting, Could you help us see what’s wrong with if?
Is the test-patter-generator a test tool or just let’t the camera output the test patter?

hello zhaocuiqin,

test-patter-generator is used to generate signaling on the bridge driver. for example, it outputs color bars and sending to CSI channel by kernel configuration.