Jetson Nano multi CSI without CAM_I2CMUX

Good day, @JerryChang

I’m having trouble within test my camera sensor.

As you know, We are using CSI0,1 and CSI4

i2c-7’s imx230 is working fine,(imx230_i2c7_working.log (85.0 KB)
)
But i2c-1’s imx230 is not working (imx230_i2c1_not_working.log (102.9 KB)
)

Here is the gst-launch command.

i2c-7 's imx230 :
$ gst-launch-1.0 nvarguscamerasrc sensor-mode=2 ! nvoverlaysink

i2c-1 's imx230 :
$ gst-launch-1.0 nvarguscamerasrc sensor-id=1 sensor-mode=2 ! nvoverlaysink

But I can’t figure out where to dig my issue.
I really appreciate if you let me know where am I starting to dig my issue.

Thanks.

hello swkim88888,

this is sensor bring-up issue,
according to below, you’ve init sensor stream but the VI side waits till timeout due to fetch sensor frame unsuccessfully.

[  144.167884] imx230 1-0010: #### [imx230_set_mode] mode[2] started!###
[  144.183804] imx230 1-0010: #### [imx230_start_streaming] started!###
...
[  146.039067] fence timeout on [ffffffc0914c9a80] after 1500ms
[  146.039082] name=[nvhost_sync:9], current value=0 waiting value=1

had you tried to access the stream by Using V4L2 IOCTL Directly?

Hi @JerryChang jerry

Thanks to reply.

had you tried to access the stream by Using V4L2 IOCTL Directly ?

I try it righ away you mentioned it.

$ v4l2-ctl --set-fmt-video=width=1920,height=1080 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ov5693.raw

...
[  115.529469] imx230 7-0010: #### [imx230_set_mode] mode[0] started!###
[  115.529495] imx230 7-0010: #### [imx230_start_streaming] started!###
[  115.610477] imx230 1-0010: #### [imx230_set_mode] mode[0] started!###
[  115.610504] imx230 1-0010: #### [imx230_start_streaming] started!###
[  115.744456] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 1723437 has been capped to VI's max BW 1500000
[  115.744559] imx230 1-0010: #### [imx230_set_mode] mode[0] started!###
[  115.744583] imx230 1-0010: #### [imx230_start_streaming] started!###
[  116.069300] tegra_soctherm 700e2000.soctherm: soctherm: trip temperature -2147483647 forced to -127000
[  116.248819] video4linux video0: frame start syncpt timeout!0
[  116.756815] video4linux video0: frame start syncpt timeout!0
[  117.264770] video4linux video0: frame start syncpt timeout!0
[  117.270505] tegra_soctherm 700e2000.soctherm: soctherm: trip temperature -2147483647 forced to -127000
[  117.772712] video4linux video0: frame start syncpt timeout!0
[  118.284713] video4linux video0: frame start syncpt timeout!0
[  118.812688] video4linux video0: frame start syncpt timeout!0
[  119.324718] video4linux video0: frame start syncpt timeout!0
[  119.840681] video4linux video0: frame start syncpt timeout!0
[  120.360704] video4linux video0: frame start syncpt timeout!0
[  120.872581] video4linux video0: frame start syncpt timeout!0
[  121.380563] video4linux video0: frame start syncpt timeout!0
[  121.896543] video4linux video0: frame start syncpt timeout!0

And reboot test “/dev/video1” device on my board too.

$ v4l2-ctl --set-fmt-video=width=1920,height=1080 --stream-mmap --stream-count=1 -d /dev/video1 --stream-to=ov5693.raw

