OV10635 camera sensor with MAX9286-MAX96795 SerDes

Dear all,

We are setting up 5 OV10635 cameras that using SerDes on Xavier.
The first one is connected to MAX96705-MAX9288 SerDes and it could work as well.
The other four cameras are connected to MAX96705-MAX9286 and even one of them could not work.
I could verify that there was MIPI output from MAX9286 to Xavier but it was so difficult to confirm the correctness.
Then I tried to capture the image with simple v4l2 command and the result as below

v4l2-ctl -d /dev/video1 --stream-mmap --stream-count=1 --stream-to=test.raw
[  744.158381] [vunguyen] ov10635_s_stream enable=1
[  744.158506] [vunguyen] ov10635_s_stream, i2c addr: 0x6a
[  744.293398] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  744.293520] **************************************
[  744.293655] * For more Internal Decode Help
[  744.293728] *     http://nv/cbberr
[  744.293803] * NVIDIA userID is required to access
[  744.293883] **************************************
[  744.293966] CPU:0, Error:RCE-NOC
[  744.294026] 	Error Logger		: 1
[  744.294094] 	ErrLog0			: 0x80030600
[  744.294159] 	  Transaction Type	: RD  - Read, Incrementing
[  744.294250] 	  Error Code		: TMO
[  744.294348] 	  Error Source		: Target NIU
[  744.294425] 	  Error Description	: Target time-out error
[  744.294517] 	  Packet header Lock	: 0
[  744.294581] 	  Packet header Len1	: 3
[  744.294646] 	  NOC protocol version	: version >= 2.7
[  744.294730] 	ErrLog1			: 0x157600
[  744.294822] 	ErrLog2			: 0x0
[  744.295024] 	  RouteId		: 0x157600
[  744.295280] 	  InitFlow		: cpu_p_i/I/0
[  744.295594] 	  Targflow		: cbb_t/T/0
[  744.295853] 	  TargSubRange		: 27
[  744.296116] 	  SeqId			: 0
[  744.296347] 	ErrLog3			: 0x5c01400
[  744.296584] 	ErrLog4			: 0x0
[  744.299077] 	  Address		: 0x15c01400 (unknown device)
[  744.304158] 	ErrLog5			: 0x387e31
[  744.307394] 	  Master ID		: RCE
[  744.310543] 	  Security Group(GRPSEC): 0x3f
[  744.314304] 	  Cache			: 0x1 -- Device
[  744.318075] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  744.324984] 	  FALCONSEC		: 0x0
[  744.328123] 	  Virtual Queuing Channel(VQC): 0x0
[  744.332594] 	**************************************
[  744.647169] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  744.647295] **************************************
[  744.647413] * For more Internal Decode Help
[  744.647490] *     http://nv/cbberr
[  744.647550] * NVIDIA userID is required to access
[  744.647632] **************************************
[  744.647757] CPU:0, Error:RCE-NOC
[  744.647825] 	Error Logger		: 1
[  744.647904] 	ErrLog0			: 0x80030600
[  744.647974] 	  Transaction Type	: RD  - Read, Incrementing
[  744.648067] 	  Error Code		: TMO
[  744.648135] 	  Error Source		: Target NIU
[  744.648208] 	  Error Description	: Target time-out error
[  744.648306] 	  Packet header Lock	: 0
[  744.648377] 	  Packet header Len1	: 3
[  744.648448] 	  NOC protocol version	: version >= 2.7
[  744.648537] 	ErrLog1			: 0x156e00
[  744.648600] 	ErrLog2			: 0x0
[  744.648791] 	  RouteId		: 0x156e00
[  744.649057] 	  InitFlow		: cpu_p_i/I/0
[  744.649345] 	  Targflow		: cbb_t/T/0
[  744.649636] 	  TargSubRange		: 23
[  744.649880] 	  SeqId			: 0
[  744.650094] 	ErrLog3			: 0x100004
[  744.650348] 	ErrLog4			: 0x0
[  744.652822] 	  Address		: 0x100004 (unknown device)
[  744.657658] 	ErrLog5			: 0x387e3f
[  744.660647] 	  Master ID		: RCE
[  744.663786] 	  Security Group(GRPSEC): 0x3f
[  744.667811] 	  Cache			: 0xf -- Cacheable
[  744.671837] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  744.678745] 	  FALCONSEC		: 0x0
[  744.681893] 	  Virtual Queuing Channel(VQC): 0x0
[  744.686363] 	**************************************
[  746.659733] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: response timeout
[  746.659969] tegra186-cam-rtcpu bc00000.rtcpu: rce full reset, retry 1/2
[  746.668809] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  746.668938] **************************************
[  746.669028] * For more Internal Decode Help
[  746.669104] *     http://nv/cbberr
[  746.669169] * NVIDIA userID is required to access
[  746.669251] **************************************
[  746.669336] CPU:0, Error:RCE-NOC
[  746.669400] 	Error Logger		: 1
[  746.669469] 	ErrLog0			: 0x80030600
[  746.669539] 	  Transaction Type	: RD  - Read, Incrementing
[  746.669631] 	  Error Code		: TMO
[  746.669703] 	  Error Source		: Target NIU
[  746.669778] 	  Error Description	: Target time-out error
[  746.669883] 	  Packet header Lock	: 0
[  746.669948] 	  Packet header Len1	: 3
[  746.670014] 	  NOC protocol version	: version >= 2.7
[  746.670099] 	ErrLog1			: 0x156e00
[  746.670190] 	ErrLog2			: 0x0
[  746.670388] 	  RouteId		: 0x156e00
[  746.670662] 	  InitFlow		: cpu_p_i/I/0
[  746.670941] 	  Targflow		: cbb_t/T/0
[  746.671218] 	  TargSubRange		: 23
[  746.671492] 	  SeqId			: 0
[  746.673763] 	ErrLog3			: 0x100004
[  746.676999] 	ErrLog4			: 0x0
[  746.679540] 	  Address		: 0x100004 (unknown device)
[  746.684615] 	ErrLog5			: 0x387e3f
[  746.687602] 	  Master ID		: RCE
[  746.690744] 	  Security Group(GRPSEC): 0x3f
[  746.691676] tegra194-vi5 15c10000.vi: no reply from camera processor
[  746.691683] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[  746.703652] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[  746.703790] ------------[ cut here ]------------
[  746.703808] WARNING: CPU: 1 PID: 6835 at /home/vu/Desktop/Projects/JetsonXavier/public_sources/kernel/nvidia/drivers/platform/tegra/rtcpu/capture-ivc.c:86 tegra_capture_ivc_tx+0x11c/0x150
[  746.704030] ---[ end trace f99f597a44db4881 ]---
[  746.704127] tegra194-vi5 15c10000.vi: IVC control submit failed
[  746.704138] video4linux video1: vi capture release failed
[  746.704142] tegra194-vi5 15c10000.vi: fatal: error recovery failed
[  746.759959] 	  Cache			: 0xf -- Cacheable
[  746.764436] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  746.770821] 	  FALCONSEC		: 0x0
[  746.774214] 	  Virtual Queuing Channel(VQC): 0x0
[  746.778598] 	**************************************
[  748.675621] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  748.675809] tegra186-cam-rtcpu bc00000.rtcpu: rce full reset, retry 2/2
[  748.684681] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  748.684851] **************************************
[  748.684947] * For more Internal Decode Help
[  748.685025] *     http://nv/cbberr
[  748.685088] * NVIDIA userID is required to access
[  748.685181] **************************************
[  748.685266] CPU:0, Error:RCE-NOC
[  748.685330] 	Error Logger		: 1
[  748.685400] 	ErrLog0			: 0x80030600
[  748.685477] 	  Transaction Type	: RD  - Read, Incrementing
[  748.685574] 	  Error Code		: TMO
[  748.685640] 	  Error Source		: Target NIU
[  748.685714] 	  Error Description	: Target time-out error
[  748.685839] 	  Packet header Lock	: 0
[  748.685907] 	  Packet header Len1	: 3
[  748.685975] 	  NOC protocol version	: version >= 2.7
[  748.686062] 	ErrLog1			: 0x156e00
[  748.686125] 	ErrLog2			: 0x0
[  748.686270] 	  RouteId		: 0x156e00
[  748.686523] 	  InitFlow		: cpu_p_i/I/0
[  748.686802] 	  Targflow		: cbb_t/T/0
[  748.687075] 	  TargSubRange		: 23
[  748.687335] 	  SeqId			: 0
[  748.689833] 	ErrLog3			: 0x100004
[  748.693328] 	ErrLog4			: 0x0
[  748.695876] 	  Address		: 0x100004 (unknown device)
[  748.700695] 	ErrLog5			: 0x387e3f
[  748.704194] 	  Master ID		: RCE
[  748.707075] 	  Security Group(GRPSEC): 0x3f
[  748.711362] 	  Cache			: 0xf -- Cacheable
[  748.715127] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  748.721775] 	  FALCONSEC		: 0x0
[  748.725187] 	  Virtual Queuing Channel(VQC): 0x0
[  748.729651] 	**************************************
[  750.070889] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[  750.071068] Mem abort info:
[  750.071131]   ESR = 0x96000005
[  750.071201]   Exception class = DABT (current EL), IL = 32 bits
[  750.071307]   SET = 0, FnV = 0
[  750.071367]   EA = 0, S1PTW = 0
[  750.071442] Data abort info:
[  750.071585]   ISV = 0, ISS = 0x00000005
[  750.071670]   CM = 0, WnR = 0
[  750.071735] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc3a9ad9000
[  750.071850] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
[  750.072006] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[  750.072112] Modules linked in: overlay nvs_bmi160 nvs nvgpu bluedroid_pm ip_tables x_tables
[  750.072415] CPU: 0 PID: 6833 Comm: v4l2-ctl Tainted: G        W       4.9.140-tegra #187
[  750.072557] Hardware name: jetson-xavier (DT)
[  750.072735] task: ffffffc3c3abf000 task.stack: ffffffc3d0040000
[  750.073197] PC is at exit_creds+0x2c/0x78
[  750.073518] LR is at __put_task_struct+0x4c/0x140
[  750.073869] pc : [<ffffff80080def7c>] lr : [<ffffff80080b01ac>] pstate: 60400045
[  750.078891] sp : ffffffc3d0043a10
[  750.082126] x29: ffffffc3d0043a10 x28: 0000000000000008 
[  750.087932] x27: ffffff8008f52000 x26: ffffffc3d0043de8 
[  750.093254] x25: ffffffc3d2c8d468 x24: ffffffc3dabd7238 
[  750.098856] x23: 0000000000000001 x22: ffffffc3daaa5718 
[  750.104607] x21: ffffffc3d2cfc630 x20: 0000000000000000 
[  750.109708] x19: ffffffc3d2cfc600 x18: 000000000000020e 
[  750.115456] x17: 0000007faef1f698 x16: 0000000000000000 
[  750.121005] x15: 00000000000003e3 x14: 00000000000b2100 
[  750.126676] x13: 0000000000000411 x12: 0000000000000052 
[  750.132453] x11: 0000000000000052 x10: 0000000000000a20 
[  750.137959] x9 : ffffffc3d0043860 x8 : ffffffc3c3abfa80 
[  750.144003] x7 : ffffffc3ffe31b28 x6 : 0000000580bd6c89 
[  750.149248] x5 : 0000000000000400 x4 : 0000000000000000 
[  750.154834] x3 : 00000000000000b0 x2 : 0000000000000000 
[  750.160169] x1 : 0000000000000000 x0 : 00000000ffffffff 
[  750.165258] 
[  750.166925] Process v4l2-ctl (pid: 6833, stack limit = 0xffffffc3d0040000)
[  750.173326] Call trace:
[  750.175936] [<ffffff80080def7c>] exit_creds+0x2c/0x78
[  750.180486] [<ffffff80080b01ac>] __put_task_struct+0x4c/0x140
[  750.186078] [<ffffff80080dca3c>] kthread_stop+0x1e4/0x1e8
[  750.191157] [<ffffff8008b2ff38>] vi5_channel_stop_kthreads+0x40/0x58
[  750.197281] [<ffffff8008b2ffdc>] vi5_channel_stop_streaming+0x8c/0xa8
[  750.203148] [<ffffff8008b230ac>] tegra_channel_stop_streaming+0x34/0x48
[  750.209636] [<ffffff8008b1b42c>] __vb2_queue_cancel+0x34/0x188
[  750.215212] [<ffffff8008b1c954>] vb2_core_queue_release+0x2c/0x58
[  750.220815] [<ffffff8008b1efd4>] _vb2_fop_release+0x84/0xa0
[  750.226156] [<ffffff8008b252f8>] tegra_channel_close+0x58/0x130
[  750.232107] [<ffffff8008af85e0>] v4l2_release+0x48/0xa0
[  750.237187] [<ffffff800825e518>] __fput+0x90/0x1d0
[  750.241731] [<ffffff800825e6d0>] ____fput+0x20/0x30
[  750.246573] [<ffffff80080d9bf4>] task_work_run+0xbc/0xd8
[  750.252318] [<ffffff80080b9674>] do_exit+0x2c4/0xa08
[  750.256957] [<ffffff80080b9e48>] do_group_exit+0x40/0xa8
[  750.262559] [<ffffff80080c7744>] get_signal+0x26c/0x578
[  750.267466] [<ffffff800808b150>] do_signal+0x130/0x500
[  750.272729] [<ffffff800808b698>] do_notify_resume+0x90/0xb0
[  750.278309] [<ffffff8008083754>] work_pending+0x8/0x10
[  750.283391] ---[ end trace f99f597a44db4882 ]---
[  750.303608] Fixing recursive fault but reboot is needed!
[  750.691567] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  750.692389] tegra186-cam-rtcpu bc00000.rtcpu: Alert: Camera RTCPU gone bad! restoring it immediately!!
[  750.702290] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  750.702417] **************************************
[  750.702516] * For more Internal Decode Help
[  750.702595] *     http://nv/cbberr
[  750.702660] * NVIDIA userID is required to access
[  750.702744] **************************************
[  750.702829] CPU:0, Error:RCE-NOC
[  750.702906] 	Error Logger		: 1
[  750.702998] 	ErrLog0			: 0x80030600
[  750.703068] 	  Transaction Type	: RD  - Read, Incrementing
[  750.703160] 	  Error Code		: TMO
[  750.703220] 	  Error Source		: Target NIU
[  750.703335] 	  Error Description	: Target time-out error
[  750.703429] 	  Packet header Lock	: 0
[  750.703496] 	  Packet header Len1	: 3
[  750.703561] 	  NOC protocol version	: version >= 2.7
[  750.703648] 	ErrLog1			: 0x156e00
[  750.703713] 	ErrLog2			: 0x0
[  750.703877] 	  RouteId		: 0x156e00
[  750.704134] 	  InitFlow		: cpu_p_i/I/0
[  750.704437] 	  Targflow		: cbb_t/T/0
[  750.704689] 	  TargSubRange		: 23
[  750.705602] 	  SeqId			: 0
[  750.708765] 	ErrLog3			: 0x100004
[  750.711990] 	ErrLog4			: 0x0
[  750.714498] 	  Address		: 0x100004 (unknown device)
[  750.719619] 	ErrLog5			: 0x387e3f
[  750.722584] 	  Master ID		: RCE
[  750.725735] 	  Security Group(GRPSEC): 0x3f
[  750.730017] 	  Cache			: 0xf -- Cacheable
[  750.734041] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  750.740689] 	  FALCONSEC		: 0x0
[  750.743579] 	  Virtual Queuing Channel(VQC): 0x0
[  750.748566] 	**************************************
[  752.707479] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  752.707658] tegra186-cam-rtcpu bc00000.rtcpu: rce full reset, retry 1/2
[  752.716559] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  752.716686] **************************************
[  752.716776] * For more Internal Decode Help
[  752.716853] *     http://nv/cbberr
[  752.716919] * NVIDIA userID is required to access
[  752.717000] **************************************
[  752.717085] CPU:0, Error:RCE-NOC
[  752.717148] 	Error Logger		: 1
[  752.717217] 	ErrLog0			: 0x80030600
[  752.717285] 	  Transaction Type	: RD  - Read, Incrementing
[  752.717384] 	  Error Code		: TMO
[  752.717446] 	  Error Source		: Target NIU
[  752.717532] 	  Error Description	: Target time-out error
[  752.717626] 	  Packet header Lock	: 0
[  752.717695] 	  Packet header Len1	: 3
[  752.717761] 	  NOC protocol version	: version >= 2.7
[  752.717845] 	ErrLog1			: 0x156e00
[  752.717942] 	ErrLog2			: 0x0
[  752.718145] 	  RouteId		: 0x156e00
[  752.718389] 	  InitFlow		: cpu_p_i/I/0
[  752.718687] 	  Targflow		: cbb_t/T/0
[  752.718978] 	  TargSubRange		: 23
[  752.719239] 	  SeqId			: 0
[  752.721949] 	ErrLog3			: 0x100004
[  752.725186] 	ErrLog4			: 0x0
[  752.727955] 	  Address		: 0x100004 (unknown device)
[  752.732542] 	ErrLog5			: 0x387e3f
[  752.736038] 	  Master ID		: RCE
[  752.739186] 	  Security Group(GRPSEC): 0x3f
[  752.743222] 	  Cache			: 0xf -- Cacheable
[  752.747238] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  752.753889] 	  FALCONSEC		: 0x0
[  752.756777] 	  Virtual Queuing Channel(VQC): 0x0
[  752.761764] 	**************************************
[  754.723423] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  754.723604] tegra186-cam-rtcpu bc00000.rtcpu: rce full reset, retry 2/2
[  754.732480] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  754.732601] **************************************
[  754.732691] * For more Internal Decode Help
[  754.732766] *     http://nv/cbberr
[  754.732831] * NVIDIA userID is required to access
[  754.732924] **************************************
[  754.733013] CPU:0, Error:RCE-NOC
[  754.733101] 	Error Logger		: 1
[  754.733178] 	ErrLog0			: 0x80030600
[  754.733246] 	  Transaction Type	: RD  - Read, Incrementing
[  754.733342] 	  Error Code		: TMO
[  754.733449] 	  Error Source		: Target NIU
[  754.733524] 	  Error Description	: Target time-out error
[  754.733625] 	  Packet header Lock	: 0
[  754.733690] 	  Packet header Len1	: 3
[  754.733781] 	  NOC protocol version	: version >= 2.7
[  754.733867] 	ErrLog1			: 0x156e00
[  754.733932] 	ErrLog2			: 0x0
[  754.734056] 	  RouteId		: 0x156e00
[  754.734322] 	  InitFlow		: cpu_p_i/I/0
[  754.734620] 	  Targflow		: cbb_t/T/0
[  754.734898] 	  TargSubRange		: 23
[  754.735153] 	  SeqId			: 0
[  754.737907] 	ErrLog3			: 0x100004
[  754.741135] 	ErrLog4			: 0x0
[  754.743658] 	  Address		: 0x100004 (unknown device)
[  754.748747] 	ErrLog5			: 0x387e3f
[  754.751738] 	  Master ID		: RCE
[  754.754877] 	  Security Group(GRPSEC): 0x3f
[  754.758900] 	  Cache			: 0xf -- Cacheable
[  754.763187] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  754.769834] 	  FALCONSEC		: 0x0
[  754.772982] 	  Virtual Queuing Channel(VQC): 0x0
[  754.777709] 	**************************************
[  756.739358] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  756.740023] tegra186-cam-rtcpu bc00000.rtcpu: Alert: Camera RTCPU gone bad! restoring it immediately!!
[  756.749937] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  756.750057] **************************************
[  756.750144] * For more Internal Decode Help
[  756.750219] *     http://nv/cbberr
[  756.750283] * NVIDIA userID is required to access
[  756.750383] **************************************
[  756.750476] CPU:0, Error:RCE-NOC
[  756.750543] 	Error Logger		: 1
[  756.750615] 	ErrLog0			: 0x80030600
[  756.750686] 	  Transaction Type	: RD  - Read, Incrementing
[  756.750784] 	  Error Code		: TMO
[  756.750848] 	  Error Source		: Target NIU
[  756.750924] 	  Error Description	: Target time-out error
[  756.751018] 	  Packet header Lock	: 0
[  756.751087] 	  Packet header Len1	: 3
[  756.751155] 	  NOC protocol version	: version >= 2.7
[  756.751242] 	ErrLog1			: 0x156e00
[  756.751306] 	ErrLog2			: 0x0
[  756.751520] 	  RouteId		: 0x156e00
[  756.751776] 	  InitFlow		: cpu_p_i/I/0
[  756.752088] 	  Targflow		: cbb_t/T/0
[  756.752347] 	  TargSubRange		: 23
[  756.753665] 	  SeqId			: 0
[  756.756294] 	ErrLog3			: 0x100004
[  756.759811] 	ErrLog4			: 0x0
[  756.762579] 	  Address		: 0x100004 (unknown device)
[  756.767143] 	ErrLog5			: 0x387e3f
[  756.770641] 	  Master ID		: RCE
[  756.773789] 	  Security Group(GRPSEC): 0x3f
[  756.777815] 	  Cache			: 0xf -- Cacheable
[  756.781857] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  756.788493] 	  FALCONSEC		: 0x0
[  756.791381] 	  Virtual Queuing Channel(VQC): 0x0
[  756.796367] 	**************************************
[  758.755238] tegra186-cam-rtcpu bc00000.rtcpu: command: 0x00000000: empty mailbox timeout
[  758.755414] tegra186-cam-rtcpu bc00000.rtcpu: rce full reset, retry 1/2
[  758.765278] CPU:0, Error:RCE-NOC@0xbe00000,irq=484
[  758.765396] **************************************
[  758.765504] * For more Internal Decode Help
[  758.765586] *     http://nv/cbberr
[  758.765648] * NVIDIA userID is required to access
[  758.765727] **************************************
[  758.765808] CPU:0, Error:RCE-NOC
[  758.765872] 	Error Logger		: 1
[  758.765965] 	ErrLog0			: 0x80030600
[  758.766052] 	  Transaction Type	: RD  - Read, Incrementing
[  758.766149] 	  Error Code		: TMO
[  758.766215] 	  Error Source		: Target NIU
[  758.766291] 	  Error Description	: Target time-out error
[  758.766384] 	  Packet header Lock	: 0
[  758.766454] 	  Packet header Len1	: 3
[  758.766523] 	  NOC protocol version	: version >= 2.7
[  758.766610] 	ErrLog1			: 0x156e00
[  758.766674] 	ErrLog2			: 0x0
[  758.766869] 	  RouteId		: 0x156e00
[  758.767128] 	  InitFlow		: cpu_p_i/I/0
[  758.767419] 	  Targflow		: cbb_t/T/0
[  758.767678] 	  TargSubRange		: 23
[  758.767950] 	  SeqId			: 0
[  758.769714] 	ErrLog3			: 0x100004
[  758.772943] 	ErrLog4			: 0x0
[  758.775734] 	  Address		: 0x100004 (unknown device)
[  758.780556] 	ErrLog5			: 0x387e3f
[  758.783536] 	  Master ID		: RCE
[  758.786684] 	  Security Group(GRPSEC): 0x3f
[  758.790965] 	  Cache			: 0xf -- Cacheable
[  758.794992] 	  Protection		: 0x3 -- Privileged, Non-Secure, Data Access
[  758.801386] 	  FALCONSEC		: 0x0
[  758.804533] 	  Virtual Queuing Channel(VQC): 0x0
[  758.809259] 	**************************************

