Camera Actuator bringup

参考资料:极客笔记
 
Actuator就是AF控制模块,自动对焦的,集成在camera模组中
 
如下为AF的xml部分配置信息:
   <!--Actuator slave information -->
   <slaveInfo>
     <!--Name of the actuator -->
     <actuatorName>dw9763</actuatorName>
     <!--8-bit or 10-bit write slave address -->
     <slaveAddress>0x18</slaveAddress>
     <!--I2C frequency mode of slave
         Supported modes are: STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz), CUSTOM (Custom frequency in DTSI) -->
     <i2cFrequencyMode>FAST</i2cFrequencyMode>
     <!--Actuator type
         Supported types are: VCM, BIVCM -->
     <actuatorType>VCM</actuatorType>
     <!--Data width in bits -->
     <dataBitWidth>10</dataBitWidth>
     <!--Sequence of power configuration type and configuration value required to control power to the device -->
     <powerUpSequence>
       <!--Power setting configuration
           Contains: configType, configValue and delay in milli seconds -->
       <powerSetting>
         <!--Power configuration type
             Supported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY -->
         <configType>VAF</configType>
         <!--Configuration value for the type of configuration -->
         <configValue>0</configValue>
         <!--Delay in milli seconds -->
         <delayMs>1</delayMs>
       </powerSetting>
     </powerUpSequence>
     <!--Sequence of power configuration type and configuration value required to control power to the device -->
     <powerDownSequence>
       <!--Power setting configuration
           Contains: configType, configValue and delay in milli seconds -->
       <powerSetting>
         <!--Power configuration type
             Supported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY -->
         <configType>VAF</configType>
         <!--Configuration value for the type of configuration -->
         <configValue>0</configValue>
         <!--Delay in milli seconds -->
         <delayMs>1</delayMs>
       </powerSetting>
... ... 
包含四个部分:
slaveInfo    // 设备的硬件信息,如设备地址,上下电
registerConfig   // DAC register配置信息
initSettings    // Actuator初始化配置
tunedParams    // 平台配置信息
 

slaveInfo部分:

参数名
说明
actuatorName
eeprom类型的名字
slaveAddress
i2c address
i2cFrequencyMode
i2c操作频率,STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz)
actuatorType
马达类型,比如VCM/BIVCM
datdaBitWidth
dac位宽
powerUpsequence-/powerUpsequence
powerDownsequence-/powerDownsequence
上下点控制节点,就一个VAF,电都不需要供的话就没有
BIVCM可以正负两个方向的电流
 

registerConfig部分:

参数名
说明
regAddrType
地址类型
regDataType
数据类型
registerAddr
寄存器地址
registerData
寄存器值
operation
写dac操作,WRITE_DAC_VALUE
delayUs
延迟微妙
hwMask
未使用
hwShift
未使用
dataShift
dac值的偏移
 

initSettings部分:

参数名
说明
registerAddr
IC寄存器地址
registerData
IC寄存器的值
regAddrType
地址类型
regDataType
数据类型
operation
WRITE,I2C写
delayUs
延迟微妙
 

tunedParams部分:

参数名
说明
initialCode
会被OTP烧录的infinity DAC覆盖
macroStepBoundary
Table size,一般填400,最大也是400
infinityStepBoundary
必须填0
codePerStep
未使用
qValue
未使用
ringingScenario
高通固定值,400,未使用
dampingStep
dac最大值,未使用
dampingDelayUs
延时,未使用
hwparams
移动方向,控制镜头移动方向
 

验证方法:

打开骁龙相机查看有没有对焦
echo "logInfoMask=0x2" >> /vendor/etc/camera/camxoverridesettings.txt
adb logcat |grep "actuator"
查看关键log,马达是否移动,是否focus
 
Actuator设备树配置:
 actuator_rear: qcom,actuator0 {
         cell-index = <0>;
         compatible = "qcom,actuator";
         cci-master = <0>;
         cam_vaf-supply = <&pm8150a_l7>;
         regulator-names = "cam_vaf";
         rgltr-cntrl-support;
         rgltr-min-voltage = <2856000>;
         rgltr-max-voltage = <3104000>;
         rgltr-load-current = <100000>;
 };
马达没供电,都不用写后面六行
 
 
 
 
 
 
posted @ 2024-03-29 00:59  lethe1203  阅读(71)  评论(0编辑  收藏  举报