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.

TDA4VM: Cannot retrieve images from CSIRX.

Part Number: TDA4VM

Tool/software:

Hi

We use sdk 10,Custom board。

The current hardware link is as follows(no sensor).

The dts is :

&main_i2c1 {  

    regulator@2a {
		compatible = "maxim,max20087";
		reg = <0x2A>;
		in-supply = <&evm_12v0>;
		vdd-supply = <&vsys_3v3>;

		enable-gpios = <&main_gpio0 83 GPIO_ACTIVE_HIGH>;

		regulators {
			OUT1 {
				regulator-name = "VOUT1";
				regulator-always-on;
				regulator-boot-on;
			};
			OUT2 {
				regulator-name = "VOUT2";
				regulator-always-on;
				regulator-boot-on;
			};
			OUT3 {
				regulator-name = "VOUT3";
				regulator-always-on;
				regulator-boot-on;
			};
			OUT4 {
				regulator-name = "VOUT4";
				regulator-always-on;
				regulator-boot-on;
			};
		};
	};

    // MAX96724 Deserializer  
    max96724: gmsl-deserializer@27 {   
        status = "okay";  
        compatible = "maxim,max96724";  
        reg = <0x27>;  
        #address-cells = <1>;  
        #size-cells = <0>;  
        enable-gpios = <&main_gpio0 32 GPIO_ACTIVE_HIGH>;  

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

            // Output port connected to CSI2RX  
            port@0 {  
                reg = <0>;  
                status = "okay";  
                max96724_channelB_out: endpoint {  
                    remote-endpoint = <&csi2rx0_in_sensor>;  
                    bus-type = <4>;     // CSI2 D-PHY  
                    clock-lanes = <0>;  
                    data-lanes = <1 2 3 4>;
                };  
            };  
        };  
        
    }; 
};  

/* CSI Receiver Configuration */  
&cdns_csi2rx0 {  
    status = "okay";
    virtual-channel;
    ports {  
        #address-cells = <1>;  
        #size-cells = <0>;  

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

            csi2rx0_in_sensor: endpoint {  
                remote-endpoint = <&max96724_channelB_out>;  
                bus-type = <4>; /* CSI2 DPHY */  
                clock-lanes = <0>;  
                data-lanes = <1 2 3 4>;  
                ti,vc-mask = <0x0F>;
            };  
        };  
    };  
}; 

&ti_csi2rx0 {
    status = "okay";
};

&dphy0 {
    status = "okay";
};

The max96717 creat RGB888 test data.

We had use the script to set route;

#!/bin/bash

# 配置CDNS CSI Bridge的4个VC路由
media-ctl -R '"cdns_csi2rx.4504000.csi-bridge" [0/0->1/0[1]]'

# 设置CDNS CSI Bridge各VC的格式(匹配传感器输出格式)
media-ctl -V '"cdns_csi2rx.4504000.csi-bridge":0/0 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"cdns_csi2rx.4504000.csi-bridge":0/1 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"cdns_csi2rx.4504000.csi-bridge":0/2 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"cdns_csi2rx.4504000.csi-bridge":0/3 [fmt:RGB888_1X24/1280x720 field:none]'

# 配置CSI2RX的路由映射(将4个VC映射到不同context)
media-ctl -R '"4500000.ticsi2rx" [0/0->1/0[1]]'

# 设置CSI2RX接收格式(需与CSI Bridge输出一致)
media-ctl -V '"4500000.ticsi2rx":0/0 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"4500000.ticsi2rx":0/1 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"4500000.ticsi2rx":0/2 [fmt:RGB888_1X24/1280x720 field:none]'
#media-ctl -V '"4500000.ticsi2rx":0/3 [fmt:RGB888_1X24/1280x720 field:none]'

# 设置video节点格式(使用RGB24格式)
v4l2-ctl -z platform:4500000.ticsi2rx -d "4500000.ticsi2rx context 0" -v width=1280,height=720,pixelformat=XR24
#v4l2-ctl -z platform:4500000.ticsi2rx -d "4500000.ticsi2rx context 1" -v width=1280,height=720,pixelformat=XR24
#v4l2-ctl -z platform:4500000.ticsi2rx -d "4500000.ticsi2rx context 2" -v width=1280,height=720,pixelformat=XR24
#v4l2-ctl -z platform:4500000.ticsi2rx -d "4500000.ticsi2rx context 3" -v width=1280,height=720,pixelformat=XR24

