Jetson Orin CSI-2 Function Access

I am in the process of setting up a system for video data transfer from a camera module to the Jetson Orin. I’m using GMSL2 because of its long possible cable lengths (Up to 15m).

Here’s the configuration:
IMX390 or AR0820 Image Sensor → MAX9295A Serializer → MAX92712 Deserializer (Could use 9296A) → Jetson Orin

I was able to record all of the I2C configuration data for configuring the camera and serdes. I have the data sheets for each of those components as well, so I have annotated every message. I don’t need those drivers.

I cannot successfully link in the required drivers for the CSI-2 bus on the Jetson Orin. I have the kernel source, I can see the function necessary to configure the CSI-2 for operation, but I cannot configuration a program compilation that allows me to use these functions.

From the kernel source, the driver source code is in the below file:

The corresponding header for this file is here:

and here:

Below is an example of the functions I am referring to:

How can I link these functions into my program to create this video streaming system?

Thanks In Advance

hello michael.honey,

here’s developer guide for your reference, Jetson Virtual Channel with GMSL Camera Framework.
you should check the DT to complete the hardware connectivity, and you must add the same vc-id property value to the respective CSI and VI channel nodes; also, set the vc-id property in the gmsl-link node for each sensor to match the vc_id property in the sensor mode device node.

BTW, Orin is using CSI-5 driver, which is under… kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c

hello JerryChang,

Thank you. That looks like most of the information I need once I get started. I’m having a fundamental issue starting off though. In order to interact with the CSI bus, I need to be able to somehow link these libraries and then include their associated headers. How can I do that so that I can call these functions from within my own program?

For context, I come from real-time operating system development, and I’m new to interfacing with Linux. How does one call these CSI functions and use these CSI structs from within a program?

Thank You

hello michael.honey,

had you confirmed the camera functionality?
you may see-also camera software architecture for the overview, there’re Approaches for Validating and Testing the V4L2 Driver, you may use the standard v4l2 IOCTL to verify basic functionality.

as for the driver developments,
there’re different VI/CSI drivers, for example, csi-2 used by Nano series, csi-4 used by TX2 series, and it’s csi-5 for Xavier/Orin series, you may check the camera reference drivers and also the Tegra controls for a deep dive.
you should also check Kernel Customization session to rebuild the kernel image (i.e. /boot/Image), and update the kernel image to develop your camera use-case.
here’s a training video, V4L2 Sensor Driver Development Tutorial to show the steps of camera driver development,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.