赞
踩
平台:展讯 系统:Android 7 、8、9应该是一样的 ,10的变化较大,下一篇文章再写。
\vendor\sprd\modules\libcamera\sensor\sensor_drv\classic 目录下放入对应的sensor驱动代码(驱动代码一般是厂商提供)。
修改vendor\sprd\modules\libcamera\sensor sensor_cfg.c
#ifdef GC5005 extern SENSOR_INFO_T g_gc5005_mipi_raw_info; #endif #ifdef GC5024 extern SENSOR_INFO_T g_gc5024_mipi_raw_info; #endif const SENSOR_MATCH_T back_sensor_infor_tab[] = { // gc area #ifdef GC5025 {MODULE_SUNNY, "gc5025", &g_gc5025_mipi_raw_info, {&dw9714_drv_entry, 0}, NULL}, #endif #ifdef S5K3L8 {MODULE_SUNNY, "s5k3l8", &g_s5k3l8xxm3_mipi_raw_info, {&dw9714_drv_entry, 0}, NULL}, #endif #ifdef GC5005 {MODULE_SUNNY, "gc5005", &g_gc5005_mipi_raw_info, {&dw9714_drv_entry, 0}, NULL}, #endif #ifdef GC8024 {MODULE_SUNNY, "gc8024", &g_gc8024_mipi_raw_info, {&dw9714_drv_entry, 0}, NULL}, #endif #ifdef GC030A {MODULE_SUNNY, "gc030a", &g_gc030a_mipi_raw_info, {NULL, 0}, NULL}, #endif ........... {0, "0", NULL, {NULL, 0}, NULL}}; const SENSOR_MATCH_T front_sensor_infor_tab[] = { // gc area #ifdef SUB_GC2385 {MODULE_SUNNY, "sub_gc2385", &g_gc2385_mipi_raw_info, {NULL, 0}, NULL}, #endif #ifdef GC5005 {MODULE_SUNNY, "gc5005", &g_gc5005_mipi_raw_info, {NULL, 0}, NULL}, #endif ................. {0, "0", NULL, {NULL, 0}, NULL}};
修改 device\sprd\sharklj1\kxxxx (此处kxxxx为平台名或项目名)
BoardConfig.mk
CAMERA_SENSOR_TYPE_BACK := "gc5025 gc8024 s5k3l8"
CAMERA_SENSOR_TYPE_FRONT := "sub_gc2385"
kernel4.14/arch/arm/boot/dts
kxxxx.dtsi 电压配置
此处需要查看对应sensor的datasheet明确各路供电是LDO还是PMIC,以及电压是多少。
vddcama: ldo@5 {
reg = <5>;
regulator-name = "vddcama";
sprd,default-microvolt = <1800000>;
sprd,step-microvolt = <10000>;
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3750000>;
regulator-microvolt-offset = <0>;
sprd,hide-offset = <1000>;
};
.mk
添加文件或改动文件的同级或上级mk文件要进行检查,以免出现编译不到的情况。
好了,就简单写到这里,如有疏漏敬请见谅。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。