I’m wondering is there any way to check the correctness of MIPI data on Xavier side?

Any suggestion would be very appreciated.

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

In order to capture multiple cameras using the same deserializer you need to add support for virtual channel. For GMSL is also required to configure the OV10635 in FSIN mode.

You can find more info here: GMSL Virtual Channel ID | Virtual Channel ID | RidgeRun

Regards,

Hi jchaves,

Thank for your reply. May I ask more question.
Do I have to enable virtual channel on Jetson Xavier and how can I do that?

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

From the Jetson Xavier side virtual channel is supported “out-of-the-box” in JetPack 4.2, that means you only need to make sure you assign the correct vc-id in the camera device tree, I advice to check the following file as reference:
hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx390-a00.dtsi

Right now the sensor programming guide doesn’t explain much about this vc-id device tree property but you can also find more info about this here: https://devtalk.nvidia.com/default/topic/1057338/jetson-agx-xavier/gmsl-virtual-channel-id-support/post/5361427/#5361427

Regards,

-Jafet

Hi jchaves,

Thank for your useful info. First step, I just wanna make only one camera work well with MAX9286 and Xavier’s virtual channel in order to verify our hardware. So this is my device tree for 2 cameras, first camera is connected to MAX9288 and it worked well, the second one is connected to MAX9286.

