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.

AM67A: Multiple camera streams into a single CSI2rx endpoint via GMSL

Part Number: AM67A
Other Parts Discussed in Thread: AM67,

Per the title, I am attempting to ingest multiple camera streams into a single CSI2rx endpoint, using GMSL serdes (MAX96724 for deserializer).

In particular, I am looking for:

  • Information on how to configure my device tree to send multiple, simultaneous camera streams (with separate VCIDs) to the same CSI2rx node.
  • Information on the ports nodes for cdns_csi2rxN (e.g. why are there 5 of them, how is the proper one selected, should it match VCID)

Some technical notes:

  • GMSL drivers are in-house developed
    • They are not (currently) configureable media devices
    • i.e. they do not show up for configuration in media-ctl (like the FPDLink drivers). VC and packet mapping are configured statically in device tree.
  • Single camera streaming works successfully
    • Remote endpoint links directly between the sensor endpoint node and the csi2rx endpoint node
    • So far, I have only been able to receive frames when using virtual channel 0 and csi2rx port 0. Other pairings fail to fully enumerate, even when VC number and port number match (e.g. VC 1 and port 1). Would appreciate guidance on the use of the ports.
  • Hi Raymond,

    The multiple ports signify the hardware topology for the streams(1 input and 4 output) of CSI2 RX Core. Please have a look at section 12.6.1.4.1 of the TRM.

    The deserializer will connect to port 0 and the cameras would be child nodes of that in the DTS. The port in cdns_csi2rxN are independent of the VCID. The filtering of different data streams based on VCID + datatype combination happens at ti_csi2rx level.

    For an example configuration look at these dts files:
    1. Configure deserializer topology: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-j722s-evm-v3link-fusion.dtso?h=ti-linux-6.12.y
    2. Configure camera: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-v3link-imx219-0-0.dtso?h=ti-linux-6.12.y

    Together, these two files can be used as a reference. These use both CSI2RX instances and connect one UB960 deserializer to each one. The deserializer connects to a serializer which in turn connects to the camera(IMX 219) in this case.

    Regards,
    Jay

  • Using 2 ports is insufficient for my use case, as the deserializer I am using has only 2 direct 4-channel CSI links,  and I am attempting to pass 4 sensor streams.

    I have acchieved partial success at streaming 2 sensors to the different ports (enumeration, one-at-a-time streams) , though I am unable to get multiple simultaneous streams to work at the same time. Will open a separate thread to follow up with that, but as stated above, my current design requires multiple simultaneous streams thru a single RX (via virtual channels).

    I would appreciate details and pointers to documentation/examples of the "filtering of different data streams based on VCID + datatype combination" at the ti_csi2rx level.

  • Hi Raymond,

    I am not completely sure if I understand your hardware configuration. The deserializer has 2 CSITX instances and 4 sensors connected to it? Can you please clarify your bandwidth requirements?

    As for further clarification on the CSI ports, they are mapping to the actual physical lines in the hardware. For VCID filtering, ti_csi2rx driver which corresponds to the SHIM IP, separate from CSI2 RX Core(bottom left in the image in previous reply) is used. That will then queue the DMA transactions. For throughput, enabling the appropriate number of data lanes and using the correct data rate should be sufficient.

    For filtering using VCID, the driver uses the get_frame_desc from v4l2_pad_ops call to determine which VCID to use. So, returning the correct VCID that will eventually be sent to the SoC should be enough to get the filtering in place.

    Regards,
    Jay

  • Apologies for delayed reply. My configuration contains:

    • One MAX96724 GMSL deserializer
      • The deserializer's two CSI2TX instances are connected to CSI0 and CSI1
      • The deserializer is connected to 4 ISX031 cameras

    Since I need to ingest more camera streams than I have CSI2TX instances, I will need to receive multiple streams into a single CSI2RX instance on separate virtual channels.

    The deserializer driver I am using does not aggregate the multiple streams into a single v4l2 pad (unlike the FPDLink sample included in the BSP). Is it possible to perform this aggregation (i.e. receive input streams on different virtual channels from more than 1 pad) at the CSI2RX (core or shim) level?

  • Hi Raymond,

    The CSI2RX driver exposes only one input pad by default:

    I'll try to get back to you with a solution for this issue.

    Regards,
    Jay

  • Hi Raymond,

    The correct way to use this would be to use modify the deserializer driver to aggregate all the streams into a single v4l2 pad. A hacky solution could be adding a "dummy driver" that does that conversion. It would not correspond to any real hardware.

    Regards,
    Jay

  • Understood. As a related question: do you know if the AM67 Linux SDK supports generating custom r5f images to manage the CSIRX like the TDA4EN?

  • Hi Raymond,

    Are you referring to capture using R5F core? If yes, I will need a little time to confirm if that can be supported.

    Regards,
    Jay

  • Hi Raymond,

    Capturing using R5F is not supported on the AM67A.

    Regards,
    Jay