Ov5647 camera driver return error "mipi csi2 can not receive data correctly!"

Hi

Linux 4.9 kernel version, The Omnivision ov5647 camera module driver implemented but when start to capture the image this error is getting "mipi csi2 can not receive data correctly! " and below added the capture log.

255|toradex_apalis6q:/ # mxc-v4l2-capture /cache/1.raw
  mxc_v4l_open_height = 960
                   out_width = 1280, out_height = 960
top = 0, left = 0

In MVC: mxc_v4l_open
   device name is Mxc Camera
  v4l2_int_type_slave 2 cam->sensor -1052009484
End of mxc_v4l_open: v2f pix widthxheight 288 x 352
End of mxc_v4l_open: crop_bounds widthxheight 1280 x 960
End of mxc_v4l_open: crop_defrect widthxheight 1280 x 960
End of mxc_v4l_open: crop_current widthxheight 1280 x 960
On Open: Input to ipu size is 1280 x 960
ov5647_mipi_camera_powerdown: powerdown=0, power_gp=0x24
  ov5647ioctl_dev_init
  ov5647_init_mode
ov5647_set_virtual_channel: virtual channel=1
  ov5647_init_mode mipi_reg(385877267) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(335544323) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(67108867) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(67108867) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(67108867) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(335544323) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(335544323) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(33554435) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(335544323) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(335544323) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
mipi csi2 can not receive data correctly!
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c5651
sensor chip is ov5647_mipi_cameraIn MVC:mxc_v4l_ioctl

sensor supported frame size:
In MVC: mxc_v4l_do_ioctl c02c564a
 1280x960
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 1280x720
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 1920x1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 640x480
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 1024x768
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 960x720
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
 640x480
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
sensor frame format: BA81
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0405602
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5616
   case VIDIOC_S_PARM
In mxc_v4l2_s_param
   Current capabilities are 1001
   Current capturemode is 4  change to 0
   Current framerate is 30  change to 30
ov5647_mipi_camera_powerdown: powerdown=0, power_gp=0x24
ov5647_mipi: 1280x960@30fps
  ov5647_init_mode
ov5647_set_virtual_channel: virtual channel=1
  ov5647_init_mode mipi_reg(335544595) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(275) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(268435459) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(67108867) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(275) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
  ov5647_init_mode mipi_reg(3) mipi_csi2_info d02f8c00
mipi csi2 can not receive data correctly!
mxc_v4l2_s_param: vidioc_int_s_parm returned an error -1
VIDIOC_S_PARM failed
In MVC:mxc_v4l_close
get format failed
mxc_v4l_close: release resource
MVC: In mxc_free_frame_buf
In MVC:mxc_free_frames
255|toradex_apalis6q:/ # ov5647_mipi_camera_powerdown: powerdown=1, power_gp=0x24

Please support to resolve this issue.

Thanks & regards,

Harish

What exact hardware and software versions of things are you talking about? Is this on Ixora V1.1A with our OV5640 camera module? As I personally tested that combination with our BSP 2.8b2 LXDE demo Image.

hi harish

which bsp exacty are u using? Is this an official bsp from toradex or did you make any changes?

Below given hardware and software versions.
Hardware version = ixora v1.1a carrier board and Apalis iMX6Q 2Gb v1.1c
Software versions = linux 4.9 kernel version

If any think need my side please let me.
Thanks & Regards,
Harish.

As mentioned before at least with our OV5640 camera module this works just fine (see attached log file). If your use case is different in any way then please do specify in detail what exactly it is that you are doing differently!

Hi jaski
Yes i am using official bsp from toradex, The only change is ov5647 registers values, other than no change in bsp side.

Could you please answer my questions as well?

Hi Marcel,

Here we are nothing doing differently, whatever have in ov5640 camera driver, Same think we are doing on ov5647 camera driver. So following error is getting (mipi csi2 can not receive data correctly!
). So I refereed ov5640 driver code as will as both are same, There is no much changes.

Please give me the input to resolve this issue. Thanks your quick reply.

hi,
is your camera working? Did you test it with some other device.

There is no much changes.

Could you list all changes, please?