/*
 * Copyright (c) 2016-2017, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 */

/*#include <t19x-common-modules/tegra194-camera-e3331-a00.dtsi>*/
#include "dt-bindings/clock/tegra194-clock.h"

/* Date          Author           Initial*/
/* 2019-06-27    Vu Nguyen        Initial*/

#define CAM0_RST_L	TEGRA194_MAIN_GPIO(R, 5)
#define CAM0_PWDN_L	TEGRA194_MAIN_GPIO(N, 0)
#define CAM1_PWDN_L	TEGRA194_MAIN_GPIO(M, 3)

/ {
	/* all cameras are disabled by default */
	host1x {
		vi@15c10000 {
			num-channels = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				
				port@0 {
					reg = <0>;
					ov10635_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ov10635_csi_out0>;
					};
				};

				port@1 {
					reg = <1>;
					ov10635_vi_in1: endpoint {
						vc-id = <0>;
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&ov10635_csi_out1>;
					};
				};	
			};
		};

		nvcsi@15a00000 {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						ov10635_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ov10635_vi_out0>;
						};
					};
					port@1 {
						reg = <1>;
						ov10635_csi_out0: endpoint@1 {
							remote-endpoint = <&ov10635_vi_in0>;
						};
					};
				};
			};

			channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						ov10635_csi_in1: endpoint@2 {
							port-index = <2>;
							bus-width = <4>;
							remote-endpoint = <&ov10635_vi_out1>;
						};
					};
					port@1 {
						reg = <1>;
						ov10635_csi_out1: endpoint@3 {
							remote-endpoint = <&ov10635_vi_in1>;
						};
					};
				};
			};	
		};
	};

	i2c@c240000 {
		ov10635_c@30 {
			compatible = "nvidia,ov10635";
			
			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			/* mclk-index indicates the index of the */
			/* mclk-name with in the clock-names array */

			clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
						 <&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;

			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			clock-frequency = <24000000>;
			reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio CAM0_PWDN_L GPIO_ACTIVE_HIGH>;
			vana-supply = <&p2822_avdd_cam_2v8>;
			vif-supply = <&p2822_vdd_1v8_cvb>;
			vdig-supply = <&p2822_vdd_sys_en>;

			/* I2C device address */
			reg = <0x30>;

			/* V4L2 device node location */
			devnode = "video0";

			/* Camera index*/
			cam-index = <0>;

			/* Physical dimensions of sensor */
			physical_w = "3.674";
			physical_h = "2.738";

			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			avdd-reg = "vana";
			iovdd-reg = "vif";
			/*vana-supply = <&en_vdd_cam_hv_2v8>;
			vif-supply = <&en_vdd_cam>;*/
			
			mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1280";
					active_h = "720";
					pixel_t = "bayer_bggr";
					readout_orientation = "90";
					line_length = "2688";
					inherent_gain = "1";
					mclk_multiplier = "6.67";
					pix_clk_hz = "160000000";

					min_gain_val = "1.0";
					max_gain_val = "16";
					min_hdr_ratio = "1";
					max_hdr_ratio = "64";
					min_framerate = "1.816577";
					max_framerate = "30";
					min_exp_time = "34";
					max_exp_time = "550385";
				};

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

				port@0 {
					reg = <0>;
					ov10635_vi_out0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&ov10635_csi_in0>;
					};
				};
			};
		};
	};

	i2c@3180000 {
		ov10635_c@31 {
			compatible = "nvidia,ov10635";

			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			/* mclk-index indicates the index of the */
			/* mclk-name with in the clock-names array */

			clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
						 <&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;

			clock-names = "extperiph1", "pllp_grtba";
			mclk = "extperiph1";
			clock-frequency = <24000000>;
			reset-gpios = <&tegra_main_gpio CAM1_PWDN_L GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio CAM1_PWDN_L GPIO_ACTIVE_HIGH>;
			vana-supply = <&p2822_avdd_cam_2v8>;
			vif-supply = <&p2822_vdd_1v8_cvb>;
			vdig-supply = <&p2822_vdd_sys_en>;

			/* I2C device address */
			reg = <0x31>;

			/* V4L2 device node location */
			devnode = "video1";

			/* Camera index*/
			cam-index = <1>;

			/* Physical dimensions of sensor */
			physical_w = "3.674";
			physical_h = "2.738";

			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			avdd-reg = "vana";
			iovdd-reg = "vif";
			/*vana-supply = <&en_vdd_cam_hv_2v8>;
			vif-supply = <&en_vdd_cam>;*/
			
			mode0 {
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_c";
					vc_id = "0";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";

					active_w = "1280";
					active_h = "720";
					pixel_t = "bayer_bggr";
					readout_orientation = "90";
					line_length = "2688";
					inherent_gain = "1";
					mclk_multiplier = "6.67";
					pix_clk_hz = "160000000";

					min_gain_val = "1.0";
					max_gain_val = "16";
					min_hdr_ratio = "1";
					max_hdr_ratio = "64";
					min_framerate = "1.816577";
					max_framerate = "30";
					min_exp_time = "34";
					max_exp_time = "550385";
					embedded_metadata_height = "0";
				};

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

				port@0 {
					reg = <0>;
					ov10635_vi_out1: endpoint {
						vc-id = <0>;
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&ov10635_csi_in1>;
					};
				};
			};

			gmsl-link {
				src-csi-port = "c";
				dst-csi-port = "a";
				serdes-csi-link = "a";
				csi-mode = "1x4";
				st-vc = <0>;
				vc-id = <0>;
				num-lanes = <4>;
				streams = "ued-u1", "yuv422";
			};
		};

	};

	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>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <160000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		/**
		* The general guideline for naming badge_info contains 3 parts, and is as follows,
		* The first part is the camera_board_id for the module; if the module is in a FFD
		* platform, then use the platform name for this part.
		* The second part contains the position of the module, ex. “rear” or “front”.
		* The third part contains the last 6 characters of a part number which is found
		* in the module's specsheet from the vender.
		*/
		modules {
			module0 {
				badge = "ov10635_front_P5V27C_0";
				position = "front";
				orientation = "1";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "ov10635 0-0030";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@c240000/ov10635_c@30";
					status = "okay";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/ov10635_front_lens_0@P5V27C/";
				};
			};

			module1 {
				badge = "ov10635_front_P5V27C_1";
				position = "front";
				orientation = "1";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "ov10635 2-0031";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@3180000/ov10635_c@31";
					status = "okay";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
					proc-device-tree = "/proc/device-tree/ov10635_front_lens_1@P5V27C/";
				};
			};	
		};
	};
};

