Switching from 2 lanes to 4 lanes on OV5693

Hi,
We are using a custom sensor which is similar to the OV5693 sensor.
On Jetpack 3.3 we could use the “Sensor Software Driver Programming Guide” in order to modify the OV5693 driver and the DTB.

Our modifications were:

  1. Updating “tegra186-quill-p3310-1000-a00-00-base.dts” file in order to unregister the Plugin Manager support and load the specific dtsi file <t18x-common-platforms/tegra186-quill-camera-e3326-a00.dtsi>.
  2. Updating the “ov5693.c” file in order to disable the ov5693_read_reg() and ov5693_write_reg() functions by returning 0 (our sensor doesn’t support the I2C read/write).
  3. Updating “tegra186-camera-e3326-a00.dtsi” file in order to change the bus-width from 2 to 4 lanes (our sensor supports 2 different modes - 2 lanes and 4 lanes)

After updating the driver we could work with our sensor on both 2 lanes and 4 lanes modes.

After upgrading to Jetpack 4.2 and applying the same modifications, we could work with our sensor on 2 lanes mode only. We couldn’t work on 4 lanes mode.

In order to work with 4 lanes mode on Jetpack 4.2, we tried to use a different approach:
We tried to modify a different sensor driver (IMX185) the same way we modified the OV5693 driver.
After applying the same modifications, we could see /dev/video0 and run the compliance test:

v4l2-compliance SHA : not available

Driver Info:
Driver name : tegra-video
Card type : vi-output, imx185 2-001a
Bus info : platform:15700000.vi:0
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

Control ioctls:
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 1 Private Controls: 18

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
	test VIDIOC_G/S_PARM: FAIL
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	fail: v4l2-test-formats.cpp(1630): node->can_scale && node->frmsizes_count[v4l_format_g_pixelformat(&cur)]
	test Scaling: OK

Codec ioctls:
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK

Test input 0:

Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

When trying to use the v4l2-ctl util we get the following results:

$ v4l2-ctl --set-fmt-video=width=8192,height=384,pixelformat=RG12 --stream-mmap --stream-count=10 -d /dev/video0 --stream-to=test.raw --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 8192/384
Pixel Format : ‘RG12’
Field : None
Bytes per Line : 16384
Size Image : 6291456
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok

here is the output from dmesg (after adding more debug traces):

[ 4003.080719] imx185 2-001a: [IMX185]: power on
[ 4003.082961] imx185 2-001a: v4l2sd_set_fmt
[ 4003.082972] imx185 2-001a: v4l2sd_set_fmt success
[ 4003.082981] imx185 2-001a: v4l2sd_set_fmt
[ 4003.082997] imx185 2-001a: v4l2sd_set_fmt success
[ 4003.093247] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4003.094786] imx185 2-001a: v4l2sd_stream
[ 4003.094792] imx185 2-001a: [IMX185]: set mode
[ 4003.094797] imx185 2-001a: [IMX185]: imx185_write_table
[ 4003.094799] imx185 2-001a: [IMX185]: set mode success
[ 4003.094803] imx185 2-001a: [IMX185]: Start streaming
[ 4003.094806] imx185 2-001a: [IMX185]: imx185_write_table
[ 4003.094807] imx185 2-001a: [IMX185]: Start streaming sucess
[ 4003.094809] imx185 2-001a: v4l2sd_stream success
[ 4003.094819] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4003.094823] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 17
[ 4003.296998] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4003.303578] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4003.314040] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4003.314778] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4003.314898] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4003.314911] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 18
[ 4003.516999] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4003.523585] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4003.533858] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4003.534522] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4003.534581] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4003.534591] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 19
[ 4003.737013] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4003.743605] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4003.754820] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4003.755343] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4003.755408] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4003.755422] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 20
[ 4003.957195] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4003.963725] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4003.974431] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4003.975221] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4003.975300] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4003.975313] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 21
[ 4004.176977] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4004.183556] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4004.194186] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4004.194846] tegra-vi4 15700000.vi: tegra_channel_capture_frame_single_thread
[ 4004.194914] tegra-vi4 15700000.vi: vi_notify_wait: valid_ports: 1
[ 4004.194926] tegra-vi4 15700000.vi: vi_notify_wait: thresh[0] = 22
[ 4004.396963] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4004.403528] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 4004.416934] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4004.417672] imx185 2-001a: v4l2sd_stream
[ 4004.417683] imx185 2-001a: [IMX185]: Stop streaming
[ 4004.417689] imx185 2-001a: [IMX185]: imx185_write_table
[ 4004.417695] imx185 2-001a: [IMX185]: imx185_write_reg
[ 4004.417700] imx185 2-001a: [IMX185]: Stop streaming sucess
[ 4004.417706] imx185 2-001a: v4l2sd_stream success
[ 4004.417724] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 4004.427947] imx185 2-001a: [IMX185]: imx185_power_off

