Generic Linux camera driver development

Is it possible to develop a Linux driver for a CSI-2 / I2C camera, where the driver works on Nvidia Xavier, as well as other
non-Nvidia platforms?

If coded with the Tegra V4L2 extensions, that code will not work on non-Nvidia platforms. But if it just uses the standard
V4L2 interfaces (e.g. V4L2_CID_EXPOSURE instead of TEGRA_CAMERA_CID_EXPOSURE, and configures the driver via standard
v4l2_subdev_video_ops callbacks), and skips the Tegra extensions completely, will this driver operate on Xavier (using
an appropriate DTS to map CSI and I2C ports, etc)?

1 Like

hello jenrighte01zs,

according to Camera Architecture Stack, these sensor driver were implemented based-on [V4L MediaController Framework].

please access L4T Sources and check header files for the detail of CID controls,
for example,
$l4t-r32.2/public_sources/kernel/nvidia/include/media/tegra-v4l2-camera.h

you may refer to Sensor Software Driver Programming Guide about the [Control Handlers] for properties descriptions.
thanks

Thank you for the references. Clarification: is there any requirement to use the sensor driver, or can drivers just be developed in “pure” V4L2, ignoring the Nvidia camera framework / sensor driver altogether?

1 Like

hello jenrighte01zs,

all we shared camera reference drivers in the L4T Sources were depends-on Nvidia camera framework.
as I mentioned in comment #2, you might check header files for the detail of camera controls, and please implement sensor drivers by your own.
thanks

This is a good question! I looked into some sourcecode of camera drivers, and it appears to be required to make an nvidia tailored driver for each sensor. This is a not an ideal situation, since every vendor is required to duplicate its sensor driver: One for linux, one for nvidia-linux.

The question is still open: would a V4L2 sensor driver work with the nvidia kernel?

If possible, I’m interested in an explanation about the “camera common” design. What does this offer over plain V4L2 API’s?

Hi windel.bouwman,

Please help to open a new topic for your issue. Thanks