How to enable CSI0?

Can I do this? Because v4l2-ctl consistently outputs a frame rate of 30.01fps, it proves that the hardware is good. but Argus/GStreamer is malfunctioning. Can I perform the following repairs?
Step 1: Restart nvargus:
$:DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-
raw(memory:NVMM),width=1920,height=1080,framerate=30/1’ ! nvoverlaysink sync=0
If this image can be displayed normally, it proves that the nv3dsink display plugin is incompatible.
Step 2: Reinstall the full set of L4T camera multimedia components (fix nvbuf/Argus initialization failure)
Complete reinstallation and repair of dependencies:
$:sudo apt update
$:sudo apt reinstall -y nvidia-l4t-nvbuf nvidia-l4t-gstreamer nvidia-l4t-multimedia
nvidia-l4t-camera
$:sudo reboot
Step 3: Add permissions (execute after restart)
$:sudo usermod -aG video,gpio,nvargus,nvbuf lstd
$: logout # Log out and log in again, permissions take full effect
Can I do this? Please guide me, teacher.

Looks like v4l2-ctl working well.

Have a try below command.

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080' ! nvvidconv ! fpsdisplaysink video-sink=fakesink

The nvoverlaysink don’t support in current release.

Thanks

After running the command, the result is as follows:

lstd@lstd-desktop:~$ gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080’ ! nvvidconv ! fpsdisplaysink video-sink=fakesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode  = 2
Output Stream W = 1920 H = 1080
seconds to Run    = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:723 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:242 (propagating)
WARNING: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0:
Not enough buffering available for  the processing deadline of 0:00:00.020000000, add enough queues to buffer  0:00:00.020000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element “pipeline0”.
Execution ended after 0:00:04.002913331
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
Freeing pipeline …
lstd@lstd-desktop:~$

Do you modify the tegra_sinterface to serial_b?

sudo dtc -I fs -O dts -o extracted_proc.dts /sys/firmware/devicetree/base

teacher:
I changed the tegra_interface to a because the IMX219-15PIN I designed corresponds to the CSI0 channel, which is different from the development board.

1.The modified content is as follows:

2.文件"extracted"如下:

extracted_proc.txt (428.2 KB)

3.The schematic diagram of the customized board is as follows:

The review command is as follows, please help to check if it is correct?

lstd@lstd-desktop:~/Desktop/bobo$ dtc -I fs /proc/device-tree | grep port-index
: Warning (graph_endpoint): /cam_i2cmux/i2c@1/rbpcv3_imx477_c@1a/ports/port@0/endpoint: graph connection to node ‘/host1x@13e00000/nvcsi@15a00000/channel@1/ports/port@0/endpoint@2’ is not bidirectional
port-index = <0x01>;
port-index = <0x01>;
port-index = <0x02>;
port-index = <0x02>;
port-index = <0x00>;
port-index = <0x02>;
port-index = <0x00>;
port-index = <0x02>;
lstd@lstd-desktop:~/Desktop/bobo$ dtc -I fs /proc/device-tree | grep lane-polar
: Warning (graph_endpoint): /cam_i2cmux/i2c@1/rbpcv3_imx477_c@1a/ports/port@0/endpoint: graph connection to node ‘/host1x@13e00000/nvcsi@15a00000/channel@1/ports/port@0/endpoint@2’ is not bidirectional
lane-polarities = <0x00 0x00 0x01>;
lstd@lstd-desktop:~/Desktop/bobo$ dtc -I fs /proc/device-tree | grep tegra_sinterface
: Warning (graph_endpoint): /cam_i2cmux/i2c@1/rbpcv3_imx477_c@1a/ports/port@0/endpoint: graph connection to node ‘/host1x@13e00000/nvcsi@15a00000/channel@1/ports/port@0/endpoint@2’ is not bidirectional
tegra_sinterface = “serial_a”;
tegra_sinterface = “serial_a”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_b”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
tegra_sinterface = “serial_c”;
lstd@lstd-desktop:~/Desktop/bobo$

Do you need me to change tegra_interface to serial-b?

Looks like you didn’t doing the thing right.