...
[  119.887977] imx230 7-0010: #### [imx230_set_mode] mode[0] started!###
[  119.888003] imx230 7-0010: #### [imx230_start_streaming] started!###
[  119.968638] imx230 1-0010: #### [imx230_set_mode] mode[0] started!###
[  119.968662] imx230 1-0010: #### [imx230_start_streaming] started!###
[  120.112235] imx230 7-0010: #### [imx230_set_mode] mode[0] started!###
[  120.112260] imx230 7-0010: #### [imx230_start_streaming] started!###
[  120.458528] video4linux video1: frame start syncpt timeout!0
[  120.660568] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 1
[  121.014531] video4linux video1: frame start syncpt timeout!0
[  121.430561] video4linux video1: frame start syncpt timeout!0
[  121.778533] video4linux video1: frame start syncpt timeout!0
[  122.138519] video4linux video1: frame start syncpt timeout!0
[  122.550528] video4linux video1: frame start syncpt timeout!0
[  122.898633] video4linux video1: frame start syncpt timeout!0
[  123.105631] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 10
[  123.454606] video4linux video1: frame start syncpt timeout!0
[  123.661305] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 12
[  124.014491] video4linux video1: frame start syncpt timeout!0
[  124.164937] tegra-xudc-new 700d0000.xudc: ep 3 disabled
[  124.164961] tegra-xudc-new 700d0000.xudc: ep 2 disabled
[  124.164978] tegra-xudc-new 700d0000.xudc: ep 5 disabled
[  124.164994] tegra-xudc-new 700d0000.xudc: ep 4 disabled
[  124.165007] tegra-xudc-new 700d0000.xudc: ep 7 disabled
[  124.165040] tegra-xudc-new 700d0000.xudc: ep 9 disabled
[  124.165066] tegra-xudc-new 700d0000.xudc: ep 15 disabled
[  124.165215] android_work: sent uevent USB_STATE=DISCONNECTED
[  124.168098] l4tbr0: port 1(rndis0) entered disabled state
[  124.256539] android_work: sent uevent USB_STATE=CONNECTED
[  124.267736] android_work: sent uevent USB_STATE=DISCONNECTED
[  124.354660] android_work: sent uevent USB_STATE=CONNECTED
[  124.384359] configfs-gadget gadget: high-speed config #1: c
[  124.384389] tegra-xudc-new 700d0000.xudc: ep 5 (type: 3, dir: in) enabled
[  124.384406] tegra-xudc-new 700d0000.xudc: ep 3 (type: 2, dir: in) enabled
[  124.384421] tegra-xudc-new 700d0000.xudc: ep 2 (type: 2, dir: out) enabled
[  124.384517] tegra-xudc-new 700d0000.xudc: ep 9 (type: 3, dir: in) enabled
[  124.384534] tegra-xudc-new 700d0000.xudc: ep 7 (type: 2, dir: in) enabled
[  124.384548] tegra-xudc-new 700d0000.xudc: ep 4 (type: 2, dir: out) enabled
[  124.384583] tegra-xudc-new 700d0000.xudc: ep 15 (type: 3, dir: in) enabled
[  124.384625] tegra-xudc-new 700d0000.xudc: ep 11 (type: 2, dir: in) enabled
[  124.384641] tegra-xudc-new 700d0000.xudc: ep 6 (type: 2, dir: out) enabled
[  124.384698] l4tbr0: port 1(rndis0) entered blocking state
[  124.384703] l4tbr0: port 1(rndis0) entered forwarding state
[  124.384906] android_work: sent uevent USB_STATE=CONFIGURED
[  124.418507] video4linux video1: frame start syncpt timeout!0
[  124.830509] video4linux video1: frame start syncpt timeout!0
[  125.039586] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 18
[  125.250776] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 19
[  125.473334] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 20
[  125.632121] tegra_soctherm 700e2000.soctherm: soctherm: trip temperature 2147483647 forced to 127000
[  125.684481] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 21
[  125.895645] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 22
[  126.118094] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 23
[  126.340629] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 24
...
[  120.458528] video4linux video1: frame start syncpt timeout!0
[  120.660568] vi 54080000.vi: tegra_channel_error_status:error 4000 frame

hello swkim88888,

