[Xavier] Multiple Camera Connection probelms

hi all,

FYI.
you should applied the kernel patches in the attachment (devtalk1046625_patches.tar.gz), based-on l4t-r31.1 to enable CSI-G/H ports on Xavier.

in addition, as I mentioned in comment #3,
please refer to below for the port-index of NVCSI and VI

nvcsi@ node should be the NVCSI port
CSI Port A := 0
CSI Port B := 1
CSI Port C := 2
CSI Port D := 3
CSI Port E := 4
CSI Port F := 5
CSI Port G := 6
CSI Port H := 7

vi@ node should be NVCSI PixelParser index (aka. stream_id), the last two bricks, each CSI-E/F and CSI-G/H share a single PixelParser.
Stream 0 := 0 (CSI Port A)
Stream 1 := 1 (CSI Port B)
Stream 2 := 2 (CSI Port C)
Stream 3 := 3 (CSI Port D)
Stream 4 := 4 (CSI Port EF)
Stream 5 := 5 (CSI Port GH)

for example,
if you had a sensor connect to CSI-G,
the port-index device tree property should be indicate as below.

Sensor_out (port-index= 6) → CSI_in (port-index= 6) → CSI_out (port-index= 6) → VI_in (port-index= 5)

devtalk1046625_patches.tar.gz (9.97 KB)

Hi,

The patches fixed my problems.
now I can successfully capture on CSI-G.

Thank you.

Hello,

I am trying to connect four OV24A1B sensor over four 4 CSI lanes to the Jetson Xavier platform.

The driver is based on the ov5693.c and the device tree is based on the device tree of the ov5693 as well.

I applied the patched above as well as the modifications in the device tree. However, I do have a kernel panic when initializing the vi channel in tegra_channel_populate_dev_info:

[   11.870163] tegra194-isp5 14800000.isp: initialized
[   11.880612] tegra194-vi5 15c10000.vi: initialized
[   11.888354] tegra194-vi5 15c10000.vi: subdev ov5693 30-0036 bound
[   11.889746] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--4 bound
[   11.891700] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--3 bound
[   11.893379] Unable to handle kernel NULL pointer dereference at virtual address 00000178
[   11.894716] Mem abort info:
[   11.895971]   ESR = 0x96000005
[   11.897198]   Exception class = DABT (current EL), IL = 32 bits
[   11.898465]   SET = 0, FnV = 0
[   11.899724]   EA = 0, S1PTW = 0
[   11.900945] Data abort info:
[   11.902158]   ISV = 0, ISS = 0x00000005
[   11.903403]   CM = 0, WnR = 0
[   11.904640] [0000000000000178] user address but active_mm is swapper
[   11.905917] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[   11.907211] Modules linked in:
[   11.909419] CPU: 1 PID: 795 Comm: kworker/1:1 Not tainted 4.9.108+ #73
[   11.914845] Hardware name: jetson-xavier (DT)
[   11.919146] Workqueue: events deferred_probe_work_func
[   11.924895] task: ffffffc3e9028e00 task.stack: ffffffc3e90c8000
[   11.930246] PC is at tegra_channel_populate_dev_info+0xbc/0x158
[   11.935936] LR is at tegra_channel_populate_dev_info+0xac/0x158

The vi channels are defined as below in the device tree :

vi@15c10000 {
			num-channels = <4>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					vi_in0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&csi_out0>;
					};
				};
				port@1 {
					reg = <1>;
					vi_in1: endpoint {
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&csi_out1>;
					};
				};
				port@2 {
					reg = <2>;
					vi_in2: endpoint {
						port-index = <4>;
						bus-width = <4>;
						remote-endpoint = <&csi_out2>;
					};
				};
				port@3 {
					reg = <3>;
					vi_in3: endpoint {
						port-index = <5>;
						bus-width = <4>;
						remote-endpoint = <&csi_out3>;
					};
				};
			};
		};

I don’t know if my issue is linked to a device tree configuration or a driver configuration.

Do you have any idea what am I missing or what tests could I do to gain deeper insights into the issue?

Thanks in advance,

Hello,

After investigation, it seems that the function “tegra_channel_populate_dev_info” is calling “tegra_channel_get_sensor_type(chan)” with a wrong argument.

The device stored in the struct tegra_channel *chan is not a sensor but the name of the node is “nvcsi”. Therefore, the struct “camera_common_data *s_data = to_camera_common_data(sd->dev);” is wrongly instantiated because there is no mode in the node “nvcsi”.

I hope this will help you understanding my issue.

Thanks in advance,

hello Mobilaz,

since ov5693 is two lane reference drivers, could you please also refer to below device tree to check four lane configurations.
/kernel_src/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx274-dual.dtsi

please confirm that single camera able to be detected without issues, then extend your number of sensors.
thanks

Hello,

I identified my issue in the device tree based on the imx274-dual example.

It was linked to the naming convention of the endpoint in the nvcsi device node.

Thanks a lot

is there dtsi file to edit for imx477 sensor?