tx2 r28.2.1 with adv7282m driver failed

i use adv7282m chip to do some video work.Now i can do adv7180_probe ok.
But then kernel print “tegra-vi4 15700000.vi: all channel register failed”
this is my dtsi,could u give some tips on thie problem?

/ {
host1x
{
vi@15700000
{
num-channels = <1>;
status = “okay”;
ports
{
#address-cells = <0x1>;
#size-cells = <0x0>;
status = “okay”;
port@0
{
status = “okay”;
reg = <0x0>;
adv7282_vi_in0: endpoint
{
status = “okay”;
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&adv7282_csi_out0>;
};
};
};
};
};

nvcsi@150c0000 
{
	num-channels = <1>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
	channel@0 
	{		
		reg = <0x0>;
		status = "okay";
		ports 
		{
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";	
			port@0 
			{
				status = "okay";
				reg = <0x0>;
				adv7282_csi_in0: endpoint@0
			        {
					status = "okay";
					csi-port = <0>;
					bus-width = <2>;
					remote-endpoint = <&adv7282m_out0>;
				};
			};

			port@1 
			{
				status = "okay";
				reg = <0x1>;
				adv7282_csi_out0: endpoint@1 
				{
					status = "okay";
					remote-endpoint = <&adv7282_vi_in0>;
				};
			};
		};
	};

};


i2c@3180000 
{
	adv7282m@21 
	{
		compatible = "adi,adv7282-m";
		reg = <0x21>;
		devnode = "video0";
		clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,
				 <&tegra_car TEGRA186_CLK_PLLP_OUT0>;
		clock-names = "extperiph1", "pllp_grtba";
		mclk = "extperiph1";
		clock-frequency = <24000000>;
		reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
		pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
		vana-supply = <&en_vdd_cam_hv_2v8>;
		vif-supply = <&en_vdd_cam>; 
		avdd-reg = "vana";
		iovdd-reg = "vif";
		status = "okay";

       		ports 
		{
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			
	       		port@0 
			{
				status = "okay";
				reg = <0>;
				adv7282m_out0: endpoint 
				{
					status = "okay";
					csi-port = <0>;
					bus-width = <2>;
					remote-endpoint = <&adv7282_csi_in0>;
				};
			};
		};
	};
};

};

Please have a check for the sensor programing guide in the l4t document. Also confirm to disable the plugin manager.

@ShaneCCC i have done as u say, i modify the dtb for TC358840, now i start up kernel failed, something wrong with vi

@ShaneCCC i find when i call v4l2_i2c_subdev_init()func, the kernel can not boot up

@ShaneCCC now i find after driver register,my kernel panic,may the kernel 4.4.38 adv7180.c driver is not adapt with 28.2? i must do something on the driver?

I believe this driver is not developing for Tegra, Please reference to tc358840 to modify it for TX2

@ShaneCCC in TX2 r28.2,struct camera_common_data is necessary of the adv drivers?

The sensor driver is bound of with vi/csi driver.
Suppose yes.

@ShaneCCC now my driver come up,but when i do cap video,something wrong like this
dmesg:
[ 104.727379] tegra-vi4 15700000.vi: Status: 7 channel:00 frame:0001
[ 104.733713] tegra-vi4 15700000.vi: timestamp sof 115449821952 eof 115468219456 data 0x00000001
[ 104.733719] tegra-vi4 15700000.vi: capture_id 11 stream 4 vchan 0
[ 105.708608] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 106.712613] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 106.718653] nvcsi 150c0000.nvcsi: csi4_stream_check_status (4) INTR_STATUS 0x00000002
[ 106.726774] nvcsi 150c0000.nvcsi: csi4_stream_check_status (4) ERR_INTR_STATUS 0x00000002

trace:
kworker/3:1-105 [003] …1 144.808606: rtcpu_start: tstamp:4860124091
kworker/3:1-105 [003] …1 144.808611: rtcpu_vinotify_handle_msg: tstamp:4860161958 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:565194224 data:0x00010000
kworker/3:1-105 [003] …1 144.808612: rtcpu_vinotify_handle_msg: tstamp:4860290420 tag:CHANSEL_PXL_SOF channel:0x00 frame:2 vi_tstamp:565322564 data:0x00000001
kworker/3:1-105 [003] …1 144.808614: rtcpu_vinotify_handle_msg: tstamp:4860290604 tag:ATOMP_FS channel:0x00 frame:2 vi_tstamp:565322594 data:0x00000000
kworker/3:1-105 [003] …1 144.808616: rtcpu_vinotify_handle_msg: tstamp:4860297582 tag:CHANSEL_LOAD_FRAMED channel:0x10 frame:2 vi_tstamp:565329863 data:0x08000000
kworker/3:1-105 [003] …1 144.808618: rtcpu_vinotify_handle_msg: tstamp:4860865381 tag:CHANSEL_SHORT_FRAME channel:0x10 frame:2 vi_tstamp:565897485 data:0x00000001
kworker/3:1-105 [003] …1 144.808619: rtcpu_vinotify_handle_msg: tstamp:4860865617 tag:ATOMP_FE channel:0x00 frame:2 vi_tstamp:565897488 data:0x00000000

and how can i make sure “line_length” value,my input is pal 720x576?

  1. Follow below link to boost the vi clock to try.

https://devtalk.nvidia.com/default/topic/1038053/jetson-tx2/unsupported-240-fps-capture-via-nvcamerasrc-using-leopard-imaging-imx-274/post/5275008/#5275008

  1. Modify the sensor driver to report less high to try like 720X512 or more less to check the trace if still the same error.

@ShaneCCC i find common_data->def_clk_frq ,what the parameter exactly representation?

and i do as u say it stial the same error

@ShaneCCC my device output clk is 216mhz,i run v4l2-ctrl reprot “vidioc_dqbuf”
thanks for your reply!

@ShaneCCC i use v4l2cuda demo to capture the video, then “eog out.ppm”,the picture is 1/4 of the full window. why the tx2 stop receive?

Any error message?
If there’s no any error message from the kernel it could be the pixel type or sensor output size not as expect.

error message as #9 @ShaneCCC

and my adv chip output is a 720x576 25p stream

{
MEDIA_BUS_FMT_YUYV8_2X8,
V4L2_COLORSPACE_SMPTE170M,
V4L2_PIX_FMT_YUYV,
},

now my pixel set like this,the chip output is YCbCr 4:2:2,the setting is right?

What’s the v4l2-ctl --list-formats-ext

its a rg10,maybe my driver did not push the func, what the func need i implement in driver?

@ShaneCCC now i use Oscilloscope catch the csi data p,but the data output stopped after 1.28ms in every frame, do u have any idea?