Record 12Mpixel (4032x3040) video with imx477 camera on L4T 35.6.0

Hi,
I have Jetson Xavier nx .
In L4T 35.5.0 I used ArduCAM driver : GitHub - ArduCAM/MIPI_Camera

By installing this driver on my board I can recording 12Mpixel. after installing this driver, device tree is changed to support 12Mp resolution.

But I want work by L4T 35.6.0 .
In 35.6.0 must be change device tree to add support 12Mpixel 4032x3040 resolution.

Please Help me.
Thanks.

You need to add the mode in driver and device tree for it.

Thanks

Hi,
I wrote new device tree overlay to support 12M pixel.

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Jetson Device-tree overlay for dual camera IMX477 rbpcv3 on
 * dual cam connector baseboards
 *
 * Copyright (c) 2021-2022 NVIDIA CORPORATION. All rights reserved.
 *
 */

/dts-v1/;
/plugin/;

/ {
	overlay-name = "Camera IMX477 Dual";
	jetson-header-name = "Jetson Nano CSI Connector";
	compatible = "nvidia,p3449-0000+p3668-0000", "nvidia,p3449-0000+p3668-0001", "nvidia,p3509-0000+p3668-0000", "nvidia,p3509-0000+p3668-0001";

	/* IMX477 dual sensor module */
	fragment@0 {
		target = <&imx477_cam0>;
		__overlay__ {
			status = "okay";
				mode0 { /* IMX477_MODE_4032x3040 */
					active_w = "4032";
					active_h = "3840";
					line_length = "12352";
				};
				mode1 { /* IMX477_MODE_3840x2160 */
					active_w = "3840";
					active_h = "2160";
					line_length = "11200";
				};
				mode2 { /* IMX477_MODE_1920X1080 */
					mclk_khz = "24000";
					num_lanes = "2";
					tegra_sinterface = "serial_a";
					phy_mode = "DPHY";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1920";
					active_h = "1080";
					mode_type = "bayer";
					pixel_phase = "rggb";
					csi_pixel_bit_depth = "10";
					readout_orientation = "90";
					line_length = "7000";
					inherent_gain = "1";
					mclk_multiplier = "80";
					pix_clk_hz = "300000000";

					gain_factor = "16";
					framerate_factor = "1000000";
					exposure_factor = "1000000";
					min_gain_val = "16"; /* 1.00x */
					max_gain_val = "356"; /* 22x */
					step_gain_val = "1";
					default_gain = "16"; /* 1.00x */
					min_hdr_ratio = "1";
					max_hdr_ratio = "1";
					min_framerate = "2000000"; /* 2.0 fps */
					max_framerate = "60000000"; /* 60.0 fps */
					step_framerate = "1";
					default_framerate = "60000000"; /* 60.0 fps */
					min_exp_time = "13"; /* us */
					max_exp_time = "683709"; /* us */
					step_exp_time = "1";
					default_exp_time = "2495"; /* us */

					embedded_metadata_height = "2";
				};
		};
	};
	fragment@1 {
		target = <&cam_module0>;
		__overlay__ {
			status = "okay";
			badge = "jakku_front_RBPCV3";
			position = "front";
			orientation = "1";
		};
	};
	fragment@2 {
		target = <&cam_module0_drivernode0>;
		__overlay__ {
			status = "okay";
			pcl_id = "v4l2_sensor";
			devname = "imx477 9-001a";
			proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv3_imx477_a@1a";
		};
	};
	fragment@3 {
		target = <&imx477_cam1>;
		__overlay__ {
			status = "okay";
		};
	};
	fragment@4 {
		target = <&cam_module1>;
		__overlay__ {
			status = "okay";
			badge = "jakku_rear_RBPCV3";
			position = "rear";
			orientation = "1";
		};
	};
	fragment@5 {
		target = <&cam_module1_drivernode0>;
		__overlay__ {
			status = "okay";
			pcl_id = "v4l2_sensor";
			devname = "imx477 10-001a";
			proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/rbpcv3_imx477_c@1a";
		};
	};
	fragment@6 {
                target = <&imx219_cam0>;
                __overlay__ {
                        status = "disabled";
                };
        };

	fragment@7 {
		target = <&rbpcv3_imx477_vi_in0>;
		__overlay__ {
			status = "okay";
			port-index = <0>;
			bus-width = <2>;
			remote-endpoint = <&rbpcv3_imx477_csi_out0>;
		};
	};
	fragment@8 {
		target = <&rbpcv3_imx477_vi_in1>;
		__overlay__ {
			status = "okay";
			port-index = <2>;
			bus-width = <2>;
			remote-endpoint = <&rbpcv3_imx477_csi_out1>;
		};
	};
	fragment@9 {
		target = <&rbpcv3_imx477_csi_in0>;
		__overlay__ {
			status = "okay";
			port-index = <0>;
			bus-width = <2>;
			remote-endpoint = <&rbpcv3_imx477_out0>;
		};
	};
	fragment@10 {
		target = <&rbpcv3_imx477_csi_out0>;
		__overlay__ {
			status = "okay";
		};
	};
	fragment@11 {
		target = <&rbpcv3_imx477_csi_in1>;
		__overlay__ {
			status = "okay";
			port-index = <2>;
			bus-width = <2>;
			remote-endpoint = <&rbpcv3_imx477_out1>;
		};
	};
	fragment@12 {
		target = <&rbpcv3_imx477_csi_out1>;
		__overlay__ {
			status = "okay";
		};
	};
	fragment@13 {
		target = <&imx219_cam1>;
		__overlay__ {
			status = "disabled";
		};
	};
};

but to adding 12M pixel in driver, I need to know the camera registers value for this mode.
I google for IMX477 full datasheet, but I can’t find a document describe imx477 registers.

Are Nvidia have a solution to capture 12M pixel from imx477 cam?
Are you have a complete datasheet or technical reference for imx477?

Thanks.

Please consult with Sony.

Thanks