The media-ctl -p is

root@j721e-evm:/mnt# media-ctl  -p
Media controller API version 6.6.32[  230.189328] _max96724_set_routing 4 streams routing  ret= 0


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

Device topology
- entity 1: 4500000.ticsi2rx (17 pads, 17 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:RGB888_1X24/1280x720 field:none]
                <- "cdns_csi2rx.4504000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:RGB888_1X24/1280x720 field:none]
                -> "4500000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
        pad2: Source
                -> "4500000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
        pad3: Source
                -> "4500000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
        pad4: Source
                -> "4500000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
        pad5: Source
                -> "4500000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
        pad6: Source
                -> "4500000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
        pad7: Source
                -> "4500000.ticsi2rx context 6":0 [ENABLED,IMMUTABLE]
        pad8: Source
                -> "4500000.ticsi2rx context 7":0 [ENABLED,IMMUTABLE]
        pad9: Source
                -> "4500000.ticsi2rx context 8":0 [ENABLED,IMMUTABLE]
        pad10: Source
                -> "4500000.ticsi2rx context 9":0 [ENABLED,IMMUTABLE]
        pad11: Source
                -> "4500000.ticsi2rx context 10":0 [ENABLED,IMMUTABLE]
        pad12: Source
                -> "4500000.ticsi2rx context 11":0 [ENABLED,IMMUTABLE]
        pad13: Source
                -> "4500000.ticsi2rx context 12":0 [ENABLED,IMMUTABLE]
        pad14: Source
                -> "4500000.ticsi2rx context 13":0 [ENABLED,IMMUTABLE]
        pad15: Source
                -> "4500000.ticsi2rx context 14":0 [ENABLED,IMMUTABLE]
        pad16: Source
                -> "4500000.ticsi2rx context 15":0 [ENABLED,IMMUTABLE]

- entity 19: cdns_csi2rx.4504000.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:RGB888_1X24/1280x720 field:none]
                <- "max96724 1-0027":0 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:RGB888_1X24/1280x720 field:none]
                -> "4500000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
        pad3: Source
        pad4: Source

- entity 25: max96724 1-0027 (1 pad, 1 link, 4 routes)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
        routes:
                0/0 -> 0/0 [ACTIVE]
                0/0 -> 0/1 [ACTIVE]
                0/0 -> 0/2 [ACTIVE]
                0/0 -> 0/3 [ACTIVE]
        pad0: Source
                [stream:0 fmt:RGB888_1X24/1280x720 field:none colorspace:srgb]
                [stream:1 fmt:RGB888_1X24/1280x720 field:none colorspace:srgb]
                [stream:2 fmt:RGB888_1X24/1280x720 field:none colorspace:srgb]
                [stream:3 fmt:RGB888_1X24/1280x720 field:none colorspace:srgb]
                -> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]

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

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

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

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

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

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

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

- entity 73: 4500000.ticsi2rx context 7 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video9
        pad0: Sink
                <- "4500000.ticsi2rx":8 [ENABLED,IMMUTABLE]

- entity 79: 4500000.ticsi2rx context 8 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video10
        pad0: Sink
                <- "4500000.ticsi2rx":9 [ENABLED,IMMUTABLE]

- entity 85: 4500000.ticsi2rx context 9 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
        pad0: Sink
                <- "4500000.ticsi2rx":10 [ENABLED,IMMUTABLE]

- entity 91: 4500000.ticsi2rx context 10 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video12
        pad0: Sink
                <- "4500000.ticsi2rx":11 [ENABLED,IMMUTABLE]

- entity 97: 4500000.ticsi2rx context 11 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video13
        pad0: Sink
                <- "4500000.ticsi2rx":12 [ENABLED,IMMUTABLE]

- entity 103: 4500000.ticsi2rx context 12 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video14
        pad0: Sink
                <- "4500000.ticsi2rx":13 [ENABLED,IMMUTABLE]

- entity 109: 4500000.ticsi2rx context 13 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video15
        pad0: Sink
                <- "4500000.ticsi2rx":14 [ENABLED,IMMUTABLE]

