BPI-M2+ OV5640 camera linux driver is work fine

(bpi team) #1

BPI-M2+ OV5640 camera linux driver is work fine :)


‘Fine’? OV5640 is a 5MP camera and you show us 640x480 pixel and call this fine? Really?

Can we take this already as a confirmation that you are not able to improve the situation with the OV5640 camera driver and 640x480 is still the maximum we get (as it’s the situation with M1/M1+ since years)? What about framerates?

(bpi team) #3

we just fixed driver issue on BPI-M2+, and will update driver to github, maybe you can help us fixed more issue.

(Luiz Vitor Martinez Cardoso) #4

Where is the driver working? None of your Ubuntu images are working with any OV5640.

(Luiz Vitor Martinez Cardoso) #5

[ 1100.777091] [VFE]vfe_open [ 1100.777115] [VFE]…vfe clk open!.. [ 1100.777151] [VFE]vfe_open ok [ 1100.777538] [VFE]Set vfe core clk = 216000000, after Set vfe core clk = 200000000 [ 1100.777554] NOT_SUPPORT_THIS_FUNCTION:sun8iw7p1_isp_set_table_addr, line: 372 [ 1100.790867] [VFE]mclk on [ 1100.920523] [VFE_WARN]v4l2 sub device queryctrl unsuccess,id = 80000000! [ 1100.920594] [VFE_ERR]try bayer bus error when pix fmt is bayer rgb at try_fmt_internal! [ 1100.929478] [VFE_ERR]pixel format (0x20363159) width 384 height 288 invalid at vidioc_try_fmt_vid_cap. [ 1100.940133] [VFE]vfe_close [ 1100.940147] [VFE]mclk off [ 1100.976308] [VFE]…vfe clk close!.. [ 1100.976339] [VFE]vfe_close end


This is your github commit history: https://github.com/BPI-SINOVOIP/BPI-M2P-bsp/commits/master

Everyone can have a look. So why do you tell always these moronic stories you would work on the software side of things since you don’t? You fiddle around in the sources here and there from time to time and that’s it. Please show us a demonstration that you got the camera working. Not a fake video as usual but one as proof of a working camera driver that only shows BPi M2+, camera module and video output on a connected display.

(bpi team) #7

new driver:

(Bruno) #8


I use the latest armbian 5.20. I succeed to use an USB webcam on it but I didn’t find any information or help to use a 5640 camera module with it. Do you have some information or link to help me? Thank you


the steps:

  • Edit /etc/modules and add the two line: ov5640 vfe_v4l2

  • Edit script.bin and make sure you have the OV5640 enabled search Armbian for the tools and how to edit it

  • reboot with the sensor attached

  • check if the sensor was recognized: dmesg | grep ov5640 or dmesg | grep OK

  • Always check for updates and fix and latest drivers as Igor has announced: http://image.armbian.com/

Hope it helps.

(Bruno) #10

Thank you for your help Avaf.

I add the module in /etc/modules and I checked that OV5640 was enabled in script.bin.

Unfortunately the sensor is not recognized: no ov5640 in the dmesg log.

I will check for update and fix.

I don’t know if somebody else has already test the camera with armbian on BPi M2+

(Bruno) #11

Oups, my mistake, I miss these 2 messages in dmesg:

[ 5.242088] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 5.310824] [OV5640@lex]CSI_SUBDEV_PWR_OFF!

I will check why the device is powered off

(Bruno) #12


I switch back on this point.

I tried again to make my camera working. So, I load the 2 modules: ov5640 followed by vfe_v4l2

root@ice001:~# sudo modprobe ov5640 root@ice001:~# dmesg [ 76.635959] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 root@ice001:~#

root@ice001:~# sudo modprobe vfe_v4l2 root@ice001:~# dmesg [ 76.635959] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 129.559950] [ISP] isp platform_id = 5! [ 129.572122] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 129.640038] [OV5640@lex]sensor_init 0x0 [ 129.640789] [OV5640@lex]sensor read retry=2 [ 129.640800] [OV5640@lex]error at sensor_detect [ 129.640808] [OV5640@lex]chip found is not an target chip. [ 129.640818] [OV5640@lex]CSI_SUBDEV_PWR_OFF! root@ice001:~#

I use the following ov5640 module:

Any help will be apreciated Thank you BR


You need Sinovoip OV5640 or you need to reverse the pins 180º to make this sensor work.

(Bruno) #14

I tried to reverse the cable, but it seems not possible to simply reverse the cable of my camera. Do you have a simple solution to do it? any idea?

Thanks again for your help.

(bpi team) #15

we ust test our OV5640 module on BPI-M2+