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.

SK-TDA4VM: CSI2RX Issue

Part Number: SK-TDA4VM


Hi

I try to integrate imx390 sensor by mipi csi2 (On the our board)

  - I am using EDGE AI SDK(linux-08_02_00_04, rtos-08_02_00_06)

I am developing camera driver in linux kernel

  - The sensor output is raw12 

  - Ser(max9295) and Deser(max96712) are working ( I checked the waveform)

  - The hardware was checked in vision apps

My issue is the capture node  can not get any stream with csi2 rx

 : got stuck in waiting for frame without error reporting

Could you some guide for debugging ?

Log

media-ctl -p 

************************************************************************

Media controller API version 5.10.100

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

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
                <- "cdns_csi2rx.4504000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
                -> "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, 0 route)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
        pad0: Sink
                <- "max96712 3-0029":4 [ENABLED,IMMUTABLE]
        pad1: Source
                -> "4500000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
        pad3: Source
        pad4: Source

- entity 25: max96712 3-0029 (5 pads, 2 links, 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:SRGGB12_1X12/1936x1100 field:none]
                <- "max9295 3-0058":1 [ENABLED,IMMUTABLE]
        pad1: Sink
        pad2: Sink
        pad3: Sink
        pad4: Source
                [stream:0 fmt:SRGGB12_1X12/1936x1100 field:none]
                -> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 33: max9295 3-0058 (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:SRGGB12_1X12/1936x1100 field:none]
                <- "imx390 4-0021":0 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:SRGGB12_1X12/1936x1100 field:none]
                -> "max96712 3-0029":0 [ENABLED,IMMUTABLE]

- entity 38: imx390 4-0021 (1 pad, 1 link, 2 routes)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
        routes:
                0/0 -> 0/0 [ACTIVE, IMMUTABLE, SOURCE]
                0/0 -> 0/1 [INACTIVE, IMMUTABLE, SOURCE]
        pad0: Source
                [stream:0 fmt:SRGGB12_1X12/1936x1100@1/30 field:none colorspace:smpte170m]
                -> "max9295 3-0058":0 [ENABLED,IMMUTABLE]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- entity 134: 4500000.ticsi2rx context 15 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video17
        pad0: Sink
                <- "4500000.ticsi2rx":16 [ENABLED,IMMUTABLE]
// End Message 
v4l2-ctl -d /dev/video2 -v 'width=1936,height=1100,pixelformat=RG12' --stream-mmap --verbose
**************************************************************************************************************************

VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Widt[ 1449.158115] max9295 3-0058: max9295_s_stream: stream setup (enable, 1)
h/Height : 1936/1100
Pixel Format : 'RG12' (12-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 3872
Size Image : 4259200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)

  • Hi,

    Could you please try the below command and let me know if you are facing this issue?

    v4l2-ctl -d2 --set-fmt-video=width=1936,height=1100,pixelformat=RG12  --stream-mmap --verbose

    Have you tried the yavta application too inorder to stream? 
    You could try the below command to run yavta application to stream the camera.

    yavta -c1000 -f SRGGB12 -s 1936x1100 /dev/video2


    Could you try the above 2 commands and provide me the results?

    Regards,
    Nikhil

  • I got the same result from below command

    v4l2-ctl -d2 --set-fmt-video=width=1936,height=1100,pixelformat=RG12  --stream-mmap --verbose

    ****************************************************************************************************************

    VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    VIDIOC_S_FMT: ok
    Format Video Capture:
    Width/Height : 1936/1100
    Pixel Format : 'RG12' (12-bit Bayer RGRG/GBGB)
    Field : None
    Bytes per Line : 3872
    Size Image : 4259200
    Colorspace : sRGB
    Transfer Function : Default (maps to sRGB)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization : Default (maps to Full Range)
    Flags :
    VIDIOC_REQBUFS returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_STREAMON returned 0 (Success)

    ****************************************************************************************************************

    yavta -c1000 -f SRGGB12 -s 1936x1100 /dev/video2

    ****************************************************************************************************************

    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:4500000.ticsi2rx' is a video output (without mplanes) device.
    Video format set: SRGGB12 (32314752) 1936x1100 (stride 3872) field none buffer size 4259200
    Video format: SRGGB12 (32314752) 1936x1100 (stride 3872) field none buffer size 4259200
    8 buffers requested.
    length: 4259200 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xffff950e0000.
    length: 4259200 offset: 4259840 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffff94cd0000.
    length: 4259200 offset: 8519680 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff948c0000.
    length: 4259200 offset: 12779520 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffff944b0000.
    length: 4259200 offset: 17039360 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffff940a0000.
    length: 4259200 offset: 21299200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffff93c90000.
    length: 4259200 offset: 25559040 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffff93880000.
    length: 4259200 offset: 29818880 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffff93470000.

    ****************************************************************************************************************

  • I solved the issue with clock polarity