Update from my side:
Now i can capture image using OV5640 but image is too bad and facing repeated data issue in raw frame data.
Command to capture
v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=YUV --stream-mmap --stream-to=frame.raw --stream-count=1
The frame is attached.
Below are the dmesg logs,
[ 52.738645] DEBUG ov5640_open.
[ 52.738656] DEBUG OPEN : vm_init_resource, 2091, info->vdin_id : 0
[ 52.738660] DEBUG OPEN : vm_init_resource, 2109
[ 52.738665] DEBUG OPEN : dma_alloc_from_contiguous, 193, align = 0, count = 6144
[ 52.738668] DEBUG OPEN : dma_alloc_from_contiguous, 197, align = 0, count = 6144
[ 52.738673] cma: cma_alloc(cma ffffff800ad272e8, count 6144, align 0)
[ 52.761854] cma: cma_alloc(): returned ffffffbf01570000
[ 52.761865] DEBUG OPEN : vm_init_resource, 2119
[ 52.761868] DEBUG OPEN : vm_init_resource, 2123
[ 52.761871] DEBUG OPEN : vm_init_resource, 2125
[ 52.761875] DEBUG OPEN : vm_init_resource, 2137
[ 52.762011] DEBUG : clk_rate : 24000000
[ 52.902032] aml_cams: ov5640 init OK
[ 52.942703] OV5640_init_regs-success in initial OV5640
[ 52.970141] DEBUG ov5640_open-3446 Open compelte
[ 52.970242] res_para->size_type = 19, res_param->frmsize.width = 1920, height = 1080
[ 53.004233] setting resolutin param complete
[ 53.005036] DEBUG vidioc_streamon-3101
[ 53.005044] vidioc_streamon: h_active=1920; v_active=1080, frame_rate=30,vdin_path=0
[ 53.005047] DEBUG ov5640 stream on.
[ 53.005052] ov5640 start tvin service.
[ 53.005056] **[start_tvin_service]cfmt:1;dfmt:1;dest_hactive:0;
[ 53.005060] dest_vactive:0;frame_rate:30;h_active:1920,
[ 53.005063] v_active:1080;scan_mode:1**
[ 53.005338] settle = 0x001a
[ 53.005343] info->lanes = 2
[ 53.005457] DEBUG : vdin_start_dec, 471, vdin_dbg_en : 1
[ 53.005460] DEBUG : vdin_start_dec, 478
[ 53.005464] devp->para.cfmt=1, devp->para.dfmt=1
[ 53.005467] DEBUG : vdin_start_dec, 504
[ 53.005471] DEBUG : vdin_start_dec, 514
[ 53.005480] DEBUG : vdin_start_dec, 521
[ 53.005485] DEBUG : vdin_start_dec, 545
[ 53.005489] DEBUG : vdin_start_dec, 550
[ 53.005492] DEBUG : vdin_start_dec, 555
[ 53.005496] vdin0 init afbce_mode: 0
[ 53.005499] DEBUG : vdin_start_dec, 563
[ 53.005502] DEBUG : vdin_start_dec,566
[ 53.005507] DEBUG OPEN : dma_alloc_from_contiguous, 193, align = 0, count = 16384
[ 53.005511] DEBUG OPEN : dma_alloc_from_contiguous, 197, align = 0, count = 16384
[ 53.005515] cma: cma_alloc(cma ffffff800ad27238, count 16384, align 0)
[ 53.050788] cma: cma_alloc(): returned ffffffbf016f0000
[ 53.050798] vdin0 mem_start = 0x5bc00000, mem_size = 0x1db1000
[ 53.050801] vdin0 cma alloc ok!
[ 53.050805] DEBUG : vdin_start_dec, 574
[ 53.050819] DEBUG : vdin_start_dec, 586
[ 53.050833] vdin_game_mode_check: game_mode flag=0, game_mode=0
[ 53.050837] vdin.0 vframe initial information table: (5 of 9)
[ 53.050844] 0: 0x26 1920x1080, duration = 3200
[ 53.050849] 1: 0x27 1920x1080, duration = 3200
[ 53.050853] 2: 0x28 1920x1080, duration = 3200
[ 53.050857] 3: 0x29 1920x1080, duration = 3200
[ 53.050861] 4: 0x2a 1920x1080, duration = 3200
[ 53.050864] DEBUG : vdin_start_dec, 616
[ 53.050867] DEBUG : vdin_start_dec, 626
[ 53.050873] DEBUG : vdin_start_dec, 634
[ 53.050891] DEBUG : vdin_start_dec, 639
[ 53.050895] start_amvdec_csi.
[ 53.050898] start_amvdec_csi port = 10000
[ 53.050901] init_csi_dec_parameter.
[ 53.050904] reinit_csi_dec, 80
[ 53.050908] DEBUG : vdin_start_dec, 649
[ 53.051049] DEBUG : vdin_start_dec, 673
[ 53.051053] ****[vdin_start_dec]ok!****
[ 53.051056] DEBUG : vdin_start_dec, 692
[ 53.051059] DEBUG : vdin_start_dec, 698
[ 53.057996] DEBUG CAM: vm_fill_this_buffer, 927
[ 53.058003] DEBUG CAM: vm_fill_this_buffer, 934
[ 53.058006] DEBUG CAM: vm_fill_this_buffer, 949
[ 53.058010] DEBUG CAM: vm_fill_this_buffer, 956
[ 53.058013] DEBUG CAM: vm_fill_this_buffer, 959
[ 53.058016] DEBUG CAM: vm_fill_this_buffer, 972
[ 53.058019] DEBUG CAM: vm_fill_this_buffer, 982
[ 53.058027] DEBUG CAM: vm_fill_this_buffer, 1013
[ 53.063669] DEBUG CAM: vm_fill_this_buffer, 1029
[ 53.063677] DEBUG CAM: vm_fill_this_buffer, 1035
[ 53.070051] DEBUG CAM: vm_fill_this_buffer, 927
[ 53.070058] DEBUG CAM: vm_fill_this_buffer, 934
[ 53.070061] DEBUG CAM: vm_fill_this_buffer, 949
[ 53.070064] DEBUG CAM: vm_fill_this_buffer, 956
[ 53.070067] DEBUG CAM: vm_fill_this_buffer, 959
[ 53.070070] DEBUG CAM: vm_fill_this_buffer, 972
[ 53.070073] DEBUG CAM: vm_fill_this_buffer, 982
[ 53.070081] DEBUG CAM: vm_fill_this_buffer, 1013
[ 53.075736] DEBUG CAM: vm_fill_this_buffer, 1029
[ 53.075744] DEBUG CAM: vm_fill_this_buffer, 1035
[ 53.080450] DEBUG ov5640 stream off.
[ 53.080466] DEBUG : vdin_stop_dec, 716
[ 53.080472] reset_btcsi_module, 75
[ 53.080556] cma: cma_release(page ffffffbf016f0000)
[ 53.081079] vdin0 cma release ok!
[ 53.081091] vdin_stop_dec ok
[ 53.081689] aml_cams: ov5640 uninit.
[ 53.133982] Success disable mclk
[ 53.133991] cma: cma_release(page ffffffbf01570000)
[ 53.134182] DEBUG ov5640_close-3528 Close compelte
Also wanted to understand if I can generate test pattern in CSI or CSI decoder ?
Any help will be appreciated.