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: While stream-mmap ,Broken pipe(1) occurs and camera name is not detected in edge AI custom window

Part Number: TDA4VM
Other Parts Discussed in Thread: ASH

Tool/software:

Hi Ti,

We are currently working with GMSL camera module which consist of ar0341 and nextchip ISP. Actually we are connecting camera module like

sensor->ISP->SER->GMSL->DESER[GMSL to FPC conveting nano board]->FPC->cam0 of TDA dev kit.

During this development, we are facing some issue.

  • When we try to run

            v4l2-ctl -d /dev/video-ar0341-cam0 --stream-mmap                   
            VIDIOC_STREAMON returned -1 (Broken pipe)

  • Also we cant able to check the format by list format command.
  • Camera name is not detected in Edge ai Custom window.

Could you support to resolve the issue which faces in this module.

Note: we are using edgeai linux 9.0.2.

  • Hi,

    There are a lot of unknows / custom drivers here.

    So have you ensured that the GMSL based ser-des drivers are validated and as per the requirements by the csirx?

    TI does not support GMSL based drivers out of the box. So please refer the ub960 Deserializer driver to check the conditions that needs to present to interface with csirx.

    If you have taken care of these, then are you detecting the nodes when you run "media-ctl -p" ?

    Regards,

    nikhil

  • Hi,

    Thank you for your response.

    In our side ser-des drivers are validated, we can write ISP data via GMSL as well as we can able to set/get controls. Node is detected in media-ctl -p. One more thing, we uses similar script of imx219 in setup_cameras.sh.

    root@tda4vm-sk:/opt/edgeai-gst-apps# media-ctl -p
    Media controller API version 6.1.80

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

    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:UYVY8_1X16/1920x1536 field:none]
    <- "cdns_csi2rx.4504000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:UYVY8_1X16/1920x1536 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:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    <- "ar0341 6-003c":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    -> "4500000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    pad3: Source
    pad4: Source

    - entity 25: ar0341 6-003c (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:unknown/1920x1536 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
    -> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 31: 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 37: 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 43: 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 49: 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 55: 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 61: 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 67: 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 73: 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 79: 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 85: 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 91: 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 97: 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 103: 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 109: 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 115: 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 121: 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]

  • Hi Kalai,

    Do you get a "camera detected" message upon boot after having added this sensor to the setup_cameras script? Please refer to this FAQ to help you debug: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1403223/faq-most-common-problems-encountered-when-developing-camera-applications-on-the-am6x

    Please let me know if you have any further questions.

    Thank you,

    Fabiana

  • Hi, I have debugged all the criteria which is provided in your shared link. But we are not getting the stream and it's now throwing " VIDIOC_STREAMON returned -1 (No such file or directory)".

    When we check the dmesg, cdns-csi2rx 4504000.csi-bridge: Failed to configure external DPHY: -2

    Do you get a "camera detected" message upon boot after having added this sensor to the setup_cameras script?

    Camera is not detected as soon as insmod .ko. we manually run ./init_script.sh to detect camera.

  • Hi Kalai,

    Could you go over the steps you took to enable this sensor? Please provide the output of dmesg | grep csi and dmesg | grep ar0341.

    Thank you,

    Fabiana

  • Hi Fabiana,

    Thank you for your response. Hereby I am including the details which you asked.

    root@tda4vm-sk:/opt/edgeai-gst-apps# ./init_script.sh
    ar0341 Camera 0 detected
        device = /dev/video-ar0341-cam0
        name = ar0341
        format = [fmt:UYVY8_1X16/1920x1536 field:none]
        subdev_id = /dev/v4l-ar0341-subdev0
        isp_required = yes
    root@tda4vm-sk:/opt/edgeai-gst-apps# dmesg | grep csi
    [    7.291572] cdns-csi2rx 4504000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
    [    7.410981] cdns-csi2rx 4514000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
    root@tda4vm-sk:/opt/edgeai-gst-apps# dmesg | grep ar0341
    [  116.424234] ar0341 6-003c: Dev_Name Readar0341_camera 6-003c
    [  116.429903] ar0341 6-003c: Firmware name Read > isp_fw.bin
    [  116.435486] ar0341 6-003c: ISP regdata firmware name Read > isp_regdata.bin
    [  116.442440] ar0341 6-003c: ISP BOOTDATA VERSION name Read > isp_version.bin
    [  116.452783] ar0341 6-003c: Device No of MIPI lane configuration is 4
    [  116.475591] ar0341 6-003c:  isp_fw 161708
    [  116.480337] ar0341 6-003c:  isp_regdata_fw 77720
    [  116.484955] ar0341 6-003c: hi ash regdata 0x2 0x0 0x0 0xff
    [  116.490435] ar0341 6-003c: hi ash fw 0x9c 0x77 0x0 0xd4
    [  116.495652] ar0341 6-003c: Firmware Successfully read by driver
    [  116.504264] ar0341 6-003c: Firmware version: 0x03200600
    [  116.509491] ar0341 6-003c: MIPI Clock = 0, MIPI Lanes = 4
    [  116.515007] ar0341 6-003c: supply avdd not found, using dummy regulator
    [  116.521746] ar0341 6-003c: supply dovdd not found, using dummy regulator
    [  116.528570] ar0341 6-003c: supply dvdd not found, using dummy regulator
    [  116.561651] ar0341 6-003c:  Issuing CHIP reset for Deserializer ...
    [  116.781645] ar0341 6-003c:  LDO REGULATOR VALUE CHANGING FROM 1.2V to 1V
    [  116.894492] ar0341 6-003c: SIOA Port I2C translated successfully
    [  116.933960] ar0341 6-003c: FW VERSION=0x320 ISP_VERSION=0x600
    [  116.939699] ar0341 6-003c: Previous FW version: 3200600 - Current version: 3200600
    [  117.025955] ar0341 6-003c: ******** CURRENT BOOTDATA VERSION ******** : 0.6.32.3
    [  117.033443] ar0341 6-003c: number of controls: 7
    [  117.038161] ar0341 6-003c: control value : 0,  98091b
    [  117.044768] ar0341 6-003c: Sharpness control value: 0
    [  117.241884] ar0341 6-003c: control value : 0,  980914
    [  117.248496] ar0341 6-003c: hflip control value: 0
    [  117.321856] ar0341 6-003c: control value : 0,  980915
    [  117.328469] ar0341 6-003c: Vflip control value: 0
    [  117.401850] ar0341 6-003c: control value : 140,  980902
    [  117.408638] ar0341 6-003c: Saturation control value: 140
    [  117.414029] ar0341 6-003c: HW ACCESS MODE
    [  117.453875] ar0341 6-003c: control value : 6,  980913
    [  117.460480] ar0341 6-003c: Gain control value: 6
    [  117.573873] ar0341 6-003c: control value : 0,  980900
    [  117.580479] ar0341 6-003c: Brightness control value: 0
    [  117.697868] ar0341 6-003c: control value : 0,  980918
    [  117.704479] ar0341 6-003c: Powerline frequency control value: 0
    [  117.797712] ar0341 6-003c: Consider updating driver ar0341 to match on endpoints
    [  117.811730] ar0341 6-003c: Detected AR0341 sensor
    [  117.829564] ar0341 7-0010: Unable to get Dev name
    [  117.837647] ar0341 7-0010: Unable to get mcu firmware name
    [  117.843928] ar0341 7-0010: Unable to get mcu firmware name
    [  117.854884] ar0341 7-0010: No SIO port mentioned in device tree
    [  117.865679] ar0341 7-0010: Error in ecam_specific_dt_parse
    [  117.871818] ar0341 7-0010:  ser_status=f1
    [  117.876861] ar0341 7-0010: Failed writing register ret = -121!
    [  117.883511] ar0341 7-0010: serdes_write_16b_reg:write reg error: reg = 0x6,val = 0xf1
    [  117.898365] ar0341 7-0010: ar0341_probe(1249): Failed
    root@tda4vm-sk:/opt/edgeai-gst-apps#

    I am not connecting ar0341 7-0010 camera. I am currently working on 6-003c.

    Also I am including dmesg after v4l2 stream-mmap command.

    root@tda4vm-sk:/opt/edgeai-gst-apps# v4l2-ctl --stream-mmap -d /dev/video-ar0341-cam0
            VIDIOC_STREAMON returned -1 (No such file or directory)
    root@tda4vm-sk:/opt/edgeai-gst-apps# dmesg | grep csi
    [    7.291572] cdns-csi2rx 4504000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
    [    7.410981] cdns-csi2rx 4514000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
    [  517.377772] cdns-csi2rx 4504000.csi-bridge: link_freq -2
    [  517.383084] cdns-csi2rx 4504000.csi-bridge: Failed to configure external DPHY: -2
    root@tda4vm-sk:/opt/edgeai-gst-apps#

    Thank you.

  • Hi,

    How many sensors are connected? Do you see the same issue when multiple sensors are connected? Could you share how you are configuring the sensor?

    Thank you,

    Fabiana

  • Hi Fabiana,

    Currently we are connecting one sensor alone.

    We are facing issue to link frequency in cadence.

    What could be the root cause of this issue?

    Thank you,

    Kalai.

  • Hi Kalai,

    Could you please go over all of the steps you took to enable this sensor? Could you share how you are configuring the sensor?

    Thank you,

    Fabiana