No video0 in /dev

Hi,

I am very new to Jetson systems, so please excuse my inexperience. I am currently trying to make a custom driver for a camera for Xavier NX dev kit platform with Jetson linux 32.6.1 . Steps followed.

  • After downloading the sources, with the reference of imx219 dts files, In Linux_for_Tegra/sources/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/ folder, I added my custom_camera.dtsi – Since I am dealing with only one camera, I did not include vi_port1 and csi_chan1 nodes.
  • In the same directory Added custom_camera_jakku.dtsi including the above file. – something similar to tegra194-camera-jakku-rbpcv2-imx219.dtsi
  • Included the above file in tegra194-p3509-0000-a00.dtsi
  • Added my driver custom_camera.c in Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/ and modified Kconfig and Makefile in the same folder accordingly. – The driver doesn’t really do anything as I have bypassed the all functionality.
  • Set the CONFIG_VIDEO_CUSTOM_CAMERA=m in Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig

After the above steps, I built it and flashed it to the board, and was able to see module getting loaded and video0 showing up in /dev. But, when i tried to see the formats of the camera with v4l2 --list-formats it listed all the formats that imx219 has but not of custom camera’s.

So, I commented out the imx219 and imx477 dtsi includes in tegra194-p3509-0000-a00.dtsi and flashed. Now there is no video0.

After that, I tried adding another camera-plugin-manager.dtsi with status = “okay” for all vi , nvcsi and camera nodes and subnodes. But it did not do anything.

Please provide some insight in to this. Is there any step i am missing. Also, the camera that i am working on is yuv422 format one.

Thank you.

Hello @shivaprasad.g,

Based on our experience building custom camera drivers for Jetson for our clients, the best is to divide and conquer the process of bringing up a custom camera device.

These are the steps we would recommend you follow:

  1. Ensure your driver is being load.

This is where we believe you might be right now.
You were able to see video0 on /dev when you hand the imx219 and imx477 device trees uncommented because probably the system was loading those drivers instead of yours.
Therefore, commenting them was a good decision and a common approach we follow.

Now you need to focus on making sure your driver is loading.
In order to achieve this, you can use dmesg | grep <custom_camera> to see if your driver is at least printing some log messages there.
If your driver log messages show, then your driver is loading and you need to check for a different possible issue, however, if the driver does not show on dmesg you need to focus on trying to get your driver to probe, which would mean a possible misconfiguration on the device tree or a mismatch between the DTB and driver compatible.

  1. Ensure your driver registers the v4l video device

This is where the driver creates videoX in /dev.
And this happens right after the driver finishes the probe function successfully.
If this is not happening, a good debug approach would be to look for debug messages from your driver in dmesg and try to find any reason why the probe function might not be succeeding.

  1. Ensure your driver routes video successfully

This is where you test video capture.
On the NVIDIA Jetson platform, depending of your type of sensor, it is not enough with just registering the v4l2 video device, you need to configure the argus camera capture subsystem.

A good approach here is first try to capture with v4l2-ctl and if that works, then you verify that you can capture with nvarguscamerasrc using GStreamer.

Please don’t hesitate to reach out if you want to get your driver working, we would love to help.

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Checking the L4T document for driver and device tree for add new sensor driver on Jetson.

Thanks

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