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-AM62A-LP: Camera OV05B Sensor Driver Support

Part Number: SK-AM62A-LP

Hi:
   I'm developing OV05B CMOS Sensor on SK-AM62A-LP platform by using FLEX-22pin CSI connector.
Develop SDK: ti-processor-sdk-linux-am62axx-evm-08.06.00.45-Linux-x86-Install.bin
SDCARD IMG: tisdk-edgeai-image-am62axx-evm.wic.xz
CMOS Sensor stream output resolution:2592x1944 RAW10 30fps mipi 4lanes MipiSpeed 800Mbps per lane.
Currently , I could readout sensor chip id through IIC bus.
And i configure format.code = MEDIA_BUS_FMT_SBGGR10_1X10 temporary.
But i can't capture raw data by using command "yavta -s 2592x1944 -f SBGGR10 /dev/video2 -c5 -Fframe-#.bin".

My log shows:
root@am62axx-evm:/opt/edgeai-gst-apps# yavta -s 2592x1944 -f SBGGR10 /dev/video2 -c5 -Fframe-#.bin
Device /dev/video2 opened.
Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' is a video output (without mplanes) device.
Video format set: SBGGR10 (30314742) 2592x1944 (stride 5184) field none buffer size 10077696
Video format: SBGGR10 (30314742) 2592x1944 (stride 5184) field none buffer size 10077696
[  135.985917] j721e-csi2rx 30102000.ticsi2rx: Ignore format 0x30314742 df 0x2b vc 0
8 buffers requested.
length: 10077696 offset: 0 timestamp type/[  135.994605] cdns-csi2rx 30101000.csi-bridge:  csi2rx_configure_external_dphy ret 0
source: mono/EoF
Buffer 0/0 mapped at address 0xffff8430e000.
[  136.007499] ox05b 4-0036: ox05b_set_stream: enable 1
length: 10077696 offset: 10080256 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0xffff83971000.
length: 10077696 offset: 20160512 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0xffff82fd4000.
length: 10077696 offset: 30240768 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0xffff82637000.
length: 10077696 offset: 40321024 timestamp type/source: mono/EoF
Buffer 4/0 mapped at address 0xffff81c9a000.
length: 10077696 offset: 50401280 timestamp type/source: mono/EoF
Buffer 5/0 mapped at address 0xffff812fd000.
length: 10077696 offset: 60481536 timestamp type/source: mono/EoF
Buffer 6/0 mapped at address 0xffff80960000.
length: 10077696 offset: 70561792 timestamp type/source: mono/EoF
Buffer 7/0 mapped at address 0xffff7ffc3000.

I confirmed Sensor has stream on already , because i measured CSI-RX mipi signal by oscilloscope.
Could you help me to debug how to capture raw data by using yavta ?
Did my develop SDK support format.code MEDIA_BUS_FMT_SBGGI10_1X10 ?

Thanks

  • Hello,

    Did the yavta command hang after "Buffer 7/0 mapped at address 0xffff7ffc3000."? Would you mind sharing the output of "v4l2-ctl --list-devices" and "media-ctl -p"?

    Regards,

    Jianzhong

  • :

    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:wave5-dec):
        /dev/video0

    wave5-enc (platform:wave5-enc):
        /dev/video1

    media-ctl -p :

    Media controller API version 5.10.168

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

    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, 0 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Sink
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none]
    <- "ox05b 4-0036":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none]
    pad3: Source
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none]
    pad4: Source
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none]

    - entity 15: ox05b 4-0036 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:SBGGR10_1X10/2592x1944 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
    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, 0 route)
    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, 0 route)
    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, 0 route)
    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, 0 route)
    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, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video7
    pad0: Sink
    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

  • Jianzhong: Did the yavta command hang after "Buffer 7/0 mapped at address 0xffff7ffc3000."? ==> I think yavta didn't hang ,because i can cancel this command by "ctrl + c " and sensor will be stream off .

  • Ok, but nothing was printed on the console after "Buffer 7/0 mapped at address 0xffff7ffc3000.", right?

    A properly executed yavta capture would have messages like below:

    root@am62axx-evm:/opt/edgeai-gst-apps# yavta -s 1936x1100 -f SRGGB12 /dev/video2 -c5 -Fframe-#.bin
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.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 0xffffa49ea000.
    length: 4259200 offset: 4259840 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffffa45da000.
    length: 4259200 offset: 8519680 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffffa41ca000.
    length: 4259200 offset: 12779520 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffffa3dba000.
    length: 4259200 offset: 17039360 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffffa39aa000.
    length: 4259200 offset: 21299200 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffffa359a000.
    length: 4259200 offset: 25559040 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xffffa318a000.
    length: 4259200 offset: 29818880 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xffffa2d7a000.
    0 (0) [-] any 0 4259200 B 82.156460 82.156483 16.607 fps ts mono/EoF
    1 (1) [-] any 1 4259200 B 82.189759 82.207559 30.031 fps ts mono/EoF
    2 (2) [-] any 2 4259200 B 82.223061 82.258478 30.028 fps ts mono/EoF
    3 (3) [-] any 3 4259200 B 82.256357 82.309374 30.034 fps ts mono/EoF
    4 (4) [-] any 4 4259200 B 82.289658 82.360123 30.029 fps ts mono/EoF
    [   83.617878] ti-udma 4e230000.dma-controller: chan0 teardown timeout!
    Captured 5 frames in 0.263878 seconds (18.948118 fps, 80703822.523139 B/s).
    8 buffers released.
    root@am62axx-evm:/opt/edgeai-gst-apps# ls *.bin
    frame-000000.bin  frame-000001.bin  frame-000002.bin  frame-000003.bin  frame-000004.bin

  • Yes, I don't get any console output after "Buffer 7/0 mapped at address 0xffff7ffc3000."

    It seems waiting and there are no any timeout notify also .

  • Hi Qingcai,

    Your "v4l2-ctl --list-devices" and "media-ctl -p" output look good. 

    Did my develop SDK support format.code MEDIA_BUS_FMT_SBGGI10_1X10 ?

    No, SDK 8.6 doesn't have this support in Cadence CSIRX driver. Please take a look at here: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/platform/cadence/cdns-csi2rx.c?h=ti-linux-5.10.y#n107.

    So you'll need to add this format to the SDK.

    In addition, since you're using the 22-pin Flex CSI connector on SK-AM62A-LP, please use the IMX219 device tree overlay as a reference: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62a7-sk-csi2-imx219.dts?h=ti-linux-5.10.y.

    Regards,

    Jianzhong

  • Jianzhong:
          I had found the reason . It a hardware issue on my device side .
    Thanks for your support .

  • Hi Qingcai,

    Glad to know you've solved the problem. I'll close this thread.

    Regards,

    Jianzhong