AD5820 VCM驱动芯片技术规格与应用

5星 · 超过95%的资源 需积分: 34 159 下载量 99 浏览量 更新于2024-07-23 收藏 245KB PDF 举报
"AD5820是一款VCM(Voice Coil Motor)驱动芯片,适用于摄像头开发。该芯片具有100mA的电流下沉能力,支持10位I2C兼容的串行接口,并采用2x3阵列或3x3mm的封装。其特色包括内置电流感应电阻、可选的输出摆率控制、2.3V至5.5V的工作电源范围、10位分辨率的DAC、集成的低噪声前置放大器以及电源下降至0.5μA的低功耗模式。" AD5820是Analog Devices公司推出的一款针对嵌入式系统的VCM驱动芯片,特别适合于摄像头模组的开发。这款芯片的主要特点和功能如下: 1. **电流下沉能力**:AD5820能够提供100mA的电流下沉,这使得它能够有效地驱动VCM,使其在摄像头的对焦机制中发挥关键作用。 2. **10-bit I2C DAC**:芯片内置一个10位分辨率的数字模拟转换器(DAC),通过2线I2C兼容的串行接口进行通信,允许精确地设置电流输出,以实现高精度的VCM位置控制。 3. **封装选项**:AD5820提供两种封装选择,一种是2x3的阵列封装,尺寸为1mm x 1.5mm的WLCSP(无引脚芯片级封装),另一种是3x3mm的LFCSP(低引脚数芯片级封装),这些小尺寸封装适合在空间有限的嵌入式系统中使用。 4. **输出摆率控制**:用户可以通过配置选择不同的输出摆率,以适应不同响应速度的需求。 5. **电源范围**:芯片可以在2.3V到5.5V的电源电压范围内工作,这使得它能够适应多种电源环境。 6. **内置电流感应电阻**:集成的电流感应电阻允许实时监测和控制输出电流,确保VCM驱动的准确性和稳定性。 7. **保证的单调性**:在整个编码器范围内,AD5820保证了单调性,这意味着输出电流会随着输入数字信号的增加而线性增加,不会出现跳跃或不连续的现象。 8. **低功耗模式**:在待机或电源下降模式下,芯片的电流消耗可低至0.5μA,这有助于延长设备的电池寿命。 9. **内部参考**:内置的参考电压源确保了输出电流的稳定性和精度。 10. **低噪声前置放大器**:集成的超低噪声前置放大器提高了信号质量,降低了噪声干扰,从而提高摄像头的成像性能。 AD5820 VCM驱动芯片以其紧凑的封装、高精度的电流控制和低功耗特性,成为嵌入式摄像头系统设计中的理想选择。结合其I2C接口和丰富的功能集,使得它易于集成到各种硬件平台中,实现高效、可靠的VCM驱动。
2016-08-16 上传
索智的SC5806开发板的BSP编译手册v1.2.txt 开始时间2016/8/12 18:46 结束时间2016/8/16 10:47 1、下载索智的SC5806的BSP。通过ftp下载。 地址:ftp://sochip.com.cn 账号:SC5806 密码:SC5806201601081633 Xftp 5使用自动传输BSP有点问题。ftp的传输模式有ASCII和 二进制模式。 BSP需要设置为 二进制模式。LeapFTP3.0.1.46_yfy 自动设置为二进制模式了。 估计 Xftp 5 因为设置为ASCII模式最后老是下载不完整。 2、BSP的android包的分块合并 及 解压缩: cat SC5806.android.aa SC5806.android.ab > r58_android_sc5806_20160811.tar.gz rootroot@rootroot-E400:~/wyb/r58_evb_sc5806$ tar zxvf r58_android_sc5806_20160811.tar.gz tar zxvf SC5806.lichee.tar.gz 3、编译lichee内核的时候出现modules中的软链接失效的问题的解决: cp sunxi_schw.ko /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/output/lib/modules/3.4.39/ make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/aw_schw” build gpu module for sun8iw6 android /bin/sh: 1: arm-linux-gnueabi-arm-linux-gnueabi-gcc: not found make:进入目录'/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android' CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/osfunc.o CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mutils.o 没有那个文件或目录 CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mmap.o arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. 没有那个文件或目录 make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/osfunc.o] 错误 1 make[3]: *** 正在等待未完成的任务.... arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mutils.o] 错误 1 有那个文件或目录 arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mmap.o] 错误 1 make[2]: *** [_module_/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild] 错误 2 make[1]: *** [kbuild] 错误 2 make: *** [build] 错误 2 make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android” ERROR: build kernel Failed rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd .. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806$ 进入到文件osfunc.c所在的目录: rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4$ ll 总用量 16 drwxr-xr-x 4 rootroot rootroot 4096 7月 28 15:33 ./ drwxr-xr-x 4 rootroot rootroot 4096 7月 28 16:06 ../ drwxr-xr-x 6 rootroot rootroot 4096 7月 28 15:33 srvkm/ drwxr-xr-x 3 rootroot rootroot 4096 7月 28 15:33 system/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4$ cd srvkm/env/linux/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux$ ll 总用量 64 drwxr-xr-x 2 rootroot rootroot 4096 7月 28 16:06 ./ drwxr-xr-x 3 rootroot rootroot 4096 7月 28 15:33 ../ lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 event.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/event.c lrwxrwxrwx 1 rootroot rootroot 104 7月 28 15:33 ion.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/ion.c lrwxrwxrwx 1 rootroot rootroot 105 7月 28 15:33 mmap.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mmap.c lrwxrwxrwx 1 rootroot rootroot 103 7月 28 15:33 mm.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mm.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 module.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/module.c lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 mutex.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mutex.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 mutils.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mutils.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 osfunc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/osfunc.c lrwxrwxrwx 1 rootroot rootroot 110 7月 28 15:33 osperproc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/osperproc.c lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 pdump.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pdump.c lrwxrwxrwx 1 rootroot rootroot 105 7月 28 15:33 proc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/proc.c lrwxrwxrwx 1 rootroot rootroot 113 7月 28 15:33 pvr_bridge_k.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_bridge_k.c lrwxrwxrwx 1 rootroot rootroot 110 7月 28 15:33 pvr_debug.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_debug.c lrwxrwxrwx 1 rootroot rootroot 109 7月 28 15:33 pvr_sync.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_sync.c rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux$ 既可以发现这里文件都是红色标示的:软链接失败。 event.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/event.c 很显然,这是索智的一个叫king的工程师连接到了他自己的目录了。 我们自己在编译系统的时候,在本机不可能有他的目录,100%就出错了。 给出一种解决方法: rm ~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 -rf ln -s /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/services4 /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 设想1(扩展,经过验证出错!!!!):直接删除软连接的services4,然后拷贝过来链接源的services4,理论上应该也是可以的! 这样就不用每次都删除链接,然后再新建链接了!!!! rm ~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 -rf rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ tar zcvf services4_bak.tar.gz services4/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ cp services4_bak.tar.gz /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild$ tar zxvf services4_bak.tar.gz build gpu module for sun8iw6 android /bin/sh: 1: arm-linux-gnueabi-arm-linux-gnueabi-gcc: not found make:进入目录'/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android' eurasiacon/build/linux2/modules.mk:47: *** In makefile services4/srvkm/env/linux/Linux.mk: Duplicate module srvkm (first seen in eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/Linux.mk) listed in $(modules)。 停止。 make: *** [build] 错误 2 make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android” ERROR: build kernel Failed rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ 只能每次都软链接目录(使用绝对路径) 或者一次性解决问题(挨个文件使用相对路径链接好之后打包/有能力的同学可以使用脚本来完成) 设想2(未经验证):比对两个services4中的C文件,使用比对工具拷贝过来覆盖!!!! rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 1. sun8iw1p1 2. sun8iw3p1 3. sun8iw5p1 4. sun8iw6p1 5. sun8iw7p1 6. sun8iw8p1 7. sun8iw9p1 8. sun9iw1p1 Choice: 4 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. f1 1. fpga 2. n1 3. perf1_v1_0 4. perf2_v1_0 5. perf3_v1_0 6. qc 7. sc5806 Choice: 7 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd ../android/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ source build/envsetup.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ lunch 14. octopus_sc5806-eng Which would you like? [aosp_arm-eng] 14 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ extract-bsp rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ make -j8 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ pack 这样编译的系统LCD可以显示。TP不能用。 注意:加载TP的方法。 由于索智SC5806给过来的IMG是可以支持TP的,不过lsmod的时候并没有发现加载的触摸屏ko:gslX8600new.ko (r58_sochip_sc5806_1.4_1.0_v4.zip:r58_sochip_sc5806_1.4_1.0_v4.img) shell@octopus-sc5806:/ $ su shell@octopus-sc5806:/ # lsmod sunxi_schw 13015 0 - Live 0x00000000 (O) sunxi_gmac 21580 0 - Live 0x00000000 cdc_ether 3163 0 - Live 0x00000000 rtl8150 9023 0 - Live 0x00000000 mcs7830 5644 0 - Live 0x00000000 qf9700 5904 0 - Live 0x00000000 asix 13590 0 - Live 0x00000000 usbnet 14128 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000 sunxi_keyboard 3293 0 - Live 0x00000000 bma250 7848 0 - Live 0x00000000 vfe_v4l2 1197152 0 - Live 0x00000000 imx179 8639 0 - Live 0x00000000 ov8865_4lane 13556 0 - Live 0x00000000 ad5820_act 4578 0 - Live 0x00000000 dw9714_act 4077 0 - Live 0x00000000 vfe_subdev 4691 3 vfe_v4l2,imx179,ov8865_4lane, Live 0x00000000 vfe_os 4113 2 vfe_v4l2,vfe_subdev, Live 0x00000000 actuator 944 2 ad5820_act,dw9714_act, Live 0x00000000 cci 23760 5 vfe_v4l2,imx179,ov8865_4lane,ad5820_act,dw9714_act, Live 0x00000000 videobuf_dma_contig 4165 1 vfe_v4l2, Live 0x00000000 videobuf_core 16528 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 pvrsrvkm 279395 33 - Live 0x00000000 (O) bcmdhd 630372 0 - Live 0x00000000 hdmi 38647 0 - Live 0x00000000 disp 1039537 6 hdmi, Live 0x00000000 sunxi_tr 9348 1 disp, Live 0x00000000 nand 299831 0 - Live 0x00000000 (O) shell@octopus-sc5806:/ # R:\wyb\r58_evb_sc5806\lichee\tools\pack\chips\sun8iw6p1\configs\sc5806\sys_config.fex ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;external int function ;wakeup output function ;notice --- tp_int_port & tp_io_port use the same port ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gsl1688_r58h720" ctp_gesture_wakeup = 0 ctp_twi_id = 0 ctp_twi_addr = 0x40 ;ctp_name = "gsl1688_r58h720" ctp_screen_max_x = 720 ctp_screen_max_y = 1280 ctp_revert_x_flag = 0 ctp_revert_y_flag = 0 ctp_exchange_x_y_flag = 0 ctp_int_port = port:PL07<6><default><3><default> ctp_wakeup = port:PL06<1><default><3><1> ctp_power_ldo = "vcc-ctp" ctp_power_ldo_vol = 3000 ctp_power_io = shell@octopus-sc5806:/ # shell@octopus-sc5806:/ # cd /sys/class/i2c-adapter/i2 i2c-0/ i2c-1/ sys/class/i2c-adapter/i2c-0 < shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0 # ll drwxr-xr-x root root 1970-01-02 08:08 0-001a drwxr-xr-x root root 1970-01-02 08:08 0-0040 --w------- root root 4096 1970-01-02 08:08 delete_device lrwxrwxrwx root root 1970-01-02 08:08 device -> ../../twi.0 -r--r--r-- root root 4096 1970-01-02 08:08 name --w------- root root 4096 1970-01-02 08:08 new_device drwxr-xr-x root root 1970-01-02 08:08 power lrwxrwxrwx root root 1970-01-02 08:08 subsystem -> ../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:08 uevent shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0 # cd 0-0040 shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # ll lrwxrwxrwx root root 1970-01-02 08:08 driver -> ../../../../../bus/i2c/drivers/gslX680 drwxr-xr-x root root 1970-01-02 08:08 input -r--r--r-- root root 4096 1970-01-02 08:08 modalias -r--r--r-- root root 4096 1970-01-02 08:08 name drwxr-xr-x root root 1970-01-02 08:08 power lrwxrwxrwx root root 1970-01-02 08:08 subsystem -> ../../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:08 uevent shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # cat name gslX680 shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # 判断触摸屏的驱动应该是硬件编译进去的。 思路1: 系统刷机之后,在串口在执行: shell@octopus-sc5806:/system/vendor/modules # su 255|shell@octopus-sc5806:/system/vendor/modules # insmod gslX680new.ko insmod: init_module 'gslX680new.ko' failed (Exec format error) 255|shell@octopus-sc5806:/system/vendor/modules # 出错了。 思路2: R:\wyb\r58_evb_sc5806\android\device\softwinner\octopus-sc5806\init.sun8i.rc # use automatic detecttion insmod ctp & gsensor driver #insmod /system/vendor/modules/sw-device.ko #insmod /system/vendor/modules/gslX680new.ko(打开这里还是有问题) insmod /system/vendor/modules/bma250.ko 在init.rc中直接挂载gslX8600new.ko不可行。 思路3: 直接在menuconfig中设置选中编译:gslX8600new.ko。 编译android的时候报错误。extract-bsp需要拷贝这个ko文件。也许可以通过修改配置文件来解决。 思路4: 正常编译后,在menuconfig中设置选中编译:gslX8600new.ko,然后编译内核,在android中make bootimage。还是有问题。 思路5: 正常编译后,在menuconfig中设置选中编译:gslX8600new.ko,然后重新编译内核(make clean),在android中make bootimage。 当然,只需要保存R:\wyb\r58_evb_sc5806\lichee\linux-3.4\.config,下次编译的时候直接把.config这个文件拷贝过去就可以了。 这样只需要编译一次内核就好!!!! rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ make clean rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ cd .. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 1. sun8iw1p1 2. sun8iw3p1 3. sun8iw5p1 4. sun8iw6p1 5. sun8iw7p1 6. sun8iw8p1 7. sun8iw9p1 8. sun9iw1p1 Choice: 4 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. f1 1. fpga 2. n1 3. perf1_v1_0 4. perf2_v1_0 5. perf3_v1_0 6. qc 7. sc5806 Choice: 7 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ make ARCH=arm menuconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf Kconfig drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported # # configuration written to .config # *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ 修改步骤: Device Drivers ---> Input device support ---> [*] Touchscreens ---> <M> gslX680NEW touchscreen driver 请将: <M> gslX680NEW touchscreen driver 修改为: <*> gslX680NEW touchscreen driver 即可。 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd ../android/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ source build/envsetup.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ lunch 14. octopus_sc5806-eng Which would you like? [aosp_arm-eng] 14 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ extract-bsp rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ make bootimage rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ pack 重新刷机,这样就可以了。
2016-11-14 上传
wen_ov5640_r16_20161114_1744后插入UVC可以打开ov5640和USB摄像头.7z 20161114全志R16配置为前ov5640后UVC的双摄像头 1、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\configs\camera.cfg 修改: number_of_camera = 1 为: number_of_camera = 2 如果不改这里,兄弟,你在camera这个APP里面是绝对看不到前后摄像头的切换选项的!!!!^_ 修改ov5640的分辨率: used_preview_size = 1 key_support_preview_size = 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 640x480 key_default_picture_size = 640x480 为(根据你驱动里面的摄像头的寄存器配置分辨率而实际修改): used_preview_size = 1 key_support_preview_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_picture_size = 640x480 2、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\astar_evb20.mk #include device/softwinner/polaris-common/prebuild/google/products/gms_minimal.mk 注释掉这里干掉Google Play。可以不改。 3、这里讲UVC配置为模块了,请注意UVC所需要的模块的加载顺序。 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\init.sun8i.rc 默认为: #csi module insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko insmod /system/vendor/modules/cam_detect.ko # insmod /system/vendor/modules/actuator.ko # insmod /system/vendor/modules/ad5820_act.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/gc0307.ko # insmod /system/vendor/modules/ov2035.ko insmod /system/vendor/modules/vfe_v4l2.ko 修改为: #csi module # /dev/video0 ov5640 insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko #insmod /system/vendor/modules/cam_detect.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/ov5640.ko insmod /system/vendor/modules/vfe_v4l2.ko # /dev/video1 uvc insmod /system/vendor/modules/videobuf2-core.ko insmod /system/vendor/modules/videobuf2-memops.ko insmod /system/vendor/modules/videobuf2-vmalloc.ko insmod /system/vendor/modules/uvcvideo.ko 4、 Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg 推荐修改: bootdelay=0 为: bootdelay=3 5、不用修改: Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\evb-20\sys_config.fex ;-------------------------------------------------------------------------------- ;vip (video input port) configuration ;vip_used: 0:disable 1:enable ;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer ;vip_dev_qty: The quantity of devices linked to capture bus ; ;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and ; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! ; ;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! ; ;vip_dev(x)_isp_used 0:not use isp 1:use isp ;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb ;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby ;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable ;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable ;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply ;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply ;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply ;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply ;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply ;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply ;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply ;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply ;x indicates the index of the devices which are linked to the same capture bus ;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 ;fill handle string as below: ;axp22_eldo3 ;axp22_dldo4 ;axp22_eldo2 ;fill handle string "" when not using any pmu power supply ;-------------------------------------------------------------------------------- [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00 vip_csi_mck = port:PE01 vip_csi_hsync = port:PE02 vip_csi_vsync = port:PE03 vip_csi_d0 = port:PE04 vip_csi_d1 = port:PE05 vip_csi_d2 = port:PE06 vip_csi_d3 = port:PE07 vip_csi_d4 = port:PE08 vip_csi_d5 = port:PE09 vip_csi_d6 = port:PE10 vip_csi_d7 = port:PE11 vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 vip_dev0_mname = "ov5640" vip_dev0_pos = "rear" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 0x78 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 1 vip_dev0_vflip = 0 vip_dev0_hflip = 0 vip_dev0_iovdd = "axp22_dldo3" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = vip_dev0_reset = port:PE14 vip_dev0_pwdn = port:PE15 vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = [usbc1] usb_used = 1 usb_drv_vbus_gpio = port:PD12 usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 编译内核之后, rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-rtl8723bs 4. sc3813r Choice: 2 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh 配置USB摄像头为模块(也可以选择*直接编译进内核): rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> Multimedia support ---> [*] Video capture adapters ---> 修改: [ ] V4L USB devices ---> 为: [*] V4L USB devices ---> 修改: USB Video Class (UVC) (NEW) 为 USB Video Class (UVC) rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ cd .. rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd ../android/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ source build/envsetup.sh including device/softwinner/bellone-sc3813r/vendorsetup.sh including device/softwinner/astar-evb20/vendorsetup.sh including device/softwinner/r16-bell-one/vendorsetup.sh including device/softwinner/astar-evb/vendorsetup.sh including device/softwinner/polaris-common/vendorsetup.sh including device/lge/mako/vendorsetup.sh including device/lge/hammerhead/vendorsetup.sh including device/samsung/manta/vendorsetup.sh including device/generic/x86/vendorsetup.sh including device/generic/mips/vendorsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/asus/tilapia/vendorsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/grouper/vendorsetup.sh including device/asus/flo/vendorsetup.sh including sdk/bash_completion/adb.bash rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. bellone_sc3813r-eng 6. astar_evb20-eng 7. r16_bell_one-eng 8. astar_evb-eng 9. aosp_mako-userdebug 10. aosp_hammerhead-userdebug 11. aosp_manta-userdebug 12. mini_x86-userdebug 13. mini_mips-userdebug 14. mini_armv7a_neon-userdebug 15. aosp_tilapia-userdebug 16. aosp_deb-userdebug 17. aosp_grouper-userdebug 18. aosp_flo-userdebug Which would you like? [aosp_arm-eng] 6 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.2 TARGET_PRODUCT=astar_evb20 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 HOST_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=KVT49L OUT_DIR=out ============================================ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ extract-bsp rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ make -j12 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ pack 编译好系统之后,刷机之后请注意先让开发板的Android4.4启动完成之后再插入USB摄像头。 全志R16的android4.4启动之后再插入USB摄像头。 这个配置就可以设置 ov5640为后置摄像头:/dev/video0 UVC为前置摄像头:/dev/video1 如果接上USB摄像头再启动,android是被: ov5640为前置摄像头,有设备节点/dev/video1,打开失败。 UVC为后置摄像头:/dev/video0 原因未知。 参考资料: http://blog.csdn.net/u010257920/article/details/49925807 A20 linux(dragonboard)同时使用Parallel CSI Camera及UVC http://blog.csdn.net/guoyihoney/article/details/46966603 A20平台增加camera http://blog.csdn.net/it_fish_man/article/details/17395469 Android usb camera设备添加 http://blog.csdn.net/zmnqazqaz/article/details/49535531 RK3288 uvc摄像头调试 http://blog.csdn.net/edsam49/article/details/8886543 USB Camera在android车机上应用前景及初试小结