We couldn’t understand why the same modifications works on Jetpack 3.3 but doesn’t work on Jetpack 4.2.
Did we miss any other modification?

Thanks,
Oren.


Here are more debug traces from /sys/kernel/debug/tracing/trace:

tracer: nop

entries-in-buffer/entries-written: 393/393 #P:4

_-----=> irqs-off

/ _----=> need-resched

| / _—=> hardirq/softirq

|| / _–=> preempt-depth

||| / delay

TASK-PID CPU# |||| TIMESTAMP FUNCTION

| | | |||| | |

 kworker/4:1-7866  [004] ....  1033.021115: rtos_queue_peek_from_isr_failed: tstamp:32661301216 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1033.188968: rtos_queue_peek_from_isr_failed: tstamp:32666301148 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1033.356974: rtos_queue_peek_from_isr_failed: tstamp:32671301153 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1033.525025: rtos_queue_peek_from_isr_failed: tstamp:32676301265 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1033.693007: rtos_queue_peek_from_isr_failed: tstamp:32681301170 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1033.861119: rtos_queue_peek_from_isr_failed: tstamp:32686300962 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.028939: rtos_queue_peek_from_isr_failed: tstamp:32691301181 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.140862: rtos_queue_peek_from_isr_failed: tstamp:32696300991 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.309011: rtos_queue_peek_from_isr_failed: tstamp:32701301210 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.645052: rtos_queue_peek_from_isr_failed: tstamp:32711301437 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.812928: rtos_queue_peek_from_isr_failed: tstamp:32716301215 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1034.980950: rtos_queue_peek_from_isr_failed: tstamp:32721301222 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.149135: rtos_queue_peek_from_isr_failed: tstamp:32726301256 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.261040: rtos_queue_peek_from_isr_failed: tstamp:32731301242 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.428949: rtos_queue_peek_from_isr_failed: tstamp:32736301241 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.596974: rtos_queue_peek_from_isr_failed: tstamp:32741301252 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.764996: rtos_queue_peek_from_isr_failed: tstamp:32746301341 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1035.933166: rtos_queue_peek_from_isr_failed: tstamp:32751301282 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.101084: rtos_queue_peek_from_isr_failed: tstamp:32756301299 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.268905: rtos_queue_peek_from_isr_failed: tstamp:32761301067 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.380900: rtos_queue_peek_from_isr_failed: tstamp:32766301068 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.549278: rtos_queue_peek_from_isr_failed: tstamp:32771301296 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.716932: rtos_queue_peek_from_isr_failed: tstamp:32776301315 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1036.885033: rtos_queue_peek_from_isr_failed: tstamp:32781301310 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.052979: rtos_queue_peek_from_isr_failed: tstamp:32786301388 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.220961: rtos_queue_peek_from_isr_failed: tstamp:32791301319 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.388987: rtos_queue_peek_from_isr_failed: tstamp:32796301326 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.501088: rtos_queue_peek_from_isr_failed: tstamp:32801301424 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.668946: rtos_queue_peek_from_isr_failed: tstamp:32806301340 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1037.836906: rtos_queue_peek_from_isr_failed: tstamp:32811301346 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1038.004934: rtos_queue_peek_from_isr_failed: tstamp:32816301356 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1038.173005: rtos_queue_peek_from_isr_failed: tstamp:32821301190 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1038.173038: rtos_queue_peek_from_isr_failed: tstamp:32822224059 queue:0x0b4b4500
 kworker/4:1-7866  [004] .n..  1080.516913: rtos_queue_peek_from_isr_failed: tstamp:34144761279 queue:0x0b4b4500
 kworker/4:1-7866  [004] .n..  1080.516950: rtcpu_start: tstamp:34144762155
 kworker/4:1-7866  [004] .n..  1080.516984: rtos_queue_send_from_isr_failed: tstamp:34144824996 queue:0x0b4a7258
 kworker/4:1-7866  [004] ....  1080.517016: rtos_queue_send_from_isr_failed: tstamp:34144825105 queue:0x0b4aad68
 kworker/4:1-7866  [004] ....  1080.517082: rtos_queue_send_from_isr_failed: tstamp:34144825211 queue:0x0b4ac998
 kworker/4:1-7866  [004] ....  1080.517082: rtos_queue_send_from_isr_failed: tstamp:34144825318 queue:0x0b4ae518
 kworker/4:1-7866  [004] ....  1080.517084: rtos_queue_send_from_isr_failed: tstamp:34144825424 queue:0x0b4af2d8
 kworker/4:1-7866  [004] ....  1080.517084: rtos_queue_send_from_isr_failed: tstamp:34144825528 queue:0x0b4b0098
 kworker/4:1-7866  [004] ....  1080.517086: rtos_queue_send_from_isr_failed: tstamp:34144825631 queue:0x0b4b0e58
 kworker/4:1-7866  [004] ....  1080.517086: rtos_queue_send_from_isr_failed: tstamp:34144825746 queue:0x0b4b1c18
 kworker/4:1-7866  [004] ....  1080.517088: rtos_queue_send_failed: tstamp:34144826203 queue:0x0b4a7258
 kworker/4:1-7866  [004] ....  1080.517089: rtos_queue_send_from_isr_failed: tstamp:34144828166 queue:0x0b4a7258
 kworker/4:1-7866  [004] ....  1080.517090: rtos_queue_send_from_isr_failed: tstamp:34144828274 queue:0x0b4aad68
 kworker/4:1-7866  [004] ....  1080.517090: rtos_queue_send_from_isr_failed: tstamp:34144828380 queue:0x0b4ac998
 kworker/4:1-7866  [004] .n..  1080.517091: rtos_queue_send_from_isr_failed: tstamp:34144828493 queue:0x0b4ae518
 kworker/4:1-7866  [004] ....  1080.517123: rtos_queue_send_from_isr_failed: tstamp:34144828598 queue:0x0b4af2d8
 kworker/4:1-7866  [004] ....  1080.517154: rtos_queue_send_from_isr_failed: tstamp:34144828702 queue:0x0b4b0098
 kworker/4:1-7866  [004] ....  1080.517186: rtos_queue_send_from_isr_failed: tstamp:34144828807 queue:0x0b4b0e58
 kworker/4:1-7866  [004] ....  1080.517187: rtos_queue_send_from_isr_failed: tstamp:34144828912 queue:0x0b4b1c18
 kworker/4:1-7866  [004] ....  1080.517188: rtos_queue_send_failed: tstamp:34144829848 queue:0x0b4a7258
 kworker/4:1-7866  [004] ....  1080.684938: rtos_queue_peek_from_isr_failed: tstamp:34149761710 queue:0x0b4b4500
 kworker/4:1-7866  [004] ....  1080.740934: rtos_queue_send_from_isr_failed: tstamp:34151737150 queue:0x0b4a7258
 kworker/4:1-7866  [004] ....  1080.740947: rtos_queue_send_from_isr_failed: tstamp:34151737433 queue:0x0b4aad68
 kworker/4:1-7866  [004] ....  1080.740952: rtos_queue_send_from_isr_failed: tstamp:34151737703 queue:0x0b4ac998
 kworker/4:1-7866  [004] ....  1080.740955: rtos_queue_send_from_isr_failed: tstamp:34151737970 queue:0x0b4ae518
 kworker/4:1-7866  [004] ....  1080.740958: rtos_queue_send_from_isr_failed: tstamp:34151738240 queue:0x0b4af2d8
 kworker/4:1-7866  [004] ....  1080.740961: rtos_queue_send_from_isr_failed: tstamp:34151738508 queue:0x0b4b0098
 kworker/4:1-7866  [004] ....  1080.740965: rtos_queue_send_from_isr_failed: tstamp:34151738787 queue:0x0b4b0e58
 kworker/4:1-7866  [004] ....  1080.740968: rtos_queue_send_from_isr_failed: tstamp:34151739055 queue:0x0b4b1c18
 kworker/4:1-7866  [004] ....  1080.740973: rtos_queue_send_failed: tstamp:34151740459 queue:0x0b4a7258

