How to merge two 4-lanes of CSI to get 8-lane data

Hi,

I am working on 20M sensor (5120x3840 @ 1620 Mbps) which can be configure for 8 Lane mipi data using gang mode with 2 CSI bricks as below:

Pixel{0,1,2,3} → Phy0{0,1,2,3} → MIPI 1
Pixel{4,5,6,7} → Phy1{0,1,2,3} -->MIPI 2

I would like to know apart of “bus-width = <8> and num_lanes = “8”;” any thing else I have modify in DTSI.

I am working on my custom Jetson Xavier NX.

Thanks
Sujit

Any references ?

Sorry to tell Xavier/Orin don’t support gang mode.

Thanks

Do you mean Xavier NX won’t support gang mode and there no way we can get 8 Lane MIPI working on Xavier NX board? Can you tell me which Jetson SoC’s support gang mode?

Yes, Xavier/Orin serial don’t support gang mode but TX2 support it.
Suppose Xavier able support 5120x3840 by four lanes.

Thanks for update.

I was going through past forums discussion of gang mode and found comment by JerryChang

Multi-brick streams (i.e. gang mode) is NOT implemented for Xavier’s VI drivers.
please achieve 4K input resolutions by using an HDMI bridge that can output that in four D-Phy lanes.
thanks

Could you please let me know what this mean : please achieve 4K input resolutions by using an HDMI bridge that can output that in four D-Phy lanes. ?

Appriciate your help.

Thanks

That suggest using 4 lane for 4K@60 instead of 8 lanes gang mode on Xavier.

Thanks

Got it, thank and appricate your help.

Hi ShaneCCC,

One more query, can we port driver to get 8 Lane from Jetson Tx2 to Jetson xavier NX OR is there any hardware limitation in Jetson xavier NX 8 lane mipi in gang mode ?

Driver doesn’t support it. And Orin/Xavier VI driver have much different with TX2 to support it.

Hi,

I have requirement of supporting 8 Lane mipi, could you provide pointers of TX2 driver for gang mode.

Please reference to tc358840

Thanks

Hi,
I am little confused with below link, this tells that support of 8 lane is avialable for xavier NX. Is this right ?

Suppose it’s r35 regression. We don’t have device to verify on r35 but some user report can’t make 8 lane work.
Maybe you can try it on r32.x release.

Do you have any DTSI file for 8 lane or could you let me know what all changes I need to do.

Suppose only need to configure num_lanes = 8 and nvcsi/vi driver should able handle it.

I have updated bus-width = <8>; and num_lanes = "8"; but getting below crash