- entity 115: 4500000.ticsi2rx context 14 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video16
        pad0: Sink
                <- "4500000.ticsi2rx":15 [ENABLED,IMMUTABLE]

- entity 121: 4500000.ticsi2rx context 15 (1 pad, 1 link)
              type Node subtype V4L flags 0
              device node name /dev/video17
        pad0: Sink
                <- "4500000.ticsi2rx":16 [ENABLED,IMMUTABLE]

then we use 

root@j721e-evm:~# v4l2-ctl -d /dev/video2 --set-fmt-video=width=1280,height=720,pixelformat=XR24 --stream-mmap --stream-count=10 --stream-to=frame.raw
to get the data,but can not get anything.
It will keep getting stuck.
 
We had use GMSL_SerDes_Public_GUI (the gui app of maxim ) to creat test RGB888 data ,and Confirm that the MAX96724 has received the data.
Do you have any suggestions?
BR
liupt
  • Hi liupt,

    I suggest connecting a sensor to confirm that everything has been configured properly. After doing so, try running v4l2-ctl -d /dev/video3 --set-fmt-video=width=1280,height=720,pixelformat=XR24 --stream-mmap --stream-count=10 --stream-to=frame.raw.

    Thank you,

    Fabiana

  • Hi Fabiana

    We do not hav any sensor.Joy

    Does Linux support RGB888?

    Is there any issue with the media-ctl -p pipeline?

    BR

    liupt

  • Hi 

    according to [FAQ] TDA4VM: Steps for executing linux CSI on SDK - Processors forum - Processors - TI E2E support forums

    I had Disable the macros ENABLE_CSI2RX & ENABLE_CSI2TX in the file ${PSDKRA}/vision_apps/platform/j721e/rtos/common/app_cfg_mcu2_0.h

    After disabling and replacing the core image of mcu2_0, using devmem2 0x04504048 to read the memory address in Linux causes a panic.

    root@j721e-evm:~# devmem2 0x04504048 w
    /dev/mem opened.
    [   39.585083] SError Interrupt on CPU1, code 0x00000000bf000000 -- SError
    [   39.585095] CPU: 1 PID: 933 Comm: devmem2 Tainted: G           O       6.6.32 #2
    [   39.585100] Hardware name: Texas Instruments J721e EVM (DT)
    [   39.585102] pstate: 60000000 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   39.585106] pc : 0000ffff95165498
    [   39.585108] lr : 0000ffff951676a0
    [   39.585109] sp : 0000ffffdbc15e90
    [   39.585110] x29: 0000ffffdbc15e90 x28: 0000ffffdbc16060 x27: 0000000000000000
    [   39.585116] x26: 0000000000420000 x25: 0000ffff95191048 x24: 0000ffffdbc16258
    [   39.585121] x23: 0000000000000003 x22: 00000000004007a0 x21: 0000ffff95198350
    [   39.585126] x20: 0000000000420018 x19: 0000000000000048 x18: 0000000000000003
    [   39.585130] x17: 0000ffff95167658 x16: 000000000041fff8 x15: 0000ffff9518dcd0
    [   39.585134] x14: 0000000000000001 x13: 0000ffffdbc15fb0 x12: 00000000ffffffc8
    [   39.585138] x11: 00000000ffffff80 x10: 000000000000000a x9 : 0000000000000000
    [   39.585142] x8 : 0000000000000040 x7 : 3030303139313539 x6 : 0000000000400358
    [   39.585147] x5 : 0000000000000000 x4 : 0000000500000402 x3 : 0000000000000000
    [   39.585151] x2 : 00000000004003d0 x1 : 000000000000000a x0 : 0000000000400580
    [   39.585157] Kernel panic - not syncing: Asynchronous SError Interrupt
    [   39.585159] CPU: 1 PID: 933 Comm: devmem2 Tainted: G           O       6.6.32 #2
    [   39.585162] Hardware name: Texas Instruments J721e EVM (DT)
    [   39.585164] Call trace:
    [   39.585166]  dump_backtrace+0x90/0xe8
    [   39.585182]  show_stack+0x18/0x24
    [   39.585187]  dump_stack_lvl+0x48/0x60
    [   39.585195]  dump_stack+0x18/0x24
    [   39.585198]  panic+0x324/0x380
    [   39.585204]  nmi_panic+0x8c/0x90
    [   39.585207]  arm64_serror_panic+0x6c/0x78
    [   39.585212]  do_serror+0x3c/0x70
    [   39.585216]  __el0_error_handler_common+0x40/0xa4
    [   39.585222]  el0t_64_error_handler+0x10/0x1c
    [   39.585226]  el0t_64_error+0x190/0x194
    [   39.585230] SMP: stopping secondary CPUs
    [   39.585245] Kernel Offset: disabled
    [   39.585246] CPU features: 0x0,80000200,28020000,1000420b
    [   39.585249] Memory Limit: none
    [   39.771531] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

    BR

    liupt

  • Hi liupt,

    Yes, this format is supported, and the pipeline looks correct upon first glance.

    Thank you,

    Fabiana

  • Hi Febiana

    How to resolve panic issues caused by reading related registers?

    BR

    liupt

  • Hi, liupt

    Few opinions,

    (1) Base on your end application, do you want to use "vision_app w/ single CAM"  for CSI-RX camera image capture? it works on MCU2_0 w/ RTOS, main task runs on R5 core.

    (2) Base on your end application, do you want to use LINUX w/ gstreamer/V4L2 for CSI-RX camera image capture? it works on A72 w/ LINUX, main task runs on A72 core.

    (3) Base on item (1) and (2), pls make sure your application scenario, I think both of them should be have different Linux DTS sets setting. default SDK should be base on item 1.

    (4) I think MAX96724 can output color pattern, why don't you capture Des pattern first?

    (5) How about use vision_app for pre-testing?

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/10_01_00_04/exports/docs/vision_apps/docs/user_guide/group_apps_basic_demos_app_single_cam.html

     

    Ref.

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/10_01_00_04/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX.html?highlight=camera

    https://www.ti.com/lit/an/spracx9/spracx9.pdf?ts=1747120673426&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTDA4VM%253FkeyMatch%253Dtda4%2526tisearch%253Duniversal_search%2526usecase%253Dpartmatches

     

    Hello, Fabiana

    liupt is my customer,

    Because of my another customer already success use "item 2" for camera image capture w/ V4L2+GStreamer, and they do not use any R5 core (MCU_2_x) RTOS application, as far as I know, they base on TDA4-SK SDK for development. Does it have any different for CSI-RX DTS setting?

    Thank You.

    Gibbs

  • Hi GIbbs

    (2) Base on your end application, do you want to use LINUX w/ gstreamer/V4L2 for CSI-RX camera image capture? it works on A72 w/ LINUX, main task runs on A72 core.

    --------》YES,we want to use in linux

    BR

    liupt

  • Hi Liupt and Gibbs,

    Fabiana is currently out, so I will fill in for her.

    We do not hav any sensor.

    How is the pipeline being tested if there is no sensor to generate an input frame? 

    Or, is this some sort of output via CSI-TX and that is the reason why there is no sensor?

    Regards,

    Takuma

  • Hi 

    max96717 7 can generate test images.

    Now i want to konw how to resolve panic issues caused by reading related registers(when disable ENABLE_CSI2RX  in mcu2_0)?

    BR

    liupt

  • Hi Liupt,

    Ok, understood. So, the serializer itself has some pattern generator hardware to mimic data transmission from a sensor, and you are using this pattern generator to troubleshoot.

    If the register was readable when ENABLE_CSI2RX & ENABLE_CSI2TX were enabled in RTOS on the R5F core, and when disabled the register is not readable, then my suspicion is that the CSI hardware block is not turned on within Linux running on the A72 core. Bus errors like the one you are seeing in the kernel panic log could happen when memory access is attempted to a location that is not valid, which includes the hardware block that is being accessed on the SoC is turned off.

    To test this suspicion, could you try the 2 following troubleshooting steps:

    1. Compare the logs of "k3conf dump devices | grep -i csi" in the working case (where the ENABLE_CSI2RX macro is enabled and you can access that register) and non-working case (where the macro is disabled and the register access causes kernel panic).
    2. Share the logs from "dmesg". This is to check if there are logs that show initialization of the I2C interface, CSI interface, and serializer.

    Regards,

    Takuma