Driver Issues

Hello,
I have run into some issues with cameras and drivers on the Nano, the current situation I have is that I require two cameras to be operating at the same time.

Specifically one Allied Vision CSI-2 camera, and one raspberry pi camera. However, when I install the drivers for the Allied Vision drivers, I lose compatibility with the raspberry pi camera, and if I don’t install those drivers, I can’t use the Allied vision camera.
Seems like the new driver overwrites the old driver?

So, my question is why does this happen, and is there any solution to this?

hello wlii0044,

please check L4T Archive | NVIDIA Developer and download the L4T sources release package. you may see the device tree definition for the CSI port usage by checking port-index.
for example,
public_sources/kernel_src/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-camera-rbpcv2-dual-imx219.dtsi

you may also refer to Port Index session in developer guide, each CSI brick is able to support x1, x2, or x4 lane configurations, it uses numbers in the device tree to assign the port index.
for example, port-index = <4> it means CSI-E is used.

please look into your drivers,
you should double confirm both of Raspberry Pi, and Allied Visionand were using separate CSI port.
thanks

Hi Jerry,
Apologies, but I am not very familiar with Linux in general, so could you provide how to go about checking this?

If I am understanding this correctly, you’re saying that I am able to have two drivers, one assigned to CSI-A and one assigned to CSI-C?

umm…

I had edit my previous comments instead of making a new reply to this thread by accident.
so, please check my comment #3, thanks

Hi Jerry,
Thanks for that, I did some digging earlier and did find those files.
I see that the IMX219 uses index 0 and 4, while the avt (Allied vision) driver, also uses the same index.
I assume this means that they are both using the same CSI port?

I have attached the avt file just in case.
tegra210-camera-avt-dual-b00.dtsi (7.2 KB)

Thanks

hello wlii0044,

yes, that’s the root cause.
especially the tegra-camera-platform definition, recap as following,

tcp: tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		modules {
			cam_module0: module0 {
				badge = "porg_front_RBPCV2";
				position = "front";
				orientation = "1";
				cam_module0_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx219 7-0010";
					proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_a@10";
				};
			};
			cam_module1: module1 {
				badge = "porg_rear_RBPCV2";
				position = "rear";
				orientation = "1";
				cam_module1_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx219 8-0010";

as you can see, that’s simply copy Raspberry Pi’s node definitions and assign both of the cam_module0 and cam_module1 to the same nodes.
heterogeneous cameras were supported, but you’ll need to correct the device tree settings, please revise the CSI port mappings, for example, you can use CSI-A for Raspberry Pi, and CSI-E for Allied Visionand.
thanks

I compared your recap to the avt’s drivers, the only difference is the:

num_csi_lanes = <4>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <240000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;

and the
proc-device-tree = “/proc/device-tree/cam_i2cmux/i2c@1/rbpcv2_imx219_e@10”;

Could you explain why those differences would fix the issue? Also, do I need to change any of the other files? Since the avt drivers has two files, the one I sent and another called “tegra210-porg-camera-avt-dual-b00.dtsi”

I will link the Allied vision’s open source code on github if it helps.

Many Thanks and Regards

hello wlii0044,

that’s code snippets recap from your source, tegra210-camera-avt-dual-b00.dtsi, the camera node definition in the tegra-camera-platform is incorrect.
note, device tree blob taking several sources and compose them into single binary file, i.e. tegra210-p3448-0000-p3449-0000-a02.dtb; you should review the sources to make camera nodes to use separate CSI ports.

here’s simple command to disassembler the dtb file into text file for examination,
for example, $ dtc -I dtb -O dts -o output.txt tegra210.dtb.
thanks

I see, so, tegra210-p3448-0000-p3449-0000-a02.dtb is all the sources like tegra210-camera-avt-dual-b00.dtsi compiled into one tree.

I will try and do some modifications to the driver files, I will send them here when I have because I probably won’t have done it correctly. So it would be awesome if you can help me correct them when I get them sent here.

Thanks a lot and Regards

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