[ 76.440933] onsemi_sensor_driver 2-0010: start streaming
[ 79.070221] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 79.070485] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 79.072406] WARNING: CPU: 1 PID: 2146 at /home/sujit/Onsemi/hsm-jetson-xavier-nx/Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/platform/tegra/camera/fusa-capture/capture-vi-0
[ 79.073269] —[ end trace adc392877521fd7f ]—
[ 79.073407] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 79.073584] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 79.073845] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 79.074039] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 79.075345] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 79.075558] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[ 79.076105] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 79.084020] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 0
[ 79.094721] tegra-camrtc-capture-vi tegra-capture-vi: fatal: error recovery failed
[ 79.292837] ------------[ cut here ]------------
[ 79.293025] WARNING: CPU: 2 PID: 2140 at lib/refcount.c:25 refcount_warn_saturate+0x98/0x140
[ 79.293818] —[ end trace adc392877521fd80 ]—
[ 79.293946] ------------[ cut here ]------------
[ 79.294070] WARNING: CPU: 2 PID: 2140 at lib/refcount.c:28 refcount_warn_saturate+0xec/0x140
[ 79.294812] —[ end trace adc392877521fd81 ]—
[ 79.295034] onsemi_sensor_driver 2-0010: stop streaming
[ 79.295454] Unable to handle kernel paging request at virtual address fffffffffffffff8
[ 79.295657] Mem abort info:
[ 79.295749] ESR = 0x96000004
[ 79.295831] EC = 0x25: DABT (current EL), IL = 32 bits
[ 79.295993] SET = 0, FnV = 0
[ 79.296085] EA = 0, S1PTW = 0
[ 79.296174] Data abort info:
[ 79.296257] ISV = 0, ISS = 0x00000004
[ 79.296354] CM = 0, WnR = 0
[ 79.296447] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000b8e34000
[ 79.296618] [fffffffffffffff8] pgd=0000000000000000, p4d=0000000000000000
[ 79.297864] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 79.298021] Modules linked in: fuse(E) lzo_rle(E) lzo_compress(E) zram(E) realtek(E) snd_soc_tegra186_dspk(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_asrc(E) snd_soc_tegra210_iqc(E) sn)
[ 79.298207] pwm_fan(E) nvgpu(E) nvmap(E) ip_tables(E) x_tables(E)
[ 79.390149] CPU: 2 PID: 2140 Comm: v4l-camera Tainted: G W OE 5.10.104-tegra #1
[ 79.398545] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS 1.0-d7fb19b 08/10/2022
[ 79.411150] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=–)
[ 79.416934] pc : vi_capture_control_message+0x28/0x140
[ 79.422179] lr : vi_capture_control_message+0x20/0x140
[ 79.427424] sp : ffff800013673790
[ 79.431094] x29: ffff800013673790 x28: ffff1ae60464b880
[ 79.436606] x27: 0000000000000158 x26: ffff1ae600eee080
[ 79.441881] x25: 000000002cb4177f x24: ffff1ae6045b9088
[ 79.447632] x23: ffff1ae600eee080 x22: ffff800013673868
[ 79.452970] x21: fffffffffffffff0 x20: fffffffffffffff0
[ 79.458395] x19: ffff800013673800 x18: 0000000000000010
[ 79.463910] x17: 0000000000000000 x16: 0000000000000000
[ 79.469162] x15: 000000000000000c x14: 0000000000000000
[ 79.474932] x13: 0000000000000000 x12: 0000000000000000
[ 79.480445] x11: 0000000000000000 x10: 0000000000000000
[ 79.485701] x9 : 0000000000000000 x8 : ffff800013673978
[ 79.491124] x7 : 0000000000000000 x6 : 000000000000003f
[ 79.496808] x5 : 0000000000000040 x4 : ffffffffffffffe0
[ 79.502232] x3 : 0000000000000030 x2 : ffffcf11446de090
[ 79.507569] x1 : ffff800013673800 x0 : ffffcf11446de090
[ 79.512649] Call trace:
[ 79.515379] vi_capture_control_message+0x28/0x140
[ 79.520174] csi5_send_control_message+0x54/0xb0
[ 79.524484] csi5_stream_close+0x8c/0xf0
[ 79.528658] csi5_stop_streaming+0x84/0x90
[ 79.532427] tegra_csi_s_stream+0x100/0x300
[ 79.536711] tegra_channel_set_stream+0x3d4/0x580
[ 79.541259] vi5_channel_stop_streaming+0x34/0xd0
[ 79.545552] tegra_channel_stop_streaming+0x3c/0x70
[ 79.550555] __vb2_queue_cancel+0x50/0x350
[ 79.554565] vb2_core_streamoff+0x34/0xd0
[ 79.558601] vb2_streamoff+0x34/0x80
[ 79.562088] vb2_ioctl_streamoff+0x58/0x70
[ 79.566290] v4l_streamoff+0x40/0x50
[ 79.569789] __video_do_ioctl+0x188/0x400
[ 79.574088] video_usercopy+0x280/0x790
[ 79.577833] video_ioctl2+0x40/0x180
[ 79.581334] v4l2_ioctl+0x68/0x90
[ 79.584755] __arm64_sys_ioctl+0xac/0xf0
[ 79.588514] el0_svc_common.constprop.0+0x80/0x1d0
[ 79.593153] do_el0_svc+0x38/0xb0
[ 79.596823] el0_svc+0x1c/0x30
[ 79.599627] el0_sync_handler+0xa8/0xb0
[ 79.603822] el0_sync+0x16c/0x180
[ 79.607239] Code: aa1e03e0 97cca00c b40007d4 a9025bf5 (f9400680)
[ 79.613541] —[ end trace adc392877521fd82 ]—
[ 79.618173] Kernel panic - not syncing: Oops: Fatal exception
[ 79.623603] SMP: stopping secondary CPUs
[ 79.627379] Kernel Offset: 0x4f1134520000 from 0xffff800010000000
[ 79.633745] PHYS_OFFSET: 0xffffe51b00000000
[ 79.637601] CPU features: 0x8240002,03802a30
[ 79.642144] Memory Limit: none
[ 79.645214] —[ end Kernel panic - not syncing: Oops: Fatal exception ]—

What’s the version? Could you try r32.x due to r35.x have driver redesign.

Thanks

What’s the version? : r35.1
Could you try r32.x due to r35.x have driver redesign.: let me try

Do you mean r35.1 8 Lane support hace been removed ?