This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: Capturing images with the V4L2 application failed

Part Number: AM62P

Tool/software:

I encountered a problem during the development of the camera bringup.The details are as follows:

There are four cameras, connected to a deserializer. But the four cameras don't need to be controlled, so I only implemented the driver for the deserializer.

I developed according to Chapter 3.2.2.2 CSI2RX of the Processor SDK Linux Software Developer's Guide.

The driver has been probed, here are the logs from lsmode and media graph.

$ lsmod | grep 712
max96712               12288  1
v4l2_async             20480  4 v4l2_fwnode,j721e_csi2rx,cdns_csi2rx,max96712
videodev              258048  8 v4l2_async,v4l2_fwnode,j721e_csi2rx,videobuf2_v4l2,cdns_csi2rx,max96712,v4l2_mem2mem,wave5
mc                     61440  8 v4l2_async,videodev,j721e_csi2rx,videobuf2_v4l2,cdns_csi2rx,videobuf2_common,max96712,v4l2_mem2mem


$ media-ctl -p
Media controller API version 6.6.32

Media device information
------------------------
driver          j721e-csi2rx
model           TI-CSI2RX
serial
bus info        platform:30102000.ticsi2rx
hw revision     0x1
driver version  6.6.32

Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        routes:
                0/0 -> 1/0 [ACTIVE]
        pad0: Sink
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
        pad2: Source
                -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
        pad3: Source
                -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
        pad4: Source
                -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
        pad5: Source
                -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
        pad6: Source
                -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        routes:
                0/0 -> 1/0 [ACTIVE]
        pad0: Sink
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                <- "max96712 1-0027":0 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
        pad3: Source
        pad4: Source

- entity 15: max96712 1-0027 (1 pad, 1 link, 0 routes)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev2
        pad0: Source
                [stream:0 fmt:RGB888_1X24/1920x1080 field:none]
                -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
        pad0: Sink
                <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
        pad0: Sink
                <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
        pad0: Sink
                <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
        pad0: Sink
                <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
        pad0: Sink
                <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

- entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video7
        pad0: Sink
                <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

The oscilloscope measurement can confirm that the deserializer has sent image data at this time.

When I continue to execute the Capturing raw frames command, I get an error: No sensor found

$ LIBCAMERA_LOG_LEVELS=*:DEBUG cam -c1 --stream width=640,height=480,pixelformat=UYVY -C20
[5:28:22.165815510] [1384] DEBUG IPAModule ipa_module.cpp:334 ipa_rkisp1.so: IPA module /usr/lib/libcamera/ipa_rkisp1.so is signed
[5:28:22.166152500] [1384] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib/libcamera/ipa_rkisp1.so'
[5:28:22.166392220] [1384] DEBUG IPAModule ipa_module.cpp:334 ipa_rpi_vc4.so: IPA module /usr/lib/libcamera/ipa_rpi_vc4.so is signed
[5:28:22.166492085] [1384] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib/libcamera/ipa_rpi_vc4.so'
[5:28:22.166631620] [1384]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0+dirty (2024-08-19T13:39:16+00:00)
[5:28:22.167048720] [1385] DEBUG Camera camera_manager.cpp:69 Starting camera manager
[5:28:22.180743400] [1385] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "j721e-csi2rx" created from /dev/media0
[5:28:22.181584125] [1385] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 7 missing dependencies
[5:28:22.185222680] [1385] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
[5:28:22.185301070] [1385] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: j721e-csi2rx
[5:28:22.186494685] [1385] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerISI'
[5:28:22.186635085] [1385] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerRkISP1'
[5:28:22.186725140] [1385] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerVc4'
[5:28:22.186778740] [1385] DEBUG RPI vc4.cpp:179 Unable to acquire a Unicam instance
[5:28:22.186801965] [1385] DEBUG RPI vc4.cpp:179 Unable to acquire a Unicam instance
[5:28:22.186824330] [1385] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'SimplePipelineHandler'
[5:28:22.186854935] [1385] DEBUG DeviceEnumerator device_enumerator.cpp:318 Successful match for media device "j721e-csi2rx"
[5:28:22.186930735] [1385] ERROR SimplePipeline simple.cpp:1424 No sensor found
[5:28:22.186964820] [1385] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerUVC'
Camera 1 not found
Failed to create camera session

The relevant dts files are as follows. Could you please help confirm the reason for this error?

&main_i2c1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

			camera@27 {
				compatible = "maxim,max96712";
				reg = <0x27>;

				clocks = <&clk_max96712_fixed>;
				clock-names = "xclk";

				port {
					csi2_cam0: endpoint {
						remote-endpoint = <&csi2rx0_in_sensor>;
						#link-frequencies = /bits/ 64 <456000000>;
						clock-lanes = <0>;
						data-lanes = <1 2 3 4>;
					};
				};
	};
};

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

		csi0_port0: port@0 {
			reg = <0>;
			status = "okay";

			csi2rx0_in_sensor: endpoint {
				remote-endpoint = <&csi2_cam0>;
				bus-type = <4>; /* CSI2 DPHY. */
				clock-lanes = <0>;
				data-lanes = <1 2 3 4>;
			};
		};
	};
};

