Transplantation of cmoscamera in quanzhi A31

Source: Internet
Author: User

Recently, several 5 m cameras were evaluated using A31, including ov5640, mt9p001, and ov2710. The advantage of porting different camera drivers under A31 is that the driving structure is normalized and sensor is processed using suddev architecture under video_device. Transplantation under A31 focuses on several configuration files + hardware driver initialization configuration. The purpose of debugging is to run it first and then optimize it.

For the following coms column, we need the following voltage values of the main camera:
Typical 5 m camera chip voltage Configuration

Camera Model I2C address Avdd Dvdd Iodd Reset Pwdn
Samsung s5k4ec 0x5a 2.8 v 1.5 V 2.8 v    
Mt9p001 2.8 v 1.8 V 2.8 v 2.8 v 2.8 v
Ov5640 0x78 2.8 v 1.5 V 2.8 v 2.8 v 2.8 v
Ov2710 3.3 V 1.5 V 1.8 V 1.5 V


Pay attention to the sys_config.fex and init. sun6i. RC files for the configuration file. And the corresponding driver file.

1. For sys_config.fex, focus on the output and core voltage of the camera from the hardware.

The output data FMT indicates raw Bayer data or YUV data. This determines whether to configure sys_config.fex to use A31 ISP or sensor with ISP. For example:

vip_dev0_mname           = "ov2710"vip_dev0_twi_id          = 0vip_dev0_twi_addr        = 0x6cvip_dev0_isp_used        = 1vip_dev0_fmt             = 1vip_dev0_stby_mode       = 0vip_dev0_vflip           = 0vip_dev0_hflip           = 1vip_dev0_iovdd           = "axp22_dldo3"vip_dev0_iovdd_vol       = 2800000vip_dev0_avdd            = "axp22_ldoio0"vip_dev0_avdd_vol        = 2800000vip_dev0_dvdd            = "axp22_eldo1"vip_dev0_dvdd_vol        = 1800000vip_dev0_afvdd           = ""vip_dev0_afvdd_vol       = 2800000

Another one is camera_list_para, which is mainly used for self-detection during driver loading. It indicates that the current camera is subject to self-detection:

[camera_list_para]camera_list_para_used   = 1ov7670                  = 0gc0308                  = 0gt2005                  = 0hi704                   = 0sp0838                  = 0mt9p001                 = 0mt9m113                 = 0gc2035                  = 0ov2655                  = 0hi253                   = 0gc0307                  = 0mt9d112                 = 0ov5640                  = 0ov5647                  = 0gc2015                  = 0ov2643                  = 0gc0329                  = 0gc0309                  = 0tvp5150                 = 0s5k4ec                  = 0ov5650_mv9335           = 0siv121d                 = 0ov2710                  = 1

 

2,

After the basic configuration file is completed (mainly used for vfe of A31), the remaining driver files

Here the sensor driver and cam_detect driver are included (add the corresponding detect source code and update camera_list)

__camera_list_t camera_list[MAX_CAMERA_LIST_ITEM] = {    CAMERA_LIST_ITEM_INIT(ov7670,        1, 1, 0x42, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(gc2035,        1, 1, 0x78, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(gc0308,        1, 1, 0x42, 1, 0, 0, 1, 1, 0),     CAMERA_LIST_ITEM_INIT(gt2005,        2, 1, 0x78, 0, 1, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(hi704,         1, 1, 0x60, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(sp0838,        1, 1, 0x30, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(mt9m112,       1, 2, 0xba, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(mt9m113,       2, 2, 0x78, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(ov2655,        2, 1, 0x60, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(hi253,         1, 1, 0x40, 1, 0, 0, 1, 1, 0),    CAMERA_LIST_ITEM_INIT(gc0307,        1, 1, 0x42, 1, 0, 0, 1, 1, 0),.........};

 

3. Modify init. sun6i. RC and add insmod to load the Ko driver file:

#add mt9p001/ov2710 camerainsmod /system/vendor/modules/mt9p001.koinsmod /system/vendor/modules/ov5640.koinsmod /system/vendor/modules/ov2710.koinsmod /system/vendor/modules/s5k4ec.koinsmod /system/vendor/modules/vfe_v4l2.ko

 


4. Consider whether the camera is a built-in VCM or an out-of-control VCM.

Generally, if the sensor has an ISP, 3A is generally integrated with the built-in VCM. The sensor directly controls the VCM.

The external control means that the processor is responsible for controlling the VCM of the sensor after 3A, and the sensor does not contain the ISP.

Basically, the transplantation of sensor is the modification, configuration, and encoding of the above content.

Transplantation of cmoscamera in quanzhi A31

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.