You need override the tegra_sinterface here. Below is copy from your dump it still show serial_b

			rbpcv2_imx219_a@10 {
				sensor_model = "imx219";
				devnode = "video0";
				reset-gpios = <0x50 0x3e 0x00>;
				compatible = "sony,imx219";
				physical_h = "2.760";
				use_sensor_mode_id = "true";
				status = "okay";
				reg = <0x10>;
				phandle = <0x490>;
				physical_w = "3.680";

				mode0 {
					discontinuous_clk = "yes";
					readout_orientation = "90";
					exposure_factor = "1000000";
					mclk_khz = "24000";
					phy_mode = "DPHY";
					default_gain = "16";
					dpcm_enable = "false";
					max_gain_val = "170";
					framerate_factor = "1000000";
					min_hdr_ratio = [31 00];
					num_lanes = [32 00];
					max_framerate = "21000000";
					min_gain_val = "16";
					pixel_phase = "rggb";
					mode_type = "bayer";
					pix_clk_hz = "182400000";
					step_gain_val = [31 00];
					cil_settletime = [30 00];
					default_exp_time = "2495";
					active_h = "2464";
					max_exp_time = "683709";
					lane_polarity = [36 00];
					active_w = "3280";
					min_exp_time = "13";
					max_hdr_ratio = [31 00];
					min_framerate = "2000000";
					mclk_multiplier = "9.33";
					step_exp_time = [31 00];
					default_framerate = "21000000";
					csi_pixel_bit_depth = "10";
					step_framerate = [31 00];
					inherent_gain = [31 00];
					embedded_metadata_height = [32 00];
					line_length = "3448";
					tegra_sinterface = "serial_b";
					gain_factor = "16";
				};

I have already overwritten it, I ran the following command to overwrite it.
“$:dtc -I dts -O dtb imx219_edit.dts -o /tmp/tegra234-p3767-camera-p3768-imx219- dual.dtbo”
"$:sudo cp /tmp/tegra234-p3767-camera-p3768-imx219-dual.dtbo /boot/tegra234-p3767-camera-p3768-imx219- dual.dtbo "
Teacher:

After covering, I restarted and ran the following “$:dtc -I dtb -O dts /boot/tegra234-p3767-camera-p3768-imx219-dual.dtbo > imx219_edit.dts” command again to check It is found that the two files “imx219_edit. dts” are identical.
I don’t know why it just wasn’t successful, did I miss that step?

The following is the exported file, please guide me.

imx219_edit_new.txt (2.9 KB)

Teacher, can you provide some guidance again?

You can just edit the extracted_proc.dts modify to serial_a and using dtc to compile to dtb to correct it.

teacher:
Should we execute the following command?

$:dtc -I dts -O dtb extracted_proc.dts -o /boot/tegra234-p3767-camera-p3768-imx219- dual.dtbo

Do you want to replace the file ‘tegra234-p3767-camera-p7768-imx219-dual. dtbo’?

No, replace the main dtb of the FDT in extlinux.conf.

LABEL JetsonIO
        MENU LABEL Custom Header Config: <CSI Jetson Camera IMX185>
        LINUX /boot/Image
        FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0005-nv.dtb

You should find this and modify to serial_b.

Add here is not correct.

teacher:
I have successfully modified it, but the video still cannot be played. I obtained the report according to the method you suggested last time.

1.The following is the converted device tree:

extracted_proc_dts.txt (428.1 KB)

imx219_edit_dts.txt (3.0 KB)

2.Here is the report played:

journalctl_report.txt (9.2 KB)

gst_launch_report.txt (2.2 KB)

Could you please give me some guidance again.

Does’ FusaCapterViCsiHW waitCsiFrameStart/waitCsiFrameEnd Timeout 'indicate that CSI verification did not pass? Can I use the following method to disable verification?
Statements in the file ‘/boot/extlinux/extlinux. conf’
Add the statement ‘camera_fusa=0’ after ‘APPEND ${cbootargs} root=… nospectre-bhb’.
Can this be done?

Teacher, can you persist in guiding me? This problem has been unresolved for a long time.

@ShaneCCC

Teacher, can you persist in guiding me? This problem has been unresolved for a long time.

@ShaneCCC

You only modify the mode0 which 3840x2464 but other modes still show serial_b and the APP using the 1920x1080 mode that define the serial_b also.

You should check carefully.

Thanks

Yes, all mode need change to serial-a under the rbpcv2_imx219_a@10 {}