MIPI CSI4 dtsi

our mipi out is designed as follows,but it can’t run . is there anthing wrong with the design and dtsi files?

csi4

{
host1x {
vi@15c10000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ov13b10_vi_in0: endpoint {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&ov13b10_csi_out0>;
};
};
};
};

	nvcsi@15a00000 {
		num-channels = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel@0 {
			reg = <0>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					ov13b10_csi_in0: endpoint@0 {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ov13b10_out0>;
					};
				};
				port@1 {
					reg = <1>;
					ov13b10_csi_out0: endpoint@1 {
						remote-endpoint = <&ov13b10_vi_in0>;
					};
				};
			};
		};
	};
};

What do you mean can’t run?
Does the sensor connect to CSI4(CSI-E/F)? The port-index should be 4 instead of 0

1 Like

tanks for your reply,now we can get video stream,but I don’t know how to switch different mode

What APP? argus or v4l2-ctl both can switch the sensor mode by parameter.

I use this command “gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=4208, height=3120, framerate=30/1, format=NV12’ ! nvvidconv ! nvegltransform ! nveglglessink -e”

You can set the width/height and framerate to select mode.

1 Like

Dear ShaneCCC:
I loaded 3 camera totally,but I don’t know how to turn on the camera at the same time by command.Could you help me ? Looking forward to your reply!

For your gst pipeline command you can add sensor-id=0/1/2 for it.

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=4208, height=3120, framerate=30/1, format=NV12’ ! nvvidconv ! nvegltransform ! nveglglessink -e

Dear ShaneCCC:
I can see video0/video1/video2 in /dev。but there are some problems when I open 3 camera at the same time.

sensor-id =0 and sensor-id=1 the camera works well,but when I open video2 use sensor-id=2 ,the error log is as follows:

gst-launch-1.0 nvarguscamerasrc sensor-id =2 ! ‘video/x-raw(memory:NVMM),width=640, height=480, framerate=30/1, format=NV12’ ! nvvidconv ! nvegltransform ! nveglglessink -e
Setting pipeline to PAUSED …

Using winsys: x11
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:561 Invalid camera device specified 2 specified, 1 max index
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.144051840
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

It’s could be the context in the tegra-camera-platform have problem cause this issue.
Check the position and devname.

1、Could you tell me what is the relationship between position 、devname and camera ID?

2、
Will the order of insmod top, center, and bottom driver affect the normal operation of the camera?

1、Could you tell me what is the relationship between position 、devname and camera ID?

2、
Will the order of insmod top, center, and bottom driver affect the normal operation of the camera?

jude from this : Argus:Failed with three cameras

I think this is a bug that video0/video1 works well,but viedio2 can’t work

I don’t think it does matter with their relationship. It could be the devname doesn’t match with the kernel driver name I think.

@ShaneCCC
Thanks for your help ,I made a mistake that 2 of the camera have same devname in dtsi. It works well after change one’s devname

Dear ShaneCCC:
my camera driver works well when as a loadable module. If I rebuilt it in kernel image ,because of gpio expander prepares so slowly,driver request probe more than one time.But it doesn’t work,the log shows it can not get regulator when power get. :

[ 2.220617] ov7251_l 2-0061: probing v4l2 sensor. /**** first time probe,exit because of can’t get gpio /
[ 2.220622] ov7251_l 2-0061: client->addr : 97
[ 2.220626] ov7251_l 2-0061: tegracam_device_register start
[ 2.220633] ov7251_l 2-0061: regmap addr : 96
[ 2.220672] ov7251_l 2-0061: regmap init success
[ 2.220674] ov7251_l 2-0061: !tc_dev->sensor_ops
[ 2.220679] ov7251_l 2-0061: mclk in DT extperiph3
[ 2.220707] ov7251_l 2-0061: pwdn_gpio:-517
[ 2.220710] ov7251_l 2-0061: parse_dt err
[ 2.220712] ov7251_l 2-0061: tegra camera driver registration failed
………………
………………
[ 4.340674] ov7251_l 2-0061: probing v4l2 sensor./ second probe /
[ 4.340817] ov7251_l 2-0061: client->addr : 96
[ 4.340930] ov7251_l 2-0061: tegracam_device_register start
[ 4.340937] ov7251_l 2-0061: regmap addr : 96
[ 4.341122] ov7251_l 2-0061: regmap init success
[ 4.341240] ov7251_l 2-0061: !tc_dev->sensor_ops
[ 4.341246] ov7251_l 2-0061: mclk in DT extperiph3
[ 4.341377] ov7251_l 2-0061: pwdn_gpio:212
[ 4.341486] ov7251_l 2-0061: avdd-gpio:193
[ 4.341589] ov7251_l 2-0061: camera avdd-reg has in DT,vana
[ 4.341727] ov7251_l 2-0061: camera iovdd-reg has in DT,vif
[ 4.341867] ov7251_l 2-0061: pw->pwdn_gpio :0
[ 4.342358] ov7251_l 2-0061: parent clk name (null)
[ 4.342481] ov7251_l 2-0061: mclk name extperiph3
[ 4.342593] ov7251_l 2-0061: camera have get mclk
[ 4.342709] ov7251_l 2-0061: camera camera_common_regulator_get vana
[ 4.342861] ov7251_l 2-0061: common regulator get vana
[ 4.344170] ov7251_l 2-0061: camera_common_regulator_get vana ERR: fffffffffffffdfb
[ 4.345497] ov7251_l 2-0061: camera camera_common_regulator_get vif
**[ 4.349855] ov7251_l 2-0061: common regulator get vif **
[ 4.355633] ov7251_l 2-0061: camera_common_regulator_get vif ERR: fffffffffffffdfb
[ 4.363139] ov7251_l 2-0061: ov7251_l_power_get can’t request pwdn_gpio -517 pwdn_gpio_num:0
[ 4.376612] ov7251_l 2-0061: unable to power get
[ 4.381250] ov7251_l 2-0061: tegra camera driver registration failed
[ 4.387867] ov7251_l: probe of 2-0061 failed with error -14

I try to change the order of module init, the regulator can get,but system can’t enter to desktop.

I don’t know why! Could you help me ?

Why just modify the rc.local to insmod the LKM.

I insmod the LKM by sudo insmod ov7251.ko ,it works well. but if CONFIG_VIDEO _OV7251=y ,the driver can’t get regulator

Dear Shane CCC:

Could you helpe me solve the problem of what I reply in Dec 17? I‘m confused why driver can’t get regulator when I recompile it in kernel,but it can work well as a LKM

Does your sensor board really need to enable the vana/vif?
If yes you have add vana-supply = <&xxxx>/vif-supply = <&xxxx> otherwise remove them from the sensor scope.