1. 配置前摄的CAM_RST1,SCL2,SDL2,CAM_PDN1,CMMCLK1
| | - 关闭
- [url=]上传图片[/url]
- [url=]网络图片[/url]
| 1. 配置前摄CAM_RST1,SCL2,SDL2,CAM_PDN1,CMMCLK1参数
2. 配置camera(.dts文件)各个参数
3. camera 前摄移植
(1) 添加驱动文件 将camera驱动文件夹ov5648_mipi_raw添加到以下目录中 kernel-4.4\drivers\misc\mediatek\imgsensor\src\mt6771\ov5648sub_mipi_raw vendor\mediatek\proprietary\custom\mt6771\hal\senindepfeature\ov5648sub_mipi_raw
vendor\mediatek\proprietary\custom\mt6771\hal\imgsensor\ver1\ov5648sub_mipi_raw
vendor\mediatek\proprietary\custom\mt6771\hal\imgsensor_metadata\ov5648sub_mipi_raw kernel-4.4\drivers\misc\mediatek\imgsensor\src\common\v1_1\ov5648sub_mipi_raw (2) 修改配置文件 (2.1) device\mediateksample\tb8788p1_64_bsp\ ProjectConfig.mk 作为main camera(主摄)时在CUSTOM_HAL_MAIN_IMGSENSOR ,CUSTOM_KERNEL_MAIN_IMGSENSOR 添加。若为sub camera(副摄) ,则在CUSTOM_HAL_SUB_IMGSENSOR ,CUSTOM_KERNEL_SUB_IMGSENSOR 后添加。CUSTOM_HAL_IMGSENSOR,CUSTOM_KERNEL_IMGSENSOR 主副摄都要添加。 CUSTOM_HAL_IMGSENSOR = ov5648_mipi_raw ov5648sub_mipi_raw CUSTOM_HAL_MAIN_IMGSENSOR = ov5648_mipi_raw CUSTOM_HAL_SUB_IMGSENSOR = ov5648sub_mipi_raw CUSTOM_KERNEL_IMGSENSOR = ov5648_mipi_raw ov5648sub_mipi_raw CUSTOM_KERNEL_MAIN_IMGSENSOR = ov5648_mipi_raw CUSTOM_KERNEL_SUB_IMGSENSOR = ov5648sub_mipi_raw
(2.2) kernel-4.4\arch\arm64\configs\ tb8788p1_64_bsp_debug_defconfig和tb8788p1_64_bsp_defconfig 在kernel中添加的文件夹名,注意要与ProjectConfig.mk的CUSTOM_HAL_IMGSENSOR,CUSTOM_KERNEL_IMGSENSOR 一致,否则编译会报错,主副摄都要添加。 CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov5648_mipi_raw ov5648sub_mipi_raw"
(2.3) device\mediatek\common\kernel-headers\ kd_imgsensor.h /*hal 调用*/ kernel-4.4\drivers\misc\mediatek\imgsensor\ inc\kd_imgsensor.h /*kernel 调用*/ 定义ov5648sub_mipi_raw 的sensorid_ID和设备名 #define OV5648SUBMIPI_SENSOR_ID 0x5649 #define SENSOR_DRVNAME_OV5648SUB_MIPI_RAW "ov5648sub_mipi_raw"
(2.4) kernel-4.4\drivers\misc\mediatek\ imgsensor\src\mt6771\camera_project\tb8788p1_64_bsp\ camera_hw\ imgsensor_cfg_table.c 在sensor_power_sequence[]添加上电电压和时序设置 #if defined(OV5648SUB_MIPI_RAW) { SENSOR_DRVNAME_OV5648_MIPI_RAW, { {SensorMCLK, Vol_High, 0}, {PDN, Vol_Low, 0}, {PDN, Vol_Low, 0}, {DOVDD, Vol_1800, 0}, {AVDD, Vol_2800, 1}, {DVDD, Vol_1500, 1}, {AFVDD, Vol_2800, 5}, {PDN, Vol_High, 1}, {RST, Vol_High, 10} }, }, #endif
(2.5) kernel-4.4\drivers\misc\mediatek\imgsensor\ src\common\v1\imgsensor_sensor_list.c kernel-4.4\drivers\misc\mediatek\imgsensor\ src\common\v1_1\imgsensor_sensor_list.c 在imgsensor_sensor_list.c添加新的传感器驱动程序 #if defined(OV5648_MIPI_RAW) {OV5648SUBMIPI_SENSOR_ID,SENSOR_DRVNAME_OV5648SUB_MIPI_RAW, OV5648SUBMIPISensorInit}, #endif
(2.6) kernel-4.4\drivers\misc\mediatek\imgsensor\ src\common\v1\imgsensor_sensor_list.h kernel-4.4\drivers\misc\mediatek\imgsensor\ src\common\v1_1\imgsensor_sensor_list.h 在imgsensor_sensor_list.h添加新的传感器驱动程序 UINT32 OV5648SUBMIPISensorInit(PSENSOR_FUNCTION_STRUCT *pfFunc);
(2.7) vendor\mediatek\proprietary\custom\mt6771\ hal\imgsensor_src\sensorlist.cpp 在sensorlist.cpp中添加新的传感器驱动程序,并且和imgsensor_sensor_list.c文件中列表中添加的位置一致 #if defined(OV5648SUB_MIPI_RAW) RAW_INFO_M(OV5648SUBMIPI_SENSOR_ID,DEFAULT_MODULE_INDEX,DEFAULT_MODULE_ID,SENSOR_DRVNAME_O V5648SUB_MIPI_RAW, NULL), #endif
驱动马达跟ov5648sub_mipi_raw用同个驱动代码文件,未能实现效果,驱动马达没有跑起来,在找原因
|