there’s VI to use sync-points to communicate with sensor hardware signaling, and programming the buffers as captured frames. this error related to syncpt timeout usually caused by the DT settings mismatch with the sensor capability.
for example,
please review Sensor Pixel Clock to configure pixel_clk_hz correctly.
you may also boost the system performance with jetson_clocks.sh to configure all clocks as maximum.
if possible, please also arrange hardware resources to probe the MIPI signaling, you may examine sensor is actually sending out the signal to the CSI brick.
thanks

Thanks @JerryChang

I will check DT for the first to configure pixel_clk_hz
And read the Sensor Pixel Clock too.

Dear @JerryChang

Alway’s thanks to your kindly reply
So, I hope you have nice day today

I check up my DeviceTree CSI line is not match

Before Question to you,
I want to control CSI0,CSI1 ((2+2)x1, i2c-7) and CSI4(4x1, i2c-1)
to control two imx230(with thcv241a, thcv242a by v-by-one).

And I figure out CSI4 line is mismatch.(Guessing …)

:

 {
	host1x {
		vi_base: vi {
			num-channels = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				vi_port0: port@0 {
					reg = <0>;
					rbpcv2_imx230_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx230_csi_out0>;
					};
				};
				vi_port1: port@1 {
					reg = <1>;
					rbpcv2_imx230_vi_in1: endpoint {
						port-index = <4>;
						bus-width = <2>;
						remote-endpoint = <&rbpcv2_imx230_csi_out1>;
					};
				};
			};
		};

		csi_base: nvcsi {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			csi_chan0: channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan0_port0: port@0 {
						reg = <0>;
						rbpcv2_imx230_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <2>;
							remote-endpoint = <&rbpcv2_imx230_dual_out0>;
						};
					};
					csi_chan0_port1: port@1 {
						reg = <1>;
						rbpcv2_imx230_csi_out0: endpoint@1 {
							remote-endpoint = <&rbpcv2_imx230_vi_in0>;
						};
					};
				};
			};
			csi_chan1: channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan1_port0: port@2 {
						reg = <0>;
						rbpcv2_imx230_csi_in1: endpoint@2 {
							port-index = <4>;
							bus-width = <2>;
							remote-endpoint = <&rbpcv2_imx230_out1>;
						};
					};
					csi_chan1_port1: port@3 {
						reg = <1>;
						rbpcv2_imx230_csi_out1: endpoint@3 {
							remote-endpoint = <&rbpcv2_imx230_vi_in1>;
						};
					};
				};
			};
		};
	};

And all of my mode node’s tegra_sinterface set to “setrial_a”

tegra_sinterface = "serial_a";

So here is my question.

  1. How can I set my interface set to CSI4?
  2. May I ask about below vale meannig?
  • port-index = <0>;
  • bus-width = <2>;
  • tegra_sinterface = “serial_a”
  1. Where can I get devicetree’s information?
    ** I guess here : video-interfaces.txt - Documentation/devicetree/bindings/media/video-interfaces.txt - Linux source code (v4.9.140) - Bootlin

I would be very happy if you reply to my question.
Thanks.

hello swkim88888,

it’s one-by-one mappings, and port-index use decimal.
for example, port-index=<0> for serial-A, port-index=<1> for serial-B.
hence, you’re using serial-E, please configure port-index=<4>.

is this a 4-lane configuration? if yes, please update bus-width accordingly.

besides,
you should also have correct tegra_sinterface settings in your mode definition.
thanks

1 Like

Thanks @JerryChang

I checked my issue solved.
I tested my DT like this code seemed to work But.
According your reply.

cam0 (i2c-7, CSI0 & CSI1) :

  • port-index = <0>;
  • bus-width = <2>;
  • tegra_sinterface = “serial_a”

cam1(i2c-1, CSI4)

  • port-index = <2>;
  • bus-width = <2>;
  • tegra_sinterface = “serial_c”

this change makes my cam work.
But this configure is not 4lane only 2lane?

Should I change both bus-width <4>?

Am I right?

hello swkim88888,

ya, it looks you’re setting 2-lane configuration.
please update those properties if you’re having 4-lane camera.
note,
you should also review the pixel clock since it depends-on the lane configuration.
thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.