&ti_csi2rx0 {
	status = "okay";
};

&dphy0 {
	status = "okay";
};

  • Hello,

    What does your "c4l2-ctl --list-devices" show? Can you try to use yavta to capture and see if that works?

    Regards,

    Jianzhong

  • Hello,

    Here is the log tested with v4l2-ctl and yavta.

    $ v4l2-ctl --list-devices
    j721e-csi2rx (platform:30102000.ticsi2rx):
            /dev/video2
            /dev/video3
            /dev/video4
            /dev/video5
            /dev/video6
            /dev/video7
            /dev/media0
    
    wave5-dec (platform:30210000.video-codec):
            /dev/video0
            /dev/video1
            
    $ v4l2-ctl -d2 --stream-mmap -v width=640,height=480,pixelformat=UYVY
                    VIDIOC_STREAMON returned -1 (Broken pipe)
    
    $ yavta -s 640x480 -f UYVY /dev/video2 -c20
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 640x480 (stride 1280) field none buffer size 614400
    Video format: UYVY (59565955) 640x480 (stride 1280) field none buffer size 614400
    8 buffers requested.
    length: 614400 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xffffa13ca000.
    length: 614400 offset: 614400 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffffa1334000.
    length: 614400 offset: 1228800 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffffa129e000.
    length: 614400 offset: 1843200 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffffa1208000.
    length: 614400 offset: 2457600 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffffa1172000.
    length: 614400 offset: 3072000 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffffa10dc000.
    length: 614400 offset: 3686400 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffffa1046000.
    length: 614400 offset: 4300800 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffffa0fb0000.
    Unable to start streaming: Broken pipe (32).
    8 buffers released.

  • Hi Jianzhong,

    Need you high priority for this issue when you come back to office, customer need deliver the SW to CAR OEM as soon as possible.

    BR,

    Biao

  • Hello Cheng Nuo,

    Your "v4l2-ctl --list-devices" looks fine.

    A few questions and suggestions:

    1. Why did you have a "#" in the link-frequency line of the device tree?

    #link-frequencies = /bits/ 64 <456000000>;

    2. From the output of "meida-ctl -p", the format of "cdns_csi2rx.30101000.csi-bridge" and "max96712 1-0027" do not match. Please refer to this FAQ on how to configure the media pipe format.

    3. Can you use devmem2 to check these registers while the yavta command is running?

    • devmem2 0x30101020 w
    • devmem2 0x30101104 w
    • devmem2 0x30111000 w

    Please refer to this earlier thread for more information about these registers.

    Regards,

    Jianzhong

  • Hello Jianzhong,

    1.The link-frequencies is defined in the driver, and I will delete the link-frequency line in the device tree.

    2.I have modified the media pipe format to be consistent, but it still doesn't work.

    $ media-ctl -p
    Media controller API version 6.6.32
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
            pad5: Source
                    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
            pad6: Source
                    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "max96712 1-0027":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source
    
    - entity 15: max96712 1-0027 (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
    
    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
                    
    $ yavta -s 1920x1536 -f UYVY /dev/video2 -c2
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    Video format: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    8 buffers requested.
    length: 5898240 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xffff7fd80000.
    length: 5898240 offset: 5898240 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffff7f7e0000.
    length: 5898240 offset: 11796480 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff7f240000.
    length: 5898240 offset: 17694720 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffff7eca0000.
    length: 5898240 offset: 23592960 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffff7e700000.
    length: 5898240 offset: 29491200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffff7e160000.
    length: 5898240 offset: 35389440 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffff7dbc0000.
    length: 5898240 offset: 41287680 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffff7d620000.
    

    3.Here is the register value.Coule you please help check it?

    devmem2 0x30101020 w
    /dev/mem opened.
    Memory mapped at address 0xffff7ffe6000.
    Read at address  0x30101020 (0xffff7ffe6020): 0x00000000
    $ devmem2 0x30101104 w
    /dev/mem opened.
    Memory mapped at address 0xffffa3a1b000.
    Read at address  0x30101104 (0xffffa3a1b104): 0x80000111
    $ devmem2 0x30111000 w
    /dev/mem opened.
    Memory mapped at address 0xffff97dc7000.
    Read at address  0x30111000 (0xffff97dc7000): 0x40800000

    Thanks,

    Cheng Nuo

  • Hello Jianzhong,

    After I changed the driver of the max96712, I can now capture images. But the image seemed abnormal, as shown below.

    $ yavta -s 1920x1536 -f UYVY /dev/video2 -c20 -F#.uyvy
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    Video format: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    8 buffers requested.
    length: 5898240 offset: 0 timestamp type/source: mono/EoF
    Buf[  640.925244] max96712 1-0027: s_stream true
    fer 0/0 mapped at address 0xffffa01f0000.
    length: 5898240 offset: 5898240 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffff9fc50000.
    length: 5898240 offset: 11796480 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff9f6b0000.
    length: 5898240 offset: 17694720 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffff9f110000.
    length: 5898240 offset: 23592960 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffff9eb70000.
    length: 5898240 offset: 29491200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffff9e5d0000.
    length: 5898240 offset: 35389440 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffff9e030000.
    length: 5898240 offset: 41287680 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffff9da90000.
    0 (0) [-] any 0 5898240 B 642.400161 642.400208 0.605 fps ts mono/EoF
    1 (1) [-] any 1 5898240 B 643.711627 643.711669 0.763 fps ts mono/EoF
    2 (2) [-] any 2 5898240 B 665.611989 665.612037 0.046 fps ts mono/EoF
    3 (3) [-] any 3 5898240 B 665.866927 665.866973 3.923 fps ts mono/EoF
    4 (4) [-] any 4 5898240 B 669.178686 669.178737 0.302 fps ts mono/EoF
    5 (5) [-] any 5 5898240 B 676.500780 676.500829 0.137 fps ts mono/EoF
    6 (6) [-] any 6 5898240 B 676.612162 676.620227 8.978 fps ts mono/EoF
    7 (7) [-] any 7 5898240 B 711.530218 711.530275 0.029 fps ts mono/EoF
    8 (0) [-] any 8 5898240 B 712.504567 712.504605 1.026 fps ts mono/EoF
    9 (1) [-] any 9 5898240 B 713.793573 713.793616 0.776 fps ts mono/EoF
    10 (2) [-] any 10 5898240 B 723.561606 723.561658 0.102 fps ts mono/EoF
    11 (3) [-] any 11 5898240 B 741.471081 741.471136 0.056 fps ts mono/EoF
    12 (4) [-] any 12 5898240 B 747.979442 747.979493 0.154 fps ts mono/EoF
    13 (5) [-] any 13 5898240 B 766.582051 766.582098 0.054 fps ts mono/EoF
    14 (6) [-] any 14 5898240 B 768.813624 768.813669 0.448 fps ts mono/EoF
    15 (7) [-] any 15 5898240 B 769.837988 769.838024 0.976 fps ts mono/EoF
    16 (0) [-] any 16 5898240 B 770.380320 770.380351 1.844 fps ts mono/EoF
    17 (1) [-] any 17 5898240 B 785.136490 785.136539 0.068 fps ts mono/EoF
    18 (2) [-] any 18 5898240 B 789.547291 789.547336 0.227 fps ts mono/EoF
    19 (3) [-] any 19 5898240 B 789.780626 789.780663 4.286 fps ts mono/EoF
    [  790.084523] max96712 1-0027: s_stream false
    Captured 20 frames in 149.033627 seconds (0.134198 fps, 791531.426121 B/s).
    8 buffers released.
    

    In fact, the deserializer max96712 transmits image data from four cameras through four virtual channels.

    How should I modify the device tree to complete the four-camera configuration? Could you please provide the example dts?

    Thanks,

    Cheng Nuo

  • Hello Jianzhong,

    According to your reply, I have made the following attempts:

    1.Modified the device tree according to K3-FPDlink-IMX390-RCM-0-x.ditso.But the image I captured is still the same as yesterday.

    The relevant dts files are as follows.Could you please help to check whether it is correct?

    &main_i2c1 {
    	#address-cells = <1>;
    	#size-cells = <0>;
    	status = "okay";
    
    			gmsl-deserializer@27 {
                        compatible = "maxim,max96722";
                        reg = <0x27>;
    
    					clock-names = "refclk";
                        clocks = <&clk_fusion_25M_fixed>;
    
                        ports {
                                #address-cells = <1>;
                                #size-cells = <0>;
    
    							port@0 {
                                        reg = <0>;
    									max96722_in_0: endpoint{
    											remote_endpoint = <&max96717_out_0>;
    									};
    							};
    
    							port@1 {
                                        reg = <1>;
    									max96722_in_1: endpoint{
    											remote_endpoint = <&max96717_out_1>;
    									};
    							};
    
    							port@2 {
                                        reg = <2>;
    									max96722_in_2: endpoint{
    											remote_endpoint = <&max96717_out_2>;
    									};
    							};
    
    							port@3 {
                                        reg = <3>;
    									max96722_in_3: endpoint{
    											remote_endpoint = <&max96717_out_3>;
    									};
    							};
    
                                port@4 {
                                        reg = <4>;
                                        max96722_out0: endpoint {
                                                bus-type = <4>;
                                                clock-lanes = <0>;
                                                data-lanes = <1 2 3 4>;
    											link-frequencies = /bits/ 64 <800000000>;
                                                remote-endpoint = <&csi2rx0_in_sensor>;
                                        };
                                };
                        };
    
    					links {
                    		#address-cells = <1>;
                    		#size-cells = <0>;
    
    						link@0 {
    							reg = <0>;
                    			i2c-alias = <0x40>;
    
    							ti,rx-mode = <3>;
    
    							serializer0: serializer {
                        			compatible = "maxim,max96717";
                        			gpio-controller;
                        			#gpio-cells = <2>;
    
                        			#clock-cells = <0>;
    
                        			ports {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
    
                            			port@0 {
                                			reg = <0>;
                                			max96717_in_0: endpoint {
                                    			data-lanes = <1 2 3 4>;
                                    			remote-endpoint = <&isx031_out_0>;
                                			};
                            			};
    
                            			port@1 {
                                			reg = <1>;
    
                                			max96717_out_0: endpoint {
                                    			remote-endpoint = <&max96722_in_0>;
                                			};
                            			};
                        			};
                        			i2c {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
                            			isx031_0@1a {
                                			compatible = "sony,isx031";
                                			reg = <0x1a>;
    
                                			port {
                                    			isx031_out_0: endpoint {
                                        			remote-endpoint = <&max96717_in_0>;
                                    			};
                                			};
                            			};
                        			};
                    			};
    						};
    
    						link@1 {
    							reg = <1>;
                    			i2c-alias = <0x40>;
    
    							ti,rx-mode = <3>;
    
    							serializer1: serializer {
                        			compatible = "maxim,max96717";
                        			gpio-controller;
                        			#gpio-cells = <2>;
    
                        			#clock-cells = <0>;
    
                        			ports {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
    
                            			port@0 {
                                			reg = <0>;
                                			max96717_in_1: endpoint {
                                    			data-lanes = <1 2 3 4>;
                                    			remote-endpoint = <&isx031_out_1>;
                                			};
                            			};
    
                            			port@1 {
                                			reg = <1>;
    
                                			max96717_out_1: endpoint {
                                    			remote-endpoint = <&max96722_in_1>;
                                			};
                            			};
                        			};
                        			i2c {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
                            			isx031_1@1a {
                                			compatible = "sony,isx031";
                                			reg = <0x1a>;
    
                                			port {
                                    			isx031_out_1: endpoint {
                                        			remote-endpoint = <&max96717_in_1>;
                                    			};
                                			};
                            			};
                        			};
                    			};
    						};
    
    						link@2 {
    							reg = <2>;
                    			i2c-alias = <0x40>;
    
    							ti,rx-mode = <3>;
    
    							serializer2: serializer {
                        			compatible = "maxim,max96717";
                        			gpio-controller;
                        			#gpio-cells = <2>;
    
                        			#clock-cells = <0>;
    
                        			ports {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
    
                            			port@0 {
                                			reg = <0>;
                                			max96717_in_2: endpoint {
                                    			data-lanes = <1 2 3 4>;
                                    			remote-endpoint = <&isx031_out_2>;
                                			};
                            			};
    
                            			port@1 {
                                			reg = <1>;
    
                                			max96717_out_2: endpoint {
                                    			remote-endpoint = <&max96722_in_2>;
                                			};
                            			};
                        			};
                        			i2c {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
                            			isx031_2@1a {
                                			compatible = "sony,isx031";
                                			reg = <0x1a>;
    
                                			port {
                                    			isx031_out_2: endpoint {
                                        			remote-endpoint = <&max96717_in_2>;
                                    			};
                                			};
                            			};
                        			};
                    			};
    						};
    
    						link@3 {
    							reg = <3>;
                    			i2c-alias = <0x40>;
    
    							ti,rx-mode = <3>;
    
    							serializer3: serializer {
                        			compatible = "maxim,max96717";
                        			gpio-controller;
                        			#gpio-cells = <2>;
    
                        			#clock-cells = <0>;
    
                        			ports {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
    
                            			port@0 {
                                			reg = <0>;
                                			max96717_in_3: endpoint {
                                    			data-lanes = <1 2 3 4>;
                                    			remote-endpoint = <&isx031_out_3>;
                                			};
                            			};
    
                            			port@1 {
                                			reg = <1>;
    
                                			max96717_out_3: endpoint {
                                    			remote-endpoint = <&max96722_in_3>;
                                			};
                            			};
                        			};
                        			i2c {
                            			#address-cells = <1>;
                            			#size-cells = <0>;
                            			isx031_3@1a {
                                			compatible = "sony,isx031";
                                			reg = <0x1a>;
    
                                			port {
                                    			isx031_out_3: endpoint {
                                        			remote-endpoint = <&max96717_in_3>;
                                    			};
                                			};
                            			};
                        			};
                    			};
    						};
    
    
    					};
            	};
    };
    
    
    &cdns_csi2rx0 {
    	ports {
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		csi0_port0: port@0 {
    			reg = <0>;
    			status = "okay";
    
    			csi2rx0_in_sensor: endpoint {
    				remote-endpoint = <&max96722_out0>;
    				bus-type = <4>; /* CSI2 DPHY. */
    				clock-lanes = <0>;
    				data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };

    2.Modify the driver of max96712 according to the driver of ds90ub960. After the driver has been probed, I tried to capture the image using yavta.But a kernel crash error occurred.

    $ media-ctl -p
    Media controller API version 6.6.32
    [  779.048641] /****max96722_init_cfg line 2983  num_routes 1
    
    Media device information
    ------------------------
    driver    [  779.056814] /****_max96722_set_routing line 2742
          j721e-csi2rx
    model           TI-CSI2RX
    serial
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
            pad5: Source
                    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
            pad6: Source
                    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "max96722 1-0027":4 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source
    
    - entity 15: max96722 1-0027 (6 pads, 1 link, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
            routes:
                    0/0 -> 4/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
            pad1: Sink
            pad2: Sink
            pad3: Sink
            pad4: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
            pad5: Source
    
    - entity 26: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 32: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 38: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 44: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 50: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 56: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

    Here is the relevant log. Could you please give me some ideas for further investigation?

    $ yavta -s 1920x1536 -f UYVY /dev/video2 -c20
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    Video format: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    8 buffers requested.
    length: 5898240 offset: 0 timestamp type/source: mono/EoF
    Buf[ 1040.129933] /****max96722_get_frame_desc line 2799
    fer 0/0 mapped at address 0xffff8c140000.
    length: 5898240 offse[ 1040.137961] /****max96722_get_frame_desc line 2805
    t: 5898240 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at[ 1040.148368] /****max96722_get_frame_desc line 2818
     address 0xffff8bba0000.
    length: 5898240 offset: 11796480 times[ 1040.158797] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
    tamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff8[ 1040.173073] Mem abort info:
    b600000.
    length: 5898240 offset: 17694720 timestamp type/source[ 1040.181413]   ESR = 0x0000000096000006
    : mono/EoF
    Buffer 3/0 mapped at address 0xffff8b060000.
    length[ 1040.190682]   EC = 0x25: DABT (current EL), IL = 32 bits
    : 5898240 offset: 23592960 timestamp type/source: mono/EoF
    Buff[ 1040.201521]   SET = 0, FnV = 0
    er 4/0 mapped at address 0xffff8aac0000.
    length: 5898240 offset[ 1040.210107]   EA = 0, S1PTW = 0
    : 29491200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at[ 1040.218781]   FSC = 0x06: level 2 translation fault
     address 0xffff8a520000.
    length: 5898240 offset: 35389440 times[ 1040.229188] Data abort info:
    tamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffff8[ 1040.237601]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
    9f80000.
    length: 5898240 offset: 41287680 timestamp type/source[ 1040.248613]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    : mono/EoF
    Buffer 7/0 mapped at address 0xffff899e0000.
    [ 1040.259197]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [ 1040.269514] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000086c05000
    [ 1040.275949] [0000000000000010] pgd=080000008785b003, p4d=080000008785b003, pud=080000008610d003, pmd=0000000000000000
    [ 1040.286583] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
    [ 1040.292836] Modules linked in: max96722 overlay bluetooth cfg80211 ecdh_generic ecc rfkill cdns_csi2rx rpmsg_ctrl rpmsg_char v4l2_fwnode crct10dif_ce pvrsrvkm(O) display_connector j721e_csi2rx rtc_ti_k3 k3_j72xx_bandgap wave5 rti_wdt videobuf2_dma_contig tidss v4l2_mem2mem videobuf2_memops videobuf2_v4l2 ti_k3_r5_remoteproc drm_dma_helper v4l2_async videobuf2_common drm_kms_helper mcrc64 sa2ul videodev authenc mc cdns_dphy_rx cryptodev(O) fuse drm drm_panel_orientation_quirks backlight ipv6
    [ 1040.336294] CPU: 2 PID: 1085 Comm: yavta Tainted: G           O       6.6.32-invo #1
    [ 1040.344021] Hardware name: Texas Instruments AM62P5 SK (DT)
    [ 1040.349577] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [ 1040.356523] pc : max96722_get_frame_desc+0x158/0x430 [max96722]
    [ 1040.362447] lr : max96722_get_frame_desc+0x14c/0x430 [max96722]
    [ 1040.368360] sp : ffff8000822bb7f0
    [ 1040.371662] x29: ffff8000822bb8d0 x28: ffff00000042ad80 x27: ffff0000049cf940
    [ 1040.378786] x26: ffff000006127880 x25: ffff000007b20c88 x24: ffff000004039150
    [ 1040.385909] x23: 0000000000000004 x22: ffff80007990ad20 x21: ffff8000822bb950
    [ 1040.393032] x20: ffff80007990a0a8 x19: 0000000000000000 x18: 0000000000000006
    [ 1040.400156] x17: 1fffe000007765c1 x16: 0000000000000000 x15: ffff8000822bb220
    [ 1040.407279] x14: 0000000000000000 x13: ffff80008123ea58 x12: 00000000000005f1
    [ 1040.414402] x11: 00000000000001fb x10: ffff800081296a58 x9 : ffff80008123ea58
    [ 1040.421524] x8 : 00000000ffffefff x7 : ffff800081296a58 x6 : 80000000fffff000
    [ 1040.428647] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
    [ 1040.435769] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000006127880
    [ 1040.442893] Call trace:
    [ 1040.445329]  max96722_get_frame_desc+0x158/0x430 [max96722]
    [ 1040.450894]  csi2rx_get_frame_desc_from_source+0x7c/0xac [cdns_csi2rx]
    [ 1040.457413]  csi2rx_get_frame_desc+0x50/0x1a8 [cdns_csi2rx]
    [ 1040.462977]  ti_csi2rx_get_vc+0x114/0x134 [j721e_csi2rx]
    [ 1040.468286]  ti_csi2rx_start_streaming+0x120/0x294 [j721e_csi2rx]
    [ 1040.474370]  vb2_start_streaming+0x68/0x15c [videobuf2_common]
    [ 1040.480207]  vb2_core_streamon+0xf8/0x1bc [videobuf2_common]
    [ 1040.485865]  vb2_ioctl_streamon+0x4c/0x90 [videobuf2_v4l2]
    [ 1040.491355]  v4l_streamon+0x24/0x30 [videodev]
    [ 1040.495865]  __video_do_ioctl+0x330/0x3fc [videodev]
    [ 1040.500867]  video_usercopy+0x2c8/0x658 [videodev]
    [ 1040.505696]  video_ioctl2+0x18/0x24 [videodev]
    [ 1040.510176]  v4l2_ioctl+0x40/0x60 [videodev]
    [ 1040.514483]  __arm64_sys_ioctl+0xac/0xf0
    [ 1040.518401]  invoke_syscall+0x48/0x114
    [ 1040.522143]  el0_svc_common.constprop.0+0xc0/0xe0
    [ 1040.526837]  do_el0_svc+0x1c/0x28
    [ 1040.530143]  el0_svc+0x2c/0x84
    [ 1040.533190]  el0t_64_sync_handler+0x120/0x12c
    [ 1040.537536]  el0t_64_sync+0x190/0x194
    [ 1040.541192] Code: 959e8f96 8b334f40 2a1303f3 f9405401 (f9400820)
    [ 1040.547270] ---[ end trace 0000000000000000 ]---

    Thanks,

    Cheng Nuo

  • Hello,

    I don't see the cameras in your media pipe. 

    Below is an example of the media pipe when 4x IMX219 are connected to AM62A through ub953/ub960 serdes:

    root@am62axx-evm:~# media-ctl -p
    Media controller API version 6.1.80
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.1.80
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/0 -> 1/0 [ACTIVE]
                    0/1 -> 2/0 [ACTIVE]
                    0/2 -> 3/0 [ACTIVE]
                    0/3 -> 4/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:2 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:3 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
            pad5: Source
                    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
            pad6: Source
                    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/0 -> 1/0 [ACTIVE]
                    0/1 -> 1/1 [ACTIVE]
                    0/2 -> 1/2 [ACTIVE]
                    0/3 -> 1/3 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:1 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:2 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:3 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "ds90ub960 4-0030":4 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:1 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:2 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:3 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source
    
    - entity 15: ds90ub960 4-0030 (6 pads, 5 links, 4 routes)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
            routes:
                    0/0 -> 4/0 [ACTIVE]
                    1/0 -> 4/1 [ACTIVE]
                    2/0 -> 4/2 [ACTIVE]
                    3/0 -> 4/3 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "ds90ub953 4-0044":1 [ENABLED,IMMUTABLE]
            pad1: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "ds90ub953 4-0045":1 [ENABLED,IMMUTABLE]
            pad2: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "ds90ub953 4-0046":1 [ENABLED,IMMUTABLE]
            pad3: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "ds90ub953 4-0047":1 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:1 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:2 fmt:SRGGB8_1X8/1920x1080 field:none]
                    [stream:3 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
            pad5: Source
    
    - entity 24: ds90ub953 4-0044 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev3
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "imx219 6-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "ds90ub960 4-0030":0 [ENABLED,IMMUTABLE]
    
    - entity 29: ds90ub953 4-0045 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev4
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "imx219 7-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "ds90ub960 4-0030":1 [ENABLED,IMMUTABLE]
    
    - entity 34: ds90ub953 4-0046 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev5
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "imx219 8-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "ds90ub960 4-0030":2 [ENABLED,IMMUTABLE]
    
    - entity 39: ds90ub953 4-0047 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev6
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    <- "imx219 9-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
                    -> "ds90ub960 4-0030":3 [ENABLED,IMMUTABLE]
    
    - entity 44: imx219 6-0010 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev7
            pad0: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                     crop.bounds:(8,8)/3280x2464
                     crop:(688,700)/1920x1080]
                    -> "ds90ub953 4-0044":0 [ENABLED,IMMUTABLE]
    
    - entity 48: imx219 7-0010 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev8
            pad0: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                     crop.bounds:(8,8)/3280x2464
                     crop:(688,700)/1920x1080]
                    -> "ds90ub953 4-0045":0 [ENABLED,IMMUTABLE]
    
    - entity 52: imx219 8-0010 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev9
            pad0: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                     crop.bounds:(8,8)/3280x2464
                     crop:(688,700)/1920x1080]
                    -> "ds90ub953 4-0046":0 [ENABLED,IMMUTABLE]
    
    - entity 56: imx219 9-0010 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev10
            pad0: Source
                    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                     crop.bounds:(8,8)/3280x2464
                     crop:(688,700)/1920x1080]
                    -> "ds90ub953 4-0047":0 [ENABLED,IMMUTABLE]
    
    - entity 62: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 68: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 74: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 80: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 86: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 92: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video8
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
    

    Please refer to IMX390 or IMX219 driver at: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c?h=ti-linux-6.6.y.

    Regards,

    Jianzhong

  • Hello Jianzhong,

    I modified the drivers of ub960, ub953 and imx219 to meet my needs. The following log shows the same media pipe as your example.

    root@am62pxx-evm:~# media-ctl -p
    Media controller API version 6.6.32
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/0 -> 1/0 [ACTIVE]
                    0/1 -> 2/0 [ACTIVE]
                    0/2 -> 3/0 [ACTIVE]
                    0/3 -> 4/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
            pad5: Source
                    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
            pad6: Source
                    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/0 -> 1/0 [ACTIVE]
                    0/1 -> 1/1 [ACTIVE]
                    0/2 -> 1/2 [ACTIVE]
                    0/3 -> 1/3 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "ds90ub960 1-0027":4 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source
    
    - entity 15: ds90ub960 1-0027 (6 pads, 5 links, 4 routes)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
            routes:
                    0/0 -> 4/0 [ACTIVE]
                    1/0 -> 4/1 [ACTIVE]
                    2/0 -> 4/2 [ACTIVE]
                    3/0 -> 4/3 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "ds90ub953 1-0044":1 [ENABLED,IMMUTABLE]
            pad1: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "ds90ub953 1-0045":1 [ENABLED,IMMUTABLE]
            pad2: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "ds90ub953 1-0046":1 [ENABLED,IMMUTABLE]
            pad3: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "ds90ub953 1-0047":1 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
            pad5: Source
    
    - entity 24: ds90ub953 1-0047 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev3
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "imx219 6-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "ds90ub960 1-0027":3 [ENABLED,IMMUTABLE]
    
    - entity 29: ds90ub953 1-0046 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev4
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "imx219 5-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "ds90ub960 1-0027":2 [ENABLED,IMMUTABLE]
    
    - entity 34: ds90ub953 1-0045 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev5
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "imx219 4-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "ds90ub960 1-0027":1 [ENABLED,IMMUTABLE]
    
    - entity 39: ds90ub953 1-0044 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev6
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    <- "imx219 3-0010":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                    -> "ds90ub960 1-0027":0 [ENABLED,IMMUTABLE]
    
    - entity 44: imx219 3-0010 (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev7
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 1-0044":0 [ENABLED,IMMUTABLE]
    
    - entity 48: imx219 4-0010 (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev8
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 1-0045":0 [ENABLED,IMMUTABLE]
    
    - entity 52: imx219 5-0010 (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev9
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 1-0046":0 [ENABLED,IMMUTABLE]
    
    - entity 56: imx219 6-0010 (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev10
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 1-0047":0 [ENABLED,IMMUTABLE]
    
    - entity 62: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 68: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 74: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 80: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 86: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 92: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

    But the image I captured is still the same as before.Could you please give me some ideas for further investigation?

    root@am62pxx-evm:~# yavta -s 1920x1536 -f UYVY /dev/video2 -c20 -F#.uyvy
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    Video format: UYVY (59565955) 1920x1536 (stride 3840) field none buffer size 5898240
    8 buffers requested.
    length: 5898240 offset: 0 timestamp type/source: mono/EoF
    Buf[  119.210478] /*********ub960_enable_streams*********/
    fer 0/0 mapped at address 0xffff86170000.
    length: 5898240 offset: 5898240 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffff85bd0000.
    length: 5898240 offset: 11796480 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff85630000.
    length: 5898240 offset: 17694720 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffff85090000.
    length: 5898240 offset: 23592960 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffff84af0000.
    length: 5898240 offset: 29491200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffff84550000.
    length: 5898240 offset: 35389440 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffff83fb0000.
    length: 5898240 offset: 41287680 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffff83a10000.
    0 (0) [-] any 0 5898240 B 134.982489 134.982542 0.064 fps ts mono/EoF
    1 (1) [-] any 1 5898240 B 135.454302 135.501463 2.119 fps ts mono/EoF
    2 (2) [-] any 2 5898240 B 145.534732 145.534788 0.099 fps ts mono/EoF
    3 (3) [-] any 3 5898240 B 146.413447 146.413485 1.138 fps ts mono/EoF
    4 (4) [-] any 4 5898240 B 146.946905 146.946936 1.875 fps ts mono/EoF
    5 (5) [-] any 5 5898240 B 148.114631 148.114675 0.856 fps ts mono/EoF
    6 (6) [-] any 6 5898240 B 150.184155 150.184200 0.483 fps ts mono/EoF
    7 (7) [-] any 7 5898240 B 152.718937 152.718984 0.395 fps ts mono/EoF
    8 (0) [-] any 8 5898240 B 153.488381 153.899803 1.300 fps ts mono/EoF
    9 (1) [-] any 9 5898240 B 158.575973 158.576059 0.197 fps ts mono/EoF
    10 (2) [-] any 10 5898240 B 159.356870 159.746347 1.281 fps ts mono/EoF
    11 (3) [-] any 11 5898240 B 161.223815 161.223843 0.536 fps ts mono/EoF
    12 (4) [-] any 12 5898240 B 161.373905 161.704957 6.663 fps ts mono/EoF
    13 (5) [-] any 13 5898240 B 163.179923 163.179958 0.554 fps ts mono/EoF
    14 (6) [-] any 14 5898240 B 171.113487 171.113542 0.126 fps ts mono/EoF
    15 (7) [-] any 15 5898240 B 172.279449 172.279502 0.858 fps ts mono/EoF
    16 (0) [-] any 16 5898240 B 177.580238 177.580291 0.189 fps ts mono/EoF
    17 (1) [-] any 17 5898240 B 180.447995 180.448037 0.349 fps ts mono/EoF
    18 (2) [-] any 18 5898240 B 181.853930 181.853963 0.711 fps ts mono/EoF
    19 (3) [-] any 19 5898240 B 187.616163 187.616207 0.174 fps ts mono/EoF
    Captured 20 frames in 68.371646 seconds (0.292519 fps, 1725346.772895 B/s).
    8 buffers released.
    

    Thanks,

    Cheng Nuo

  • But the four cameras don't need to be controlled, so I only implemented the driver for the deserializer.

    Did you mean the cameras are not controlled by AM62A, but can start streaming by themselves? 

    I modified the drivers of ub960, ub953 and imx219 to meet my needs.

    You're using a different serdes than ub960/ub953. Make sure the drivers are really writing correct values to correct registers.

    The oscilloscope measurement can confirm that the deserializer has sent image data at this time.

    How can you be sure the image data sent by the deserializer is valid? How about the data sent from the sensor to the deserializer? Can you verify it is valid?

    Is it possible to use IMX219 or OV5640 and your serdes for a proof of concept? We know both IMX219 and OV5640 are supported on AM62P.

    Regards,

    Jianzhong

  • Hello Jianzhong,

    I'm verifying the validity of the image data sent by the deserializer.

    In addition, the data rate of the deserializer MAX96712 is 2Gbps/lane.This is the data rate recommended by Maxim, since we need to transmit four channels of 3M image data.

    Is it appropriate to change the link-frequencies of cdns_csi2rx0 to 1000000000? 

    By the way, could you please help provide a way to open mipi deskew?

    Thanks,

    Cheng Nuo

  • Hello Jianzhong,

    Glad to update on the progress.

    I tried to connect only three cameras and found that I could capture correct image data from three cameras by yavta.

    So I think the problem is that the data rate of cdns_csi2rx0 is configured incorrectly.

    Could you please help confirm how to configure 2Gbps/lane or the appropriate rate?

    Our image format is 1920x1536@30fps yuv422-8bit.

    Thanks,

    Cheng Nuo

  • Hello Cheng Nuo,

    Is it appropriate to change the link-frequencies of cdns_csi2rx0 to 1000000000? 

    I don't think you need to set the link frequency this high. The formula is: link_freq = bits_per_sample * pixel_rate / 2 / nr_of_lanes.

    For your use case, link-freq = 16x1920x1536x30 / 2 / 4 ~= 177MHz, if you're using 4 lanes.

    What's the link frequency you're currently using?

    I tried to connect only three cameras and found that I could capture correct image data from three cameras by yavta.

    Are you sure it is a link frequency issue? If you connect all cameras, can you capture by just one camera for each of the 4 cameras?

    Regards,

    Jianzhong

  • Hello Jianzhong

    What's the link frequency you're currently using

    I am currently trying to use the following two link frequencies, but the results seem to be the same, so I don't know if my changes will work.

    • link-frequencies = /bits/ 64 <800000000>;
    • link-frequencies = /bits/ 64 <1000000000>;
    For your use case, link-freq = 16x1920x1536x30 / 2 / 4 ~= 177MHz, if you're using 4 lanes.

    Yes, I'm using 4lanes. But it should be noted that the image data of the four cameras is transmitted at the same time, so the result needs to be multiplied by 4.

    If you connect all cameras, can you capture by just one camera for each of the 4 cameras?

    If I connect four cameras, the images I capture are all abnormal, like the one posted a few days ago.

    So I'd like to try changing the link frequency to test it.

    Could you please help confirm the method of modifying the link frequency and opening mipi deskew?

    Thanks,

    Cheng Nuo

  • Yes, I'm using 4lanes. But it should be noted that the image data of the four cameras is transmitted at the same time, so the result needs to be multiplied by 4.

    Thanks for correcting that. You're right. It should be  link-freq = 16x1920x1536x30x4 / 2 / 4 ~= 708MHz. So 800MHz should be fine.

    In TI's SDK, the link frequency is specified in this dts: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62a7-sk-fusion.dtso?h=ti-linux-6.6.y

    The CSI skew calibration is done here: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/ds90ub960.c?h=ti-linux-6.6.y#n1757

    You can add some debug print in this function to verify the configured link frequency: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/platform/cadence/cdns-csi2rx.c?h=ti-linux-6.6.y#n193.

    Regards,

    Jianzhong