Multiple resolutions/framerates with TC358743

Hello Alexx,

Completely agree with your analysis.

I had encountered the same problem with a 1080x720@50 configuration.

[  197.060514] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 2
[  197.074007] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00004015

See ticket https://forums.developer.nvidia.com/t/camera-sensor-tc358743-erreur-timeout-frame-start-syncpt-timeout-0/208966

This configuration requires only one CSI line.

To solve it I forced the configuration to use a single line.

/ {
	host1x {
		vi_base: vi {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				vi_port0: port@0 {
					status = "okay";
					reg = <0>;
					tc358743_vi_in1: endpoint {
						status = "okay";
						port-index = <0>; // CSI-A
						bus-width = <2>;
						remote-endpoint = <&tc358743_csi_out0>;
					};
				};
			};
		};

		csi_base: nvcsi {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			csi_chan0: channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan0_port0: port@0 {
						status = "okay";
						reg = <0>;
						tc358743_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <2>;
							remote-endpoint = <&tc358743_out1>;
						};
					};
					csi_chan0_port1: port@1 {
						status = "okay";
						reg = <1>;
						tc358743_csi_out0: endpoint@1 {
							remote-endpoint = <&tc358743_vi_in1>;
						};
					};
				};
			};
		};

		hdmi27m_osc: hdmi-osc {
			compatible = "fixed-clock";
			clock-output-names = "hdmi-osc";
			clock-frequency = <27000000>;
			#clock-cells = <0>;
		};

		i2c@546c0000 {
			status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			tc358743@0f {
				status = "okay";
				compatible = "toshiba,tc358743";
				reg = <0x0f>;

				/* External clock */
				clocks = <&hdmi27m_osc>;
				clock-names = "refclk";
				
				/*reset-gpios      = <&gpio TEGRA_GPIO(S, 7) 0>;*/

				/* Physical dimensions of sensor */
				physical_w = "4.713";
				physical_h = "3.494";			
				
				/* Sensor Model */
				sensor_model ="tc358743";

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

					port@0 {
						reg = <0>;
						// =============== v4l2_of_endpoint =============== //
						tc358743_out1: endpoint {
							port-index  = <0>; /* CSI A */
							bus-width   = <2>;
							phy_mode    = "DPHY";
							data-lanes  = <1 2>;
							clock-lanes = <0>;
							clock-noncontinuous;
							link-frequencies = /bits/ 64 <297000000>; // 297000000/486000000/594000000
							remote-endpoint = <&tc358743_csi_in0>;
						};
					};
				};
			};
		};
    };
};