qcom camera eeprom actuator pdaf bring up

这个是是对qcom camera bring up的补充:https://blog.csdn.net/wing12345678910/article/details/79261931

添加了eeprom actuator pdaf

文档参考sensor的bring up:https://blog.csdn.net/wing12345678910/article/details/79261931

EEPROM
eeprom的添加
在vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/module/sensor/config/xxx_camera.xml
中对应的模组添加eeprom
eeprom的名字 注意该名字要与驱动中名字相对应

修改dtsi文件
kernel/arch/arm/boot/qcom/dts/xxx-camera-sensor-xxx.dtsi
中添加对eeprom的配置
    eeprom0: qcom,eeprom@0 {
        cell-index = <0>;
        compatible = "qcom,eeprom";
        qcom,cci-master = <0>;
        reg = <0x0>;
        cam_vdig-supply = <&pm8937_l23>;
        cam_vana-supply = <&pm8937_l22>;
        cam_vio-supply = <&pm8937_l6>;
        cam_vaf-supply = <&pm8937_l17>;
        qcom,cam-vreg-name = "cam_vdig", "cam_vana", "cam_vio",
                            "cam_vaf";
        qcom,cam-vreg-min-voltage = <1200000 0 2800000 2850000>;    //这里的大多配置参考sensor就可以
        qcom,cam-vreg-max-voltage = <1200000 0 2800000 2850000>;
        qcom,cam-vreg-op-mode = <200000 0 80000 100000>;
        }
sensor中添加:
qcom,camera@0 {
        cell-index = <0>;
        compatible = "qcom,camera";
        reg = <0x0>;
        qcom,csiphy-sd-index = <0>;
        qcom,csid-sd-index = <0>;
        qcom,mount-angle = <270>;
        qcom,led-flash-src = <&led_flash0>;
        qcom,eeprom-src = <&eeprom0>;
        qcom,actuator-src = <&actuator0>;
        cam_vana-supply = <&pm8937_l22>;
        cam_vio-supply = <&pm8937_l6>;
        cam_vaf-supply = <&pm8937_l17>;
...

驱动文件的添加:
vendor/qcom/properietary/mm-camera/mm-camera2/media-controller/module/sensor/eeprom/lib/XXXX/
驱动文件包含三部分:
Android.mk
xxx_eeprom.c
xxx_eeprom.h
.c文件是对读到的数据按照datashit进行解析
.h文件中主要涉及到power_up和power_down,mem_map_array(寄存器的相关设置)

actuator的添加:
actuator的驱动添加基本与eeprom一致
在kernel/arch/arm/boot/qcom/dts/xxx-camera-sensor-xxx.dtsi中添加设备
vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/module/sensor/config/xxx_camera.xml添加配置
vendor/qcom/properietary/mm-camera/mm-camera2/media-controller/module/sensor/actuator/lib/添加驱动文件


pdaf的添加
在vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/module/sensor/sensor/lib/xxx/
目录下添加驱动文件:xxx_pdaf.h xxx_pdaf_flip_mirror.h

注意在sensor的驱动中需要添加对padf的配置:
在res的配置中有:is_pdaf_supported 该值为1说明支持pdaf
  .pdaf_config = {
#ifndef FLIP_MIRROR
    #include "xxx_pdaf.h"
#else
    #include "xxx_pdaf_flip_mirror.h"
#endif
  }

 

你可能感兴趣的:(android_camera)