The trace log shows didn’t get any validate data from MIPI bus.
You may need to probe the MIPI signal to confirm it.

Thanks for your reply Shane.

When working with this sensor on 2 lanes mode, we do get validate data (on both Jetpack 3.3 and Jetpack 4.2).
When we apply the relevant modifications in order to switch to 4 lanes mode, the sensor works only on Jetpack 3.3.

Do you have any explanation why the same modifications works on Jetpack 3.3 but doesn’t work on Jetpack 4.2?

Is there any special change required on Jetpack 4.2?

Can I share any other logs which might explain the behavior?

Thanks,
Oren.

2 lanes working on J4.2?
Did you have reference to the new dtb from J4.2 to create new one or just copy the J3.3 to J4.2?

I didn’t copy the dtb from J3.3 to J4.2.
I’ve applied the same modifications on new dts from J4.2.

Here are my changes to “tegra186-quill-p3310-1000-a00-00-base.dts”:

#include <t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi>
#include <t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi>
//#include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi>
#include <t18x-common-platforms/tegra186-quill-camera-e3326-a00.dtsi> //load only the e3226 camera module
//#include <t18x-common-platforms/tegra186-quill-camera-imx185-a00.dtsi> //load only the imx185 camera module
#include <t18x-common-modules/tegra186-display-e3320-1000-a00.dtsi>

