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:
Linux_for_Tegra/source/src_out/kernel_src_build/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi.c
The corresponding header for this file is here:
/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/nvidia/include/media/csi.h
and here:
Linux_for_Tegra/source/src_out/kernel_src_build/kernel/nvidia/include/media/csi.
Below is an example of the functions I am referring to:
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
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?
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.
besides,
here’s a training video, V4L2 Sensor Driver Development Tutorial to show the steps of camera driver development,
thanks