I was wondering that if I have to modify the driver source code to enable XAvier’s virtual channel or just setting correct “vc-id” in device tree as above. And is there any way to check if virtual channel is enabled in linux user space.

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

I checked your device tree, you are using vc-id and vc_id properties correctly. Concerning your last question, I’m not familiar with the patches you’re using but you should check the virtual channel configuration in the deserializer (MAX9286), being set by the driver, that is, checking the register writes the driver is doing.

Hi jchaves,

Now I could capture one camera as well with MAX9286. But if I tried to enable two cameras, there was no data output from MAX9286 to Xavier.
Do you have any recommendation to check MAX9286 configuration to enable for multiple camera sensors?

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

Please refer to the quoted answer above. Basically after applying the changes in the device tree you’ll need to check the following in your patches:

  1. Check that the camera driver is configuring the OV10635 in FSIN mode.
  2. Check that the deserializer driver is configuring the chip to generate a frame sync pulse to the cameras.
  3. Check the deserializer driver is setting correctly the virtual channel for each input link.

Regards,

Hi jchaves,

Really thank for your help. I could capture 2 cameras of 4 channels as well.
Now I’m facing problem with I2C, if I tried to enable 3 or 4 cameras, I could not communicate with camera 3 or 4 by I2C. I’m digging into this I2C issue.

Thanks and Best Regards,
Vu Nguyen

Hello Vu and Jafet,

I have a similar system as you have described, and I can not get my MAX9286 to achieve frame sync lock when I have two cameras linked to the deserializer. I have my OV10635 configured to use FSIN, my MAX9286 is configured to use manual frame sync with appropriate frame period (confirmed with oscilloscope and it works with one camera), and the MAX9286 is set to use vertical frame combining and VC-ID to be set by link number. When I mask off one active link I can get a lock and the Jetson can stream both virtual channels, but of course the masked camera is all green.

Details of my debugging are here: https://devtalk.nvidia.com/default/topic/1072935/jetson-tx2/max9286-frame-sync-works-with-1-camera-but-fails-with-2-cameras/

Thank you for any help you can provide,
Andy