MTK camera AF bring up

MTK camera AF bring up


  • MTK camera AF bring up
    • 一DWS配置
    • 二config配置文件
      • Configure camera AF hal driver in ProjectConfigmk
    • 三kernel层
      • 添加AF上下电时序
    • 四hal层
      • 添加lenslist中的定义

一、DWS配置:

1.在DWS里配置好camera AF供电的GPIO。
2.配置好camera AF使用的i2c设备。

二、config配置文件:

1.Configure camera AF hal driver in ProjectConfig.mk

file path:alps/device/mediatek/$project/ProjectConfig.mk

example

CUSTOM_HAL_MAIN_LENS = dw9714af
..............................
CUSTOM_KERNEL_LENS = dw9714af

三、kernel层:

1.添加AF上下电时序:

file path:alps//drivers/misc/mediatek/imgsensor/src/mt6580/camera_hw/kd_camera_hw.c

example
在int kdCISModulePowerOn(CAMERA_DUAL_CAMERA_SENSOR_ENUM SensorIdx, char *currSensorName, BOOL On, char *mode_name) function中添加:

if (currSensorName && (0 == strcmp(SENSOR_DRVNAME_HI846_MIPI_RAW, currSensorName))) {

    ............................................................................................
    /* AF_VCC */
    if (TRUE != _hwPowerOn(VCAMAF, VOL_2800)) {
        PK_DBG("[CAMERA SENSOR] Fail to enable analog power (VCAM_AF),power id = %d\n", VCAMAF);
            goto _kdCISModulePowerOn_exit_;
    }
    mdelay(5);
    ............................................................................................
}

四、hal层:

1.添加lenslist中的定义:

file path:alps/vendor/mediatek/proprietary/custom/mt6580/hal/lens/lenslist.cpp

example

#if defined(DW9714AF)
    {HI846_SENSOR_ID, DW9714AF_LENS_ID, "DW9714AF", pDW9714AF_getDefaultData},
#endif

你可能感兴趣的:(camera)