Multi Virtual Channel Implementation in a CSI port using Xavier NX

Hi everyone,
Can I configure imx219 driver for receiving 4 virtual channel(VC0,VC1,VC2,VC3) packet dynamically in Jetson Xavier NX. If Can what are the driver file I want to modify. My present driver can receive VC0 channel packet successfully but I want to receive all channel packet sequentially without packet discarding.
Does anyone can give some Idea to implement this. Thanks

Hi everyone,
In imx390 dtsi file of xavier NX devnode = “video” is not present, without adding devnode in dtsi file how I can read data using v4l2 driver. Can anyone give some idea to read data using imx319 driver.

hello PaulEnoch,

are you working with SerDes chips for your sensor driver?
you may also refer to Jetson Virtual Channel with GMSL Framework Guide for more details.

Hello JerryChang.
Thanks for your reference. Yes Jerry my custom has SerDes chip.Could you please suggest how to use v4l2 command to read data using imx390 driver because I can’t find /dev/video0 file after enabling imx390, max9295 and max9296 drivers. Is imx390 driver will create any other file for reading each Virtual channel data separately.

Thanks for your time.

hello PaulEnoch,

please share the kernel initialization messages for reference,
you should see the video nodes (i.e. /dev/video0 ) once the device registration is complete without failures.

BTW, is it possible to enable test-pattern-generator on the SerDes chip (i.e. Max9295/Max9296), it usually helps for issue narrow down,

Hello JerryChang,
Thanks for your response. Actually I have modified imx390 sensor driver as per my custom sensor. My custom sensor send continuous data without i2c triggering so that I have disabled serializer and i2c trigger section. When am making my driver I have seen below warnings, I have added extern and EXPORT_SYMBOL_GPL() in max9296.c file but warnings is not removing. Because of this my driver failed.
WARNING: "max9296_start_streaming"undefined!
WARNING: “max9296_power_on” undefined!
WARNING: “max9296_stop_streaming” undefined!
WARNING: “max9296_power_off” undefined!
Here I have attached my sensor driver file. JerryChang could you please go through and give some suggestion to debug it.

Thanks for your time. (28.1 KB)

hello PaulEnoch,

could you please share kernel initialization messages for reference before looking into your kernel sources,
you may setup serial console to gather console logs, or you may use $ dmesg > klog.txt for checking kernel logs.

Hello JerryChang,
Here I have attached kernel log. ThankskernelLog.txt (71.7 KB)

hello PaulEnoch,

could you please check the sensor port binding?
I’ve only see below messages which related to your sensor initialization.
did the video device register to /dev/video* successfully for the usage?

[    2.951580] tegra194-vi5 subdev 15a00000.nvcsi--2 bound
[    2.951689] tegra194-vi5 subdev 15a00000.nvcsi--1 bound

Hi JerryChang,
/dev/video0 video device is not registered and when am loading my imx390 module it generating error imx390: loading out-of-tree module taints kernel. Here I have attached my imx390 driver and dtsi file for your reference. Could give some suggestion to debug it.

imx390.c (21.9 KB) tegra194-camera-imx390-a00.txt (13.7 KB)

This vi5 is imx219 sensor port binding actually it enable when booting itself. I am loading imx module after booting.
How to enable imx390 sensor porting at the time of booting instead of imx219. please give me any suggestion.

hello PaulEnoch,

please also refer to Port Binding to review your device tree.
you may also execute media-ctl commands to verify the port binding results.

may I know what’s the image it is? is this a single line image or only metadata?

				compatible = "nvidia,imx390";
				mode0 {
					active_w = "256";
					active_h = "1";

Hi JerryChang

It’s my custom sensor data for verification.
Single line data using imx219 driver I read 4 virtual channel data separately by configuring kernel. But I want to read it one by one sequentially.
Jerry without adding devnode = video0 in imx390 dtsi file how it will register /dev/video0. This is confusing me without adding devnode in driver/ dtsi file how video device will register.
If I want to add devnode, where I want to add.

Thanks for your time