/* comms dtsi file should be included after gpio dtsi file */
#include <t18x-common-platforms/tegra186-quill-comms.dtsi>
#include <t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi>
#include <t18x-common-modules/tegra186-super-module-e2614-p2597-1000-a00.dtsi>
#include <t18x-common-plugin-manager/tegra186-quill-display-plugin-manager.dtsi>
#include <t18x-common-prod/tegra186-priv-quill-p3310-1000-a00-prod.dtsi>
//#include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi> //Disable the plugin manager

We’ve tried 2 options in order to switch to 4 lanes mode:

  1. By loading the E3326 camera module, and modifying the bus-width to 4 on OV5693 sensor dtsi file.
  2. By loading the IMX185 which in which the bus-width is already 4.

Thanks,
Oren.

Does 2 lanes configure working on J4.2?

If confirm 2 lanes working on J4.2 that tell the dts shouldn’t be fine.
When you modify the bus-width to 4 have you configure the sensor output as 4 lane?

Yes. 2 lanes configuration works on J4.2.

Here are my changes for 4 lanes configuration in “tegra186-camera-e3326-a00.dtsi”:

host1x {
vi@15700000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
e3326_vi_in0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&e3326_csi_out0>;
};
};
};
};

	nvcsi@150c0000 {
		num-channels = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel@0 {
			reg = <0>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					e3326_csi_in0: endpoint@0 {
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&e3326_ov5693_out0>;
					};
				};
				port@1 {
					reg = <1>;
					e3326_csi_out0: endpoint@1 {
						remote-endpoint = <&e3326_vi_in0>;
					};
				};
			};
		};
	};
};

mode0 { // OV5693_MODE_2592X1944
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_c”;
phy_mode = “DPHY”;


ports {
#address-cells = <1>;
#size-cells = <0>;

			port@0 {
				reg = <0>;
				e3326_ov5693_out0: endpoint {
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&e3326_csi_in0>;
				};
			};
		};

tegra-camera-platform {
compatible = “nvidia, tegra-camera-platform”;
/**
* Physical settings to calculate max ISO BW
*
* num_csi_lanes = <>;
* Total number of CSI lanes when all cameras are active
*
* max_lane_speed = <>;
* Max lane speed in Kbit/s
*
* min_bits_per_pixel = <>;
* Min bits per pixel
*
* vi_peak_byte_per_pixel = <>;
* Max byte per pixel for the VI ISO case
*
* vi_bw_margin_pct = <>;
* Vi bandwidth margin in percentage
*
* max_pixel_rate = <>;
* Max pixel rate in Kpixel/s for the ISP ISO case
*
* isp_peak_byte_per_pixel = <>;
* Max byte per pixel for the ISP ISO case
*
* isp_bw_margin_pct = <>;
* Isp bandwidth margin in percentage
*/
num_csi_lanes = <4>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;tegra186-camera-e3326-a00_4_lanes.dtsi.txt (11.3 KB)

Did you configure the sensor output by 4 lanes configure too.
There’s no anything need to notice if sensor programing correct and configure the bus-width correct.

Yes. I’ve configured the sensor output to 4 lanes.
The same changes work on J3.3…

Thanks,
Oren.

Could you probe the MIPI single each lanes to confirm the sensor output data correctly.

I’ve verified each lane again, and the sensor outputs the data correctly over the 4 lanes.

Thanks,
Oren.

That’s weird,
Could you check the disconitnuosu_clk and cil_settletime from 1 - 0x4f

		discontinuous_clk = "yes";
		cil_settletime = "0";

I checked again with:
discontinuous_clk = “no”;
cil_settletime = “10”;

And I got the same results.

Thanks,
Oren.

Did you get this to work with 4 MIPI lanes Jetpack 4.2 after the discontinuous_clk and cil_settletime changes?
Thanks
LArry