[Jetpack-6.2] /dev/videox not created

Hi Camera Experts,

I am now porting a camera driver (without I2C) to the Jetpack-6.2. So far, the camera module get loaded by the kernel (checked with lsmod)

However, there’s no /dev/videoX populated in the rootfs. Could you help to debug the issue, please ?

The driver and device-tree are in attachment.
nv_toto.c.txt (12.7 KB)
tegra234-orin-nano-CUSTOM-CAMERA.dts.txt (9.2 KB)

Thanks and best regards,
Khang

Any message for the module probe?

Hi @ShaneCCC,

It is weird that there’s no message for the module probe at all (I was expecting the entering and exiting messages of the probe function however).

Also, I tried removing the devname as described in the step #2 of this comment: R36.3: "No cameras available" when using GStreamer with nvarguscamerasrc - #8 by ting.chang but without success.

Make sure your device tree is applied.

Check the toto_a@10 is showing at “/proc/device-tree/bus@0/i2c@c250000”

sudo ls -al /proc/device-tree/bus@0/i2c@c250000

Yes, is is showing :

sudo ls -al /proc/device-tree/bus@0/i2c@c250000
[sudo] password for nvidia: 
total 0
-r--r--r--   1 root root  4 Nov 21 21:24 '#address-cells'
-r--r--r--   1 root root  4 Nov 21 21:24 '#size-cells'
drwxr-xr-x   5 root root  0 Nov 21 21:23  .
drwxr-xr-x 122 root root  0 Nov 21 21:23  ..
-r--r--r--   1 root root  8 Nov 21 21:24  assigned-clock-parents
-r--r--r--   1 root root  8 Nov 21 21:24  assigned-clocks
-r--r--r--   1 root root  4 Nov 21 21:24  clock-frequency
-r--r--r--   1 root root 15 Nov 21 21:24  clock-names
-r--r--r--   1 root root 16 Nov 21 21:24  clocks
-r--r--r--   1 root root 20 Nov 21 21:24  compatible
-r--r--r--   1 root root  0 Nov 21 21:24  dma-coherent
-r--r--r--   1 root root  6 Nov 21 21:24  dma-names
-r--r--r--   1 root root 16 Nov 21 21:24  dmas
drwxr-xr-x   4 root root  0 Nov 21 21:24  toto_a@10
drwxr-xr-x   4 root root  0 Nov 21 21:24  gpio@27
-r--r--r--   1 root root 12 Nov 21 21:24  interrupts
-r--r--r--   1 root root  8 Nov 21 21:24  iommus
-r--r--r--   1 root root  4 Nov 21 21:24  name
-r--r--r--   1 root root  4 Nov 21 21:24  nvidia,hw-instance-id
-r--r--r--   1 root root  4 Nov 21 21:24  phandle
drwxr-xr-x   7 root root  0 Nov 21 21:24  prod-settings
-r--r--r--   1 root root 16 Nov 21 21:24  reg
-r--r--r--   1 root root  4 Nov 21 21:24  reset-names
-r--r--r--   1 root root  8 Nov 21 21:24  resets
-r--r--r--   1 root root  5 Nov 21 21:24  status

Hi @ShaneCCC,

Must I create an overlay to register my camera? as suggested in the section 4.2. Device Registration of the Linux Release Note ?

A similar case : Sony EV9500M MIPI camera on JP6(36.3) - #13 by jb035.cheng

Currently, I add the camera configuration directly into the custom board’s device-tree.

Hi @ShaneCCC

I attached the dmesg log just in case.

dmesg.txt (58.7 KB)

Have you try insmode toto.ko?

Hi @ShaneCCC,

I tried to rmmod then insmod, the .ko module disappears and re-appears accordingly (via lsmod), but there’s no probing message (info or error) show in the dmesg log.

Could you try pr_info() instead of dev_info()

1 Like

There is not probing ìnfo massage with pr_info either, even-though the module is loaded.

Could you using nv_imx219 to remove the i2c REG access code to verify it.

Thanks

So far, I copied all imx219 relevant files to toto like below :

nvidia-oot/include/uapi/media/toto.h
nvidia-oot/include/media/toto.h
nvidia-oot/drivers/media/i2c/toto_mode_tbls.h
nvidia-oot/drivers/media/i2c/nv_toto.c

Then removed the access to I2C registers in the source (#if 0 … # endif ) :
nv_toto.c.txt (19.6 KB)

The .ko was also loaded but there’s no probing message again.

Hi @ShaneCCC,

I found something but with older Jetpack-6DP : Camera V4L2 sensor driver migration to Jetpack 6.0 developer preview - #12 by ShaneCCC

It looks like I should try the overlay way next week, as mentioned in early comment.

Also, my problem seems similar to this : Jetpack 6.0 - issues with soc csi2 camera - #10 by 305248199

You may need to dump the device tree to check.

sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

Hi @ShaneCCC,

Here it is :
extracted_proc.dts.txt (317.7 KB)

And the overlay-file :
tegra234-p3767-camera-p3768_NV_TOTO-cam0-4lane-overlay.dts.txt (6.9 KB)

Additional info :

nvidia@ORNN:~$ sudo cat /sys/kernel/debug/v4l2-async/pending_async_subdevices
tegra-camrtc-capture-vi tegra-captu:
 [fwnode] dev=7-0010, node=/bus@0/i2c@c250000/toto_a@10

The .compatible should be “nvidia, toto”

static const struct of_device_id toto_of_match[] = {
	{ .compatible = "sony,toto", },
	{ },

Sorry that the nv_toto.c was a little bit outdate for that. The recent version is aligned with the device-tree overlay :

static const struct of_device_id toto_of_match[] = {
	{ .compatible = "nvidia,toto", },
	{ },
};

Best Regards,
K.