From 871480933a1c28f8a9fed4c4d34d06c439a7a422 Mon Sep 17 00:00:00 2001
From: Srikant Patnaik
Date: Sun, 11 Jan 2015 12:28:04 +0530
Subject: Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
---
drivers/media/video/wmt_v4l2/Kconfig | 6 +
drivers/media/video/wmt_v4l2/Makefile | 13 +
drivers/media/video/wmt_v4l2/sensors/Kconfig | 13 +
drivers/media/video/wmt_v4l2/sensors/Makefile | 49 +
.../media/video/wmt_v4l2/sensors/bf3703/bf3703.c | 326 ++
.../media/video/wmt_v4l2/sensors/bf3703/bf3703.h | 269 ++
.../media/video/wmt_v4l2/sensors/bf3920/bf3920.c | 330 ++
.../media/video/wmt_v4l2/sensors/bf3920/bf3920.h | 514 +++
.../media/video/wmt_v4l2/sensors/bf3a03/bf3a03.c | 335 ++
.../media/video/wmt_v4l2/sensors/bf3a03/bf3a03.h | 391 ++
drivers/media/video/wmt_v4l2/sensors/cmos-subdev.c | 155 +
drivers/media/video/wmt_v4l2/sensors/cmos-subdev.h | 108 +
drivers/media/video/wmt_v4l2/sensors/flash/flash.c | 54 +
drivers/media/video/wmt_v4l2/sensors/flash/flash.h | 36 +
.../video/wmt_v4l2/sensors/flash/flash_eup2471.c | 131 +
.../video/wmt_v4l2/sensors/flash/flash_eup3618.c | 124 +
.../video/wmt_v4l2/sensors/flash/flash_gpio.c | 103 +
.../video/wmt_v4l2/sensors/flash/flash_ktd231.c | 156 +
.../video/wmt_v4l2/sensors/flash/flash_sgm3780.c | 207 +
.../sensors/gc0307/gc0307-twv82222z2-f10.h | 624 +++
.../media/video/wmt_v4l2/sensors/gc0307/gc0307.c | 371 ++
.../media/video/wmt_v4l2/sensors/gc0307/gc0307.h | 567 +++
.../video/wmt_v4l2/sensors/gc0308/gc0308-7303.h | 450 +++
.../video/wmt_v4l2/sensors/gc0308/gc0308-7304.h | 546 +++
.../video/wmt_v4l2/sensors/gc0308/gc0308-781a.h | 448 +++
.../sensors/gc0308/gc0308-gsg5-001gt7204-g3.h | 451 +++
.../sensors/gc0308/gc0308-gsg5-001gt7204-g3_qx.h | 451 +++
.../wmt_v4l2/sensors/gc0308/gc0308-gt7302-gmt.h | 609 +++
.../sensors/gc0308/gc0308-jfs0672-clw-gt7305.h | 481 +++
.../wmt_v4l2/sensors/gc0308/gc0308-kyt-110_v1.0.h | 446 +++
.../wmt_v4l2/sensors/gc0308/gc0308-kyt-173_v1.0.h | 446 +++
.../wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1.h | 452 +++
.../sensors/gc0308/gc0308-mrs-gt7305_v1_qx.h | 452 +++
.../wmt_v4l2/sensors/gc0308/gc0308-syx-gt7206.h | 446 +++
.../wmt_v4l2/sensors/gc0308/gc0308-yb474-gt7303.h | 465 +++
.../wmt_v4l2/sensors/gc0308/gc0308-zh_tvbox.h | 447 +++
.../wmt_v4l2/sensors/gc0308/gc0308-zyhb-twd8802.h | 447 +++
.../media/video/wmt_v4l2/sensors/gc0308/gc0308.c | 378 ++
.../media/video/wmt_v4l2/sensors/gc0308/gc0308.h | 530 +++
.../video/wmt_v4l2/sensors/gc0308/gc0308_7300_hd.h | 424 ++
.../video/wmt_v4l2/sensors/gc0308/gc0308_8335c.h | 424 ++
.../video/wmt_v4l2/sensors/gc0308/gc0308_8353.h | 457 +++
.../wmt_v4l2/sensors/gc0309/gc0309-zyhb0309.h | 725 ++++
.../media/video/wmt_v4l2/sensors/gc0309/gc0309.c | 346 ++
.../media/video/wmt_v4l2/sensors/gc0309/gc0309.h | 737 ++++
.../media/video/wmt_v4l2/sensors/gc0311/gc0311.c | 224 ++
.../media/video/wmt_v4l2/sensors/gc0311/gc0311.h | 444 +++
.../wmt_v4l2/sensors/gc0328/gc0328-gt7302-gmt.h | 686 ++++
.../wmt_v4l2/sensors/gc0328/gc0328-wave7_cold.h | 606 +++
.../wmt_v4l2/sensors/gc0328/gc0328-wave7_warm.h | 605 +++
.../media/video/wmt_v4l2/sensors/gc0328/gc0328.c | 346 ++
.../media/video/wmt_v4l2/sensors/gc0328/gc0328.h | 604 +++
.../wmt_v4l2/sensors/gc0328/gc0328_kyt111_v7.h | 604 +++
.../wmt_v4l2/sensors/gc0328/gc0328_ra474a_v7.h | 624 +++
.../video/wmt_v4l2/sensors/gc0329/gc0329-3nod.h | 550 +++
.../wmt_v4l2/sensors/gc0329/gc0329-3nod_TL070VA5.h | 560 +++
.../video/wmt_v4l2/sensors/gc0329/gc0329-jmt781.h | 496 +++
.../wmt_v4l2/sensors/gc0329/gc0329-kyt-174-v7.h | 992 +++++
.../video/wmt_v4l2/sensors/gc0329/gc0329-zh1426.h | 530 +++
.../media/video/wmt_v4l2/sensors/gc0329/gc0329.c | 345 ++
.../media/video/wmt_v4l2/sensors/gc0329/gc0329.h | 530 +++
.../video/wmt_v4l2/sensors/gc0329/gc0329_shuttle.h | 560 +++
.../wmt_v4l2/sensors/gc0329/gc0329_style_s729.h | 530 +++
.../media/video/wmt_v4l2/sensors/gc2015/gc2015.c | 225 ++
.../media/video/wmt_v4l2/sensors/gc2015/gc2015.h | 601 +++
.../video/wmt_v4l2/sensors/gc2035/gc2035-3nod.h | 1024 +++++
.../video/wmt_v4l2/sensors/gc2035/gc2035-781a.h | 1027 +++++
.../video/wmt_v4l2/sensors/gc2035/gc2035-8335c.h | 899 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-forfun-v91.h | 1105 ++++++
.../wmt_v4l2/sensors/gc2035/gc2035-htr_t75v.h | 1040 +++++
.../video/wmt_v4l2/sensors/gc2035/gc2035-jmt781.h | 954 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-kyt110_v7.h | 1042 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-mid8-wms8368.h | 1025 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-rb352a_v7.h | 914 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-rb357a_v7.h | 914 +++++
.../video/wmt_v4l2/sensors/gc2035/gc2035-shutter.c | 441 +++
.../wmt_v4l2/sensors/gc2035/gc2035-tvboxh2-ori.h | 1064 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-v7_maz7z233.h | 1105 ++++++
.../sensors/gc2035/gc2035-xhb_gbeffz2743l.h | 1023 +++++
.../video/wmt_v4l2/sensors/gc2035/gc2035-zh1426.h | 954 +++++
.../wmt_v4l2/sensors/gc2035/gc2035-zh1547a-tp785.h | 1030 +++++
.../media/video/wmt_v4l2/sensors/gc2035/gc2035.c | 390 ++
.../media/video/wmt_v4l2/sensors/gc2035/gc2035.h | 1105 ++++++
.../sensors/gc2035/gc2035_pid10_hl_pc1089.h | 1158 ++++++
.../sensors/gc2035/gc2035_pid13_hl_pc1388.h | 1152 ++++++
.../media/video/wmt_v4l2/sensors/gc2155/gc2155.c | 388 ++
.../media/video/wmt_v4l2/sensors/gc2155/gc2155.h | 1074 +++++
.../video/wmt_v4l2/sensors/hi253/hi253-bk-wave7.h | 2147 ++++++++++
.../sensors/hi253/hi253-jfs0672-clw-gt7305.h | 2159 +++++++++++
.../wmt_v4l2/sensors/hi253/hi253-mrs-gt7305_v1.h | 2133 ++++++++++
.../video/wmt_v4l2/sensors/hi253/hi253-mrs-wave7.h | 2147 ++++++++++
.../wmt_v4l2/sensors/hi253/hi253-syx-gt7206.h | 2159 +++++++++++
.../video/wmt_v4l2/sensors/hi253/hi253-wave7.h | 2128 ++++++++++
drivers/media/video/wmt_v4l2/sensors/hi253/hi253.c | 333 ++
drivers/media/video/wmt_v4l2/sensors/hi253/hi253.h | 2124 ++++++++++
drivers/media/video/wmt_v4l2/sensors/hi257/hi257.c | 333 ++
drivers/media/video/wmt_v4l2/sensors/hi257/hi257.h | 2195 +++++++++++
.../video/wmt_v4l2/sensors/hi257/hi257_kyt162_v7.h | 2195 +++++++++++
.../media/video/wmt_v4l2/sensors/nmi5625/Makefile | 4 +
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.c | 158 +
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.h | 219 ++
.../wmt_v4l2/sensors/nmi5625/nmidrv_custom_wmt.h | 70 +
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.c | 484 +++
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.h | 14 +
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.c | 435 +++
.../video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.h | 42 +
.../media/video/wmt_v4l2/sensors/nt99141/nt99141.c | 448 +++
.../media/video/wmt_v4l2/sensors/nt99141/nt99141.h | 537 +++
.../media/video/wmt_v4l2/sensors/ov2640/ov2640.h | 66 +
.../media/video/wmt_v4l2/sensors/ov2643/ov2643.c | 329 ++
.../media/video/wmt_v4l2/sensors/ov2643/ov2643.h | 380 ++
.../media/video/wmt_v4l2/sensors/ov2659/ov2659.c | 346 ++
.../media/video/wmt_v4l2/sensors/ov2659/ov2659.h | 1197 ++++++
.../media/video/wmt_v4l2/sensors/ov3640/ov3640.h | 3620 +++++++++++++++++
.../media/video/wmt_v4l2/sensors/ov3660/ov3660.c | 209 +
.../media/video/wmt_v4l2/sensors/ov3660/ov3660.h | 598 +++
.../wmt_v4l2/sensors/ov5640/ov5640-mid8-wms8368.h | 1296 +++++++
.../media/video/wmt_v4l2/sensors/ov5640/ov5640.c | 572 +++
.../media/video/wmt_v4l2/sensors/ov5640/ov5640.h | 1296 +++++++
.../wmt_v4l2/sensors/ov5640/ov5640_firmware.h | 4095 ++++++++++++++++++++
.../media/video/wmt_v4l2/sensors/ov7675/ov7675.c | 321 ++
.../media/video/wmt_v4l2/sensors/ov7675/ov7675.h | 258 ++
.../media/video/wmt_v4l2/sensors/ov9740/ov9740.c | 348 ++
.../media/video/wmt_v4l2/sensors/ov9740/ov9740.h | 688 ++++
.../media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.c | 374 ++
.../media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.h | 3288 ++++++++++++++++
.../media/video/wmt_v4l2/sensors/sid130b/sid130b.c | 328 ++
.../media/video/wmt_v4l2/sensors/sid130b/sid130b.h | 957 +++++
.../media/video/wmt_v4l2/sensors/siv120d/siv120d.c | 332 ++
.../media/video/wmt_v4l2/sensors/siv120d/siv120d.h | 485 +++
.../wmt_v4l2/sensors/siv121d/siv121d-kyt-093-du.h | 1128 ++++++
.../media/video/wmt_v4l2/sensors/siv121d/siv121d.c | 337 ++
.../media/video/wmt_v4l2/sensors/siv121d/siv121d.h | 1128 ++++++
.../wmt_v4l2/sensors/sp0718/sp0718-gt7302-gmt.h | 992 +++++
.../media/video/wmt_v4l2/sensors/sp0718/sp0718.c | 344 ++
.../media/video/wmt_v4l2/sensors/sp0718/sp0718.h | 990 +++++
.../media/video/wmt_v4l2/sensors/sp0838/sp0838.c | 326 ++
.../media/video/wmt_v4l2/sensors/sp0838/sp0838.h | 788 ++++
.../media/video/wmt_v4l2/sensors/sp0a19/sp0a19.c | 344 ++
.../media/video/wmt_v4l2/sensors/sp0a19/sp0a19.h | 667 ++++
.../media/video/wmt_v4l2/sensors/sp2518/sp2518.c | 326 ++
.../media/video/wmt_v4l2/sensors/sp2518/sp2518.h | 1221 ++++++
.../video/wmt_v4l2/sensors/template/template.h | 219 ++
drivers/media/video/wmt_v4l2/sensors/wmt-cmos.c | 1264 ++++++
drivers/media/video/wmt_v4l2/sensors/wmt-cmos.h | 0
drivers/media/video/wmt_v4l2/wmt-vid.c | 820 ++++
drivers/media/video/wmt_v4l2/wmt-vid.h | 168 +
drivers/media/video/wmt_v4l2/wmt-vidreg.h | 87 +
148 files changed, 102426 insertions(+)
create mode 100755 drivers/media/video/wmt_v4l2/Kconfig
create mode 100755 drivers/media/video/wmt_v4l2/Makefile
create mode 100755 drivers/media/video/wmt_v4l2/sensors/Kconfig
create mode 100755 drivers/media/video/wmt_v4l2/sensors/Makefile
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/cmos-subdev.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/cmos-subdev.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash_eup2471.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash_eup3618.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash_gpio.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash_ktd231.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/flash/flash_sgm3780.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307-twv82222z2-f10.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7303.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7304.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-781a.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3_qx.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gt7302-gmt.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-jfs0672-clw-gt7305.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-110_v1.0.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-173_v1.0.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1_qx.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-syx-gt7206.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-yb474-gt7303.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zh_tvbox.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zyhb-twd8802.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_7300_hd.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8335c.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8353.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309-zyhb0309.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-gt7302-gmt.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_cold.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_warm.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_kyt111_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_ra474a_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod_TL070VA5.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-jmt781.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-kyt-174-v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-zh1426.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.h
create mode 100644 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_shuttle.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_style_s729.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-3nod.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-781a.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-8335c.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-forfun-v91.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-htr_t75v.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-jmt781.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-kyt110_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-mid8-wms8368.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb352a_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb357a_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-shutter.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-tvboxh2-ori.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-v7_maz7z233.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-xhb_gbeffz2743l.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1426.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1547a-tp785.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid10_hl_pc1089.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid13_hl_pc1388.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-bk-wave7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-jfs0672-clw-gt7305.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-gt7305_v1.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-wave7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-syx-gt7206.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253-wave7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi253/hi253.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi257/hi257.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi257/hi257.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/hi257/hi257_kyt162_v7.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/Makefile
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_custom_wmt.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov2640/ov2640.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov3640/ov3640.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640-mid8-wms8368.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640_firmware.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d-kyt-093-du.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718-gt7302-gmt.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/template/template.h
create mode 100755 drivers/media/video/wmt_v4l2/sensors/wmt-cmos.c
create mode 100755 drivers/media/video/wmt_v4l2/sensors/wmt-cmos.h
create mode 100755 drivers/media/video/wmt_v4l2/wmt-vid.c
create mode 100755 drivers/media/video/wmt_v4l2/wmt-vid.h
create mode 100755 drivers/media/video/wmt_v4l2/wmt-vidreg.h
(limited to 'drivers/media/video/wmt_v4l2')
diff --git a/drivers/media/video/wmt_v4l2/Kconfig b/drivers/media/video/wmt_v4l2/Kconfig
new file mode 100755
index 00000000..cc91e792
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/Kconfig
@@ -0,0 +1,6 @@
+#
+# Multimedia Video device configuration
+#
+
+
+
diff --git a/drivers/media/video/wmt_v4l2/Makefile b/drivers/media/video/wmt_v4l2/Makefile
new file mode 100755
index 00000000..f0695e69
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile for the video capture/playback device drivers.
+#
+
+obj-y += wmt-vid.o
+obj-y += sensors/
+
+g_wmt_v4l2_tv_decoder-objs += tv_decoder/tv-device.o tv_decoder/wmt-tv-decoder.o
+obj-$(CONFIG_WMT_V4L2_TV_DECODER) += g_wmt_v4l2_tv_decoder.o
+
+
+
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/Kconfig b/drivers/media/video/wmt_v4l2/sensors/Kconfig
new file mode 100755
index 00000000..b1ce310b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/Kconfig
@@ -0,0 +1,13 @@
+#
+# Multimedia Video device configuration
+#
+
+config WMT_V4L2_CMOS
+ tristate "WonderMedia V4L2 CMOS Support"
+ default y
+ ---help---
+ Say Y here to use hardware CMOS Support.
+
+
+
+
\ No newline at end of file
diff --git a/drivers/media/video/wmt_v4l2/sensors/Makefile b/drivers/media/video/wmt_v4l2/sensors/Makefile
new file mode 100755
index 00000000..7c9df975
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/Makefile
@@ -0,0 +1,49 @@
+#
+# Makefile for the video capture/playback device drivers.
+#
+
+LOCAL_MODULE_NAME = g_wmt_v4l2_cmos
+
+## sensors
+${LOCAL_MODULE_NAME}-objs += gc0307/gc0307.o
+${LOCAL_MODULE_NAME}-objs += gc0308/gc0308.o
+${LOCAL_MODULE_NAME}-objs += gc0309/gc0309.o
+${LOCAL_MODULE_NAME}-objs += gc0328/gc0328.o
+${LOCAL_MODULE_NAME}-objs += gc0329/gc0329.o
+${LOCAL_MODULE_NAME}-objs += gc2035/gc2035.o
+${LOCAL_MODULE_NAME}-objs += gc2155/gc2155.o
+${LOCAL_MODULE_NAME}-objs += ov7675/ov7675.o
+${LOCAL_MODULE_NAME}-objs += ov2643/ov2643.o
+${LOCAL_MODULE_NAME}-objs += ov2659/ov2659.o
+${LOCAL_MODULE_NAME}-objs += ov5640/ov5640.o
+${LOCAL_MODULE_NAME}-objs += ov9740/ov9740.o
+${LOCAL_MODULE_NAME}-objs += hi253/hi253.o
+${LOCAL_MODULE_NAME}-objs += hi257/hi257.o
+${LOCAL_MODULE_NAME}-objs += siv121d/siv121d.o
+${LOCAL_MODULE_NAME}-objs += siv120d/siv120d.o
+${LOCAL_MODULE_NAME}-objs += sid130b/sid130b.o
+${LOCAL_MODULE_NAME}-objs += sp0718/sp0718.o
+${LOCAL_MODULE_NAME}-objs += sp0a19/sp0a19.o
+${LOCAL_MODULE_NAME}-objs += sp0838/sp0838.o
+${LOCAL_MODULE_NAME}-objs += sp2518/sp2518.o
+${LOCAL_MODULE_NAME}-objs += bf3a03/bf3a03.o
+${LOCAL_MODULE_NAME}-objs += bf3920/bf3920.o
+${LOCAL_MODULE_NAME}-objs += bf3703/bf3703.o
+${LOCAL_MODULE_NAME}-objs += s5k5ca/s5k5ca.o
+${LOCAL_MODULE_NAME}-objs += nt99141/nt99141.o
+
+## ATV/DTV
+${LOCAL_MODULE_NAME}-objs += nmi5625/nmidrv_cmos.o
+obj-y += nmi5625/
+
+## flash
+${LOCAL_MODULE_NAME}-objs += flash/flash.o
+${LOCAL_MODULE_NAME}-objs += flash/flash_gpio.o
+${LOCAL_MODULE_NAME}-objs += flash/flash_eup2471.o
+${LOCAL_MODULE_NAME}-objs += flash/flash_eup3618.o
+${LOCAL_MODULE_NAME}-objs += flash/flash_ktd231.o
+${LOCAL_MODULE_NAME}-objs += flash/flash_sgm3780.o
+
+${LOCAL_MODULE_NAME}-objs += wmt-cmos.o cmos-subdev.o
+obj-m += ${LOCAL_MODULE_NAME}.o
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.c b/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.c
new file mode 100755
index 00000000..2066be20
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.c
@@ -0,0 +1,326 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "bf3703.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, bf3703_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, bf3703_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = bf3703_wb_auto;
+ size = ARRAY_SIZE(bf3703_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = bf3703_wb_incandescent;
+ size = ARRAY_SIZE(bf3703_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = bf3703_wb_daylight;
+ size = ARRAY_SIZE(bf3703_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = bf3703_wb_cloudy;
+ size = ARRAY_SIZE(bf3703_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = bf3703_wb_fluorescent;
+ size = ARRAY_SIZE(bf3703_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = bf3703_scene_mode_auto;
+ size = ARRAY_SIZE(bf3703_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = bf3703_scene_mode_night;
+ size = ARRAY_SIZE(bf3703_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = bf3703_exposure_neg6;
+ size = ARRAY_SIZE(bf3703_exposure_neg6);
+ break;
+ case -1:
+ regs = bf3703_exposure_neg3;
+ size = ARRAY_SIZE(bf3703_exposure_neg3);
+ break;
+ case 0:
+ regs = bf3703_exposure_zero;
+ size = ARRAY_SIZE(bf3703_exposure_zero);
+ break;
+ case 1:
+ regs = bf3703_exposure_pos3;
+ size = ARRAY_SIZE(bf3703_exposure_pos3);
+ break;
+ case 2:
+ regs = bf3703_exposure_pos6;
+ size = ARRAY_SIZE(bf3703_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write(sd, 0x1e, data);
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x10;
+ break;
+ case 1:
+ data |= 0x10;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x1e, data);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xfc) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xfd) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, bf3703_default_regs_init,ARRAY_SIZE(bf3703_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, bf3703_default_regs_exit,
+ ARRAY_SIZE(bf3703_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops bf3703_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev bf3703 = {
+ .name = "bf3703",
+ .i2c_addr = 0x6e,
+ .id = 0x3703,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &bf3703_ops,
+};
+
+#if 0
+static int __init bf3703_init(void)
+{
+ return cmos_register_sudbdev(&bf3703);
+}
+
+static void __exit bf3703_exit(void)
+{
+ return cmos_unregister_subdev(&bf3703);
+}
+
+module_init(bf3703_init);
+module_exit(bf3703_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.h b/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.h
new file mode 100755
index 00000000..40f4933f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3703/bf3703.h
@@ -0,0 +1,269 @@
+
+// Scene Mode
+uint8_t bf3703_scene_mode_auto[] = {
+ 0x8e,0x0d, //0x07
+ 0x8f,0xf2 //0x79
+};
+
+uint8_t bf3703_scene_mode_night[] = {
+ 0x8e,0x0e,
+ 0x8f,0xf2,
+};
+
+
+// White Balance
+uint8_t bf3703_wb_auto [] = {
+ 0x13,0x07,
+};
+
+uint8_t bf3703_wb_incandescent [] = {
+ 0x13,0x05,
+ 0x01, 0x1f,
+ 0x02, 0x15,
+};
+
+uint8_t bf3703_wb_fluorescent [] = {
+ 0x13,0x05,
+ 0x01, 0x1a,
+ 0x02, 0x1e,
+};
+
+uint8_t bf3703_wb_daylight [] = {
+ 0x13,0x05,
+ 0x01, 0x13,
+ 0x02, 0x26,
+};
+
+uint8_t bf3703_wb_cloudy [] = {
+ 0x13,0x05,
+ 0x01, 0x10,
+ 0x02, 0x28,
+};
+
+
+// Exposure
+uint8_t bf3703_exposure_neg6[] = {
+0x55, 0xa8,
+};
+
+uint8_t bf3703_exposure_neg3[] = {
+0x55, 0x98,
+};
+
+uint8_t bf3703_exposure_zero[] = {
+0x55, 0x00,
+};
+
+uint8_t bf3703_exposure_pos3[] = {
+0x55, 0x10,
+};
+
+uint8_t bf3703_exposure_pos6[] = {
+0x55, 0x20,
+};
+
+
+// Resolution
+uint8_t bf3703_320x240[]= {
+ 0x12, 0x10,
+
+};
+
+uint8_t bf3703_640x480[] = {
+ 0x12, 0x00,
+};
+
+uint8_t bf3703_default_regs_init[] = {
+
+ 0xff , 0xff,
+ // 0x12 , 0x80,
+ 0x15 , 0x00, //byd add 20120628
+ 0x3a , 0x00, //byd add 20120628
+
+ 0x11 , 0x80, //0x80
+ 0x13 , 0x00,
+ 0x01 , 0x15,
+ 0x02 , 0x24,
+ 0x8c , 0x02,//01 :devided by 2 02 :devided by 1
+ 0x8d , 0x64,//32: devided by 2 64 :devided by 1
+ 0x87 , 0x18,
+ 0x13 , 0x07,
+
+ //black level , 对上电偏绿有改善 , 如果需要请使用
+
+ 0x05 , 0x1f,
+ 0x06 , 0x60,
+ 0x14 , 0x1f,
+ 0x27 , 0x03,
+ 0x06 , 0xe0,
+
+ //lens shading
+ 0x35 , 0x68,
+ 0x65 , 0x68,
+ 0x66 , 0x62,
+ 0x36 , 0x05,
+ 0x37 , 0xf6,
+ 0x38 , 0x46,
+ 0x9b , 0xf6,
+ 0x9c , 0x46,
+ 0xbc , 0x01,
+ 0xbd , 0xf6,
+ 0xbe , 0x46,
+
+ //AE
+ 0x82 , 0x14,
+ 0x83 , 0x23,
+ 0x9a , 0x23, //the same as 0x83
+ 0x84 , 0x1a,
+ 0x85 , 0x20,
+ 0x89 , 0x04, //02 :devided by 2 04 :devided by 1
+ 0x8a , 0x08, //04: devided by 2 05 :devided by 1
+ 0x86 , 0x28,
+ 0x96 , 0xa6, //AE speed
+ 0x97 , 0x0c, //AE speed
+ 0x98 , 0x18, //AE speed
+ //AE target
+ 0x24 , 0x6a, //78 //0x6a
+ 0x25 , 0x7a, //88 //0x7a
+ 0x94 , 0x0a, //INT_OPEN
+ 0x80 , 0x55,
+
+ //denoise
+ 0x70 , 0xff,//denoise //0x6f
+ 0x72 , 0x6f,//denoise //0x4f
+ 0x73 , 0x4f,//denoise //0x2f
+ 0x74 , 0x38,//denoise //0x27
+ 0x77 , 0x90,//去除格子噪声
+ 0x7a , 0x0e,//denoise in low light , 0x8e\0x4e\0x0e
+ 0x7b , 0x28,//the same as 0x86
+
+ //black levl
+ 0X1F , 0x20, //G target
+ 0X22 , 0x20, //R target
+ 0X26 , 0x20, //B target
+ // 模拟部分参数
+ 0X16 , 0x03, //如果觉得黑色物体不够黑,有点偏红,将0x16写为0x03会有点改善
+ 0xbb , 0x20, // deglitch 对xclk整形
+ 0xeb , 0x30,
+ 0xf5 , 0x21,
+ 0xe1 , 0x3c,
+ 0xbb , 0x20,
+ 0X2f , 0Xf6,
+ 0x06 , 0xe0,
+
+ //anti black sun spot
+ 0x61 , 0xd3, //0x61[3]=0 black sun disable
+ 0x79 , 0x48, //0x79[7]=0 black sun disable
+
+ //contrast
+ 0x56 , 0x40,
+
+ //Gamma
+ 0x3b , 0x58, //auto gamma offset adjust in low light
+ 0x3c , 0x20, //auto gamma offset adjust in low light
+ //0x56 , 0x48,
+ 0x39 , 0x80,
+
+ //gamma 4 low noise
+ 0X3f , 0Xb8, //0xa8
+ 0X40 , 0X48,
+ 0X41 , 0X54,
+ 0X42 , 0X4E,
+ 0X43 , 0X44,
+ 0X44 , 0X3E,
+ 0X45 , 0X39,
+ 0X46 , 0X35,
+ 0X47 , 0X31,
+ 0X48 , 0X2E,
+ 0X49 , 0X2B,
+ 0X4b , 0X29,
+ 0X4c , 0X27,
+ 0X4e , 0X23,
+ 0X4f , 0X20,
+ 0X50 , 0X20,
+
+ //适中
+ 0x51 , 0x08,
+ 0x52 , 0x0E,
+ 0x53 , 0x06,
+ 0x54 , 0x12,
+ 0x57 , 0x82,
+ 0x58 , 0x70,
+ 0x59 , 0x5C,
+ 0x5a , 0x77,
+ 0x5b , 0x1B,
+ 0x5c , 0x0e, //0x5c[3:0] low light color coefficient,smaller , lower noise
+ 0x5d , 0x95,
+
+ 0x60 , 0x20,//color open in low light
+ //AWB
+ 0x6a , 0x81,//如果肤色偏色,将0x6a写为0x81. //0x01
+ 0x23 , 0x66,//Green gain
+ 0xa0 , 0x07,//0xa0写0x03,黑色物体更红;0xa0写0x07,黑色物体更黑;
+
+ 0xa1 , 0X41,//
+ 0xa2 , 0X0e,
+ 0xa3 , 0X26,
+ 0xa4 , 0X0d,
+ //冷色调
+ //0xa5 , 0x26,//The upper limit of red gain
+ 0xa5 , 0x2d, ///*暖色调*/
+
+ 0xa6 , 0x04,
+ 0xa7 , 0x82,//BLUE Target///0x80
+ 0xa8 , 0x7f,//RED Target
+ 0xa9 , 0x28,
+ 0xaa , 0x28,
+ 0xab , 0x28,
+ 0xac , 0x3c,
+ 0xad , 0xf0,
+ 0xc8 , 0x18,
+ 0xc9 , 0x20,
+ 0xca , 0x17,
+ 0xcb , 0x1f,
+ 0xaf , 0x00,
+ 0xc5 , 0x18,
+ 0xc6 , 0x00,
+ 0xc7 , 0x20,
+ 0xae , 0x83,//如果照户外偏蓝,将此寄存器0xae写为0x81。
+ 0xcc , 0x30,
+ 0xcd , 0x70,
+ 0xee , 0x4c,// P_TH
+
+ // color sauration
+ 0xb0 , 0xd0,
+ //0xb1 , 0xc0,
+ //0xb2 , 0xaa,
+
+ // 饱和度艳丽
+ 0xb1 , 0xd0,
+ 0xb2 , 0xc0,
+
+ 0xb3 , 0x88,
+
+ //anti webcmera banding
+ 0x9d , 0x82, //0x4c //updata by yang.chunming@byd.com 2013.12.3 16:27
+ 0x9e , 0x6c, //add by yang.chunming@byd.com 2013.12.3 16:27
+ //switch diection
+
+ 0x1e , 0x00, //00:normal 10:IMAGE_V_MIRROR 20:IMAGE_H_MIRROR 30:IMAGE_HV_MIRROR
+
+ //set max 15fps
+ 0x92 , 0xa0,
+ 0x93 , 0x00,
+ 0x2a , 0x00, //0x10
+ 0x2b , 0x88,
+
+ 0x8e ,0x0d, //0x07 set fps as auto mode by yang.chunming@byd.com 2013.12.03
+ 0x8f ,0xf2,
+ //0x8e , 0X03,
+ //0x8f , 0Xfb, //set min 10fps
+
+ 0x20 , 0x40,
+ 0x09 , 0xc1,
+
+};
+
+uint8_t bf3703_default_regs_exit[]={
+};
+//#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.c b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.c
new file mode 100755
index 00000000..f2d8950a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.c
@@ -0,0 +1,330 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "bf3920.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, bf3920_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, bf3920_640_480_regs),
+// CMOS_WIN_SIZE("SVGA", 800, 600, bf3920_800_600_regs),
+// CMOS_WIN_SIZE("720p", 1280, 720, bf3920_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, bf3920_1600_1200_rets),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = bf3920_wb_auto;
+ size = ARRAY_SIZE(bf3920_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = bf3920_wb_incandescent;
+ size = ARRAY_SIZE(bf3920_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = bf3920_wb_daylight;
+ size = ARRAY_SIZE(bf3920_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = bf3920_wb_cloudy;
+ size = ARRAY_SIZE(bf3920_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = bf3920_wb_fluorescent;
+ size = ARRAY_SIZE(bf3920_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = bf3920_scene_mode_auto;
+ size = ARRAY_SIZE(bf3920_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = bf3920_scene_mode_night;
+ size = ARRAY_SIZE(bf3920_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = bf3920_exposure_neg6;
+ size = ARRAY_SIZE(bf3920_exposure_neg6);
+ break;
+ case -1:
+ regs = bf3920_exposure_neg3;
+ size = ARRAY_SIZE(bf3920_exposure_neg3);
+ break;
+ case 0:
+ regs = bf3920_exposure_zero;
+ size = ARRAY_SIZE(bf3920_exposure_zero);
+ break;
+ case 1:
+ regs = bf3920_exposure_pos3;
+ size = ARRAY_SIZE(bf3920_exposure_pos3);
+ break;
+ case 2:
+ regs = bf3920_exposure_pos6;
+ size = ARRAY_SIZE(bf3920_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x1e, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x10;
+ break;
+ case 1:
+ data |= 0x10;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x1e, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xfc) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xfd) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, bf3920_default_regs_init,
+ ARRAY_SIZE(bf3920_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops bf3920_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev bf3920 = {
+ .name = "bf3920",
+ .i2c_addr = 0x6e,
+ .id = 0x3920,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &bf3920_ops,
+};
+
+#if 0
+static int __init bf3920_init(void)
+{
+ return cmos_register_sudbdev(&bf3920);
+}
+
+static void __exit bf3920_exit(void)
+{
+ return cmos_unregister_subdev(&bf3920);
+}
+
+module_init(bf3920_init);
+module_exit(bf3920_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h
new file mode 100755
index 00000000..96eefa19
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3920/bf3920.h
@@ -0,0 +1,514 @@
+#ifndef BF3920_H
+#define BF3920_H
+
+// Scene Mode
+uint8_t bf3920_scene_mode_auto[] = {
+ 0x89,0x55,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_scene_mode_night[] = {
+ 0x89,0x75,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t bf3920_wb_auto [] = {
+ 0x13, 0x07,
+ 0x01, 0x12,
+ 0x02, 0x22,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_incandescent [] = {
+ 0x13, 0x05,
+ 0x01, 0x28,
+ 0x02, 0x0a,
+
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_fluorescent [] = {
+ 0x13, 0x05,
+ 0x01, 0x1a,
+ 0x02, 0x1e,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_daylight [] = {
+ 0x13, 0x05,
+ 0x01, 0x10,
+ 0x02, 0x20,
+ 0xff,0xff,
+};
+
+uint8_t bf3920_wb_cloudy [] = {
+ 0x13, 0x05,
+ 0x01, 0x0e,
+ 0x02, 0x24,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t bf3920_exposure_neg6[] = {
+ 0x56,0x28,
+ 0x55,0xb0,
+};
+
+uint8_t bf3920_exposure_neg3[] = {
+ 0x56,0x28,
+ 0x55,0x98,
+};
+
+uint8_t bf3920_exposure_zero[] = {
+ 0x56,0x28,
+ 0x55,0x00,
+};
+
+uint8_t bf3920_exposure_pos3[] = {
+ 0x56,0x28,
+ 0x55,0x18,
+};
+
+uint8_t bf3920_exposure_pos6[] = {
+ 0x56,0x28,
+ 0x55,0x38,
+};
+
+
+// Resolution
+uint8_t bf3920_1600_1200_rets[]={
+ /* 1600X1200 UXGA */
+
+ 0x1b,0x2c,
+ 0x11,0x30,//38
+ 0x8a,0x7f,//0XBF
+ 0x2a,0x0c,
+ 0x2b,0x1c,
+ 0x92,0x02,
+ 0x93,0x00,
+
+
+ //window
+ 0x4a,0x80,
+ 0xcc,0x00,
+ 0xca,0x00,
+ 0xcb,0x00,
+ 0xcf,0x00,
+ 0xcd,0x00,
+ 0xce,0x00,
+ 0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_320_240_regs[]= {
+
+ 0x1b,0x2c,
+ 0x11,0x30,//38
+ 0x8a,0x7f,//0XBF
+ 0x2a,0x0c,
+ 0x2b,0x1c,
+ 0x92,0x02,
+ 0x93,0x00,
+
+
+ //window
+ 0x4a,0x80,
+ 0xcc,0x00,
+ 0xca,0x00,
+ 0xcb,0x00,
+ 0xcf,0x00,
+ 0xcd,0x00,
+ 0xce,0x00,
+ 0xc0,0xd3,
+ 0xc1,0x04,
+ 0xc2,0xc4,
+ 0xc3,0x11,
+ 0xc4,0x3f,
+ 0xb5,0x3f,
+ 0x03,0x50,
+ 0x17,0x00,
+ 0x18,0x00,
+ 0x10,0x30,
+ 0x19,0x00,
+ 0x1a,0xc0,
+ 0x0B,0x30,
+ 0xff, 0xff,
+
+
+
+
+
+
+
+};
+
+uint8_t bf3920_default_regs_init[]={
+
+
+ 0x09,0x42,
+ 0x29,0x60,
+ 0x12,0x00,
+ 0x13,0x07,
+ 0xe2,0xc4,
+ 0xe7,0x4e,
+ 0x29,0x60,
+ 0x08,0x16,
+ 0x16,0x28,
+ 0x1c,0x00,
+ 0x1d,0xf1,
+ 0xbb,0x30,
+ 0x3e,0x80,
+ 0x27,0x98,
+ 0x11,0x30,
+ 0x15,0x80,
+ 0x3a,0x00,
+
+ //lens shading
+ 0x1e,0x46,
+ 0x35,0x30, //lens shading gain of R
+ 0x65,0x30, //lens shading gain of G
+ 0x66,0x2a, //lens shading gain of B
+ 0xbc,0xd3,
+ 0xbd,0x5c,
+ 0xbe,0x24,
+ 0xbf,0x13,
+ 0x9b,0x5c,
+ 0x9c,0x24,
+ 0x36,0x13,
+ 0x37,0x5c,
+ 0x38,0x24,
+
+ 0x92,0x02,//Dummy Line Insert LSB
+ 0x93,0x00,
+ 0x2a,0x0c,
+ 0x2b,0x13,//Dummy Pixel Insert LSB
+
+ //initial AWB and AE
+ 0x13,0x00,
+ 0x8c,0x0b,
+ 0x8d,0xc4,
+ 0x24,0xc8,
+ 0x87,0x2d,
+ 0x01,0x12,
+ 0x02,0x22,
+ 0x13,0x07,
+
+
+
+ //black sun
+ /*
+ 0xfb,0x06, //72M
+ 0xfb,0x0a,//48M
+ 0xfb,0x0c, //36M
+ 0xfb,0x12, //24M
+ */
+
+
+
+ //denoise and edge enhancement
+ 0x70,0x01,
+ 0x72,0x62,//0x72[7:6]: Bright edge enhancement; 0x72[5:4]: Dark edge enhancement
+ 0x78,0x37,
+ 0x7a,0x29,//0x7a[7:4]: The bigger, the smaller noise; 0x7a[3:0]: The smaller, the smaller noise
+ 0x7d,0x85, //
+
+ 0x39,0xa8, //0xa0 zzg 0xa8
+ 0x3f,0x28, //0x20 zzg 0x28
+
+
+ // gamma default(low noise)
+
+ 0x40,0x20,
+ 0x41,0x25,
+ 0x42,0x23,
+ 0x43,0x1f,
+ 0x44,0x18,
+ 0x45,0x15,
+ 0x46,0x12,
+ 0x47,0x10,
+ 0x48,0x10,
+ 0x49,0x0f,
+ 0x4b,0x0e,
+ 0x4c,0x0c,
+ 0x4e,0x0b,
+ 0x4f,0x09,
+ 0x50,0x07,
+
+
+ //gamma清晰亮丽
+ /*
+ 0x40,0x28,
+ 0x41,0x26,
+ 0x42,0x24,
+ 0x43,0x22,
+ 0x44,0x1c,
+ 0x45,0x19,
+ 0x46,0x11,
+ 0x47,0x10,
+ 0x48,0x0f,
+ 0x49,0x0e,
+ 0x4b,0x0c,
+ 0x4c,0x0a,
+ 0x4e,0x09,
+ 0x4f,0x08,
+ 0x50,0x04,
+ */
+
+ /*
+ //gamma 过曝亮度好,高亮
+
+ 0x40,0x28,
+ 0x41,0x28,
+ 0x42,0x30,
+ 0x43,0x29,
+ 0x44,0x23,
+ 0x45,0x1b,
+ 0x46,0x17,
+ 0x47,0x0f,
+ 0x48,0x0d,
+ 0x49,0x0b,
+ 0x4b,0x09,
+ 0x4c,0x08,
+ 0x4e,0x07,
+ 0x4f,0x05,
+ 0x50,0x04,
+
+ //// from ryx zzg
+ 0x40,0x25,
+ 0x41,0x28,
+ 0x42,0x25,
+ 0x43,0x23,
+ 0x44,0x1b,
+ 0x45,0x18,
+ 0x46,0x15,
+ 0x47,0x11,
+ 0x48,0x10,
+ 0x49,0x0f,
+ 0x4b,0x0e,
+ 0x4c,0x0c,
+ 0x4e,0x0a,
+ 0x4f,0x06,
+ 0x50,0x05,
+*/
+
+
+
+
+ //color default
+ /*
+ 0x5c,0x00,
+ 0x51,0x32,
+ 0x52,0x17,
+ 0x53,0x8C,
+ 0x54,0x79,
+ 0x57,0x6E,
+ 0x58,0x01,
+ 0x5a,0x36,
+ 0x5e,0x38,
+ */
+
+ //color 绿色好红色主系数高
+
+ 0x5c,0x00,
+ 0x51,0x24,//16
+ 0x52,0x0b,//e
+ 0x53,0x77,//6f
+ 0x54,0x65,//66
+ 0x57,0x5e,//76
+ 0x58,0x19,//15
+ 0x5a,0x16,//16
+ 0x5e,0x60,//0x38 zzg
+
+ /*
+ //color 艳丽
+
+ 0x5c,0x00,
+ 0x51,0x2b,
+ 0x52,0x0e,
+ 0x53,0x9f,
+ 0x54,0x7d,
+ 0x57,0x91,
+ 0x58,0x21,
+ 0x5a,0x16,
+ 0x5e,0x38,
+ */
+
+
+ //color 色彩淡
+ /*
+ 0x5c,0x00,
+ 0x51,0x24,
+ 0x52,0x0b,
+ 0x53,0x77,
+ 0x54,0x65,
+ 0x57,0x5e,
+ 0x58,0x19,
+ 0x5a,0x16,
+ 0x5e,0x38,
+ */
+ //A color
+ 0x5c,0x80,
+ 0x51,0x22,
+ 0x52,0x00,
+ 0x53,0x96,
+ 0x54,0x8C,
+ 0x57,0x7F,
+ 0x58,0x0B,
+ 0x5a,0x14,
+ 0x5e,0x60, ////0x38 zzg
+ // saturn and auto contrast
+ 0x56,0x28,
+ 0x55,0x00,//when 0x56[7:6]=2'b0x,0x55[7:0]:Brightness control.bit[7]: 0:positive 1:negative [6:0]:value
+ 0xb0,0x8d,
+ 0xb1,0x15,//when 0x56[7:6]=2'b0x,0xb1[7]:auto contrast switch(0:on 1:off)
+ 0x56,0xe8,
+ 0x55,0xf0,//when 0x56[7:6]=2'b11,cb coefficient of F light
+ 0xb0,0xb8,//when 0x56[7:6]=2'b11,cr coefficient of F light
+ 0x56,0xa8,
+ 0x55,0xb8,//when 0x56[7:6]=2'b10,cb coefficient of !F light
+ 0xb0,0xa8,//when 0x56[7:6]=2'b10,cr coefficient of !F light
+ // manual rast
+
+ 0x56,0x28,
+ 0xb1,0x95,//when 0x56[7:6]=2'b0x,0xb1[7]:auto contrast switch(0:on 1:off)
+ 0x56,0xe8,
+ 0xb4,0x40,//when 0x56[7:6]=2'b11,manual contrast coefficient
+
+ //AE
+ 0x13,0x07,
+ 0x24,0x40,// AE Target
+ 0x25,0x88,// Bit[7:4]: AE_LOC_INT; Bit[3:0]:AE_LOC_GLB
+ 0x97,0x30,// Y target value1.
+ 0x98,0x18,// AE 窗口和权重 0x0a zzg
+ 0x80,0xd2,//Bit[3:2]: the bigger, Y_AVER_MODIFY is smaller 0x92
+ 0x81,0xff,//AE speed //0xe0
+ 0x82,0x30,//minimum global gain 0x30 zzg
+ 0x83,0x60, //0x60 zzg
+ 0x84,0x45, ///0x65 zzg
+ 0x85,0x7d, ///0x90 zzg
+ 0x86,0xa0,//maximum gain zzg 0xc0 0x97
+ 0x89,0x6d,//INT_MAX_MID 9d zzg
+ 0x94,0x82,//Bit[7:4]: Threshold for over exposure pixels, the smaller, the more over exposure pixels; Bit[3:0]: Control the start of AE. 0x42 zzg b2
+
+ //AWB
+ 0x6a,0x81,
+ 0x23,0x66,// green gain
+ 0xa1,0x31,
+ 0xa2,0x0b,//the low limit of blue gain for indoor scene
+ 0xa3,0x25,//the upper limit of blue gain for indoor scene
+ 0xa4,0x09,//the low limit of red gain for indoor scene
+ 0xa5,0x26,//the upper limit of red gain for indoor scene
+ 0xa7,0x9a,//Base B gain不建议修改
+ 0xa8,0x15,//Base R gain不建议修改
+ 0xa9,0x13,
+ 0xaa,0x12,
+ 0xab,0x16,
+ 0xac,0x20, //avoiding red scence when openning
+ 0xc8,0x10,
+ 0xc9,0x15,
+ 0xd2,0x78,
+ 0xd4,0x20,
+
+ ///awb base gain offset
+ 0xd0,0x11,
+ 0xd1,0x09, ///0x01 zzg
+
+
+ 0x0b,0x10, //800*600
+ 0x09,0x72, ///0x42 HSYNC delay bit[5:4]: HREF delay select, 0:no delay,01:delay 2ns,10:delay 4ns,11:delay 6ns
+ //skin
+ 0xee,0x2a,
+ 0xef,0x1b,
+
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.c b/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.c
new file mode 100755
index 00000000..dfc0a4bf
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.c
@@ -0,0 +1,335 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "bf3a03.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, bf3a03_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, bf3a03_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = bf3a03_wb_auto;
+ size = ARRAY_SIZE(bf3a03_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = bf3a03_wb_incandescent;
+ size = ARRAY_SIZE(bf3a03_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = bf3a03_wb_daylight;
+ size = ARRAY_SIZE(bf3a03_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = bf3a03_wb_cloudy;
+ size = ARRAY_SIZE(bf3a03_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = bf3a03_wb_fluorescent;
+ size = ARRAY_SIZE(bf3a03_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = bf3a03_scene_mode_auto;
+ size = ARRAY_SIZE(bf3a03_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = bf3a03_scene_mode_night;
+ size = ARRAY_SIZE(bf3a03_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = bf3a03_exposure_neg6;
+ size = ARRAY_SIZE(bf3a03_exposure_neg6);
+ break;
+ case -1:
+ regs = bf3a03_exposure_neg3;
+ size = ARRAY_SIZE(bf3a03_exposure_neg3);
+ break;
+ case 0:
+ regs = bf3a03_exposure_zero;
+ size = ARRAY_SIZE(bf3a03_exposure_zero);
+ break;
+ case 1:
+ regs = bf3a03_exposure_pos3;
+ size = ARRAY_SIZE(bf3a03_exposure_pos3);
+ break;
+ case 2:
+ regs = bf3a03_exposure_pos6;
+ size = ARRAY_SIZE(bf3a03_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+ uint8_t retry_times=0;
+
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write(sd, 0x1e, data);
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+ uint8_t retry_times=0;
+
+
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x10;
+ break;
+ case 1:
+ data |= 0x10;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x1e, data);
+
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xfc) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xfd) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, bf3a03_default_regs_init,
+ ARRAY_SIZE(bf3a03_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, bf3a03_default_regs_exit,
+ ARRAY_SIZE(bf3a03_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops bf3a03_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev bf3a03 = {
+ .name = "bf3a03",
+ .i2c_addr = 0x6e,
+ .id = 0x3a03,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &bf3a03_ops,
+};
+
+#if 0
+static int __init bf3a03_init(void)
+{
+ return cmos_register_sudbdev(&bf3a03);
+}
+
+static void __exit bf3a03_exit(void)
+{
+ return cmos_unregister_subdev(&bf3a03);
+}
+
+module_init(bf3a03_init);
+module_exit(bf3a03_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.h b/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.h
new file mode 100755
index 00000000..b7d2ac91
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/bf3a03/bf3a03.h
@@ -0,0 +1,391 @@
+#ifndef BF3A03_H
+#define BF3A03_H
+
+
+// Scene Mode
+uint8_t bf3a03_scene_mode_auto[] = {
+ 0x89, 0x6d,
+};
+
+uint8_t bf3a03_scene_mode_night[] = {
+ 0x89, 0x9d,
+};
+
+
+// White Balance
+uint8_t bf3a03_wb_auto [] = {
+ 0x13,0x07,
+ 0x01, 0x12,
+ 0x02, 0x22,
+};
+
+uint8_t bf3a03_wb_incandescent [] = {
+ 0x13,0x05,
+ 0x01, 0x1f,
+ 0x02, 0x20,
+};
+
+uint8_t bf3a03_wb_fluorescent [] = {
+ 0x13,0x05,
+ 0x01, 0x1a,
+ 0x02, 0x15,
+};
+
+uint8_t bf3a03_wb_daylight [] = {
+ 0x13,0x05,
+ 0x01, 0x15,
+ 0x02, 0x20,
+};
+
+uint8_t bf3a03_wb_cloudy [] = {
+ 0x13,0x05,
+ 0x01, 0x10,
+ 0x02, 0x2c,
+};
+
+
+// Exposure
+uint8_t bf3a03_exposure_neg6[] = {
+ 0x55, 0xb8,
+};
+
+uint8_t bf3a03_exposure_neg3[] = {
+0x55, 0x98,
+};
+
+uint8_t bf3a03_exposure_zero[] = {
+0x55, 0x00,
+};
+
+uint8_t bf3a03_exposure_pos3[] = {
+0x55, 0x18,
+};
+
+uint8_t bf3a03_exposure_pos6[] = {
+0x55, 0x38,
+};
+
+
+// Resolution
+uint8_t bf3a03_320x240[]= {
+ 0xda, 0x00,
+ 0xdb, 0xa2,
+ 0xdc, 0x00,
+ 0xdd, 0x7a,
+ 0xde, 0x00,
+ 0x4a, 0x98,
+ 0x0a, 0x21,
+ 0x10, 0x21,
+ 0x3d, 0x59,
+ 0x6b, 0x02,
+
+ 0x17, 0x00,
+ 0x18, 0xa0,
+ 0x19, 0x00,
+ 0x1a, 0x78,
+ 0x03, 0x00,
+ 0x12, 0x10,
+
+};
+
+uint8_t bf3a03_640x480[] = {
+ 0xda, 0x00,
+ 0xdb, 0xa2,
+ 0xdc, 0x00,
+ 0xdd, 0x7a,
+ 0xde, 0x00,
+ 0x4a, 0x98,
+ 0x0a, 0x21,
+ 0x10, 0x21,
+ 0x3d, 0x59,
+ 0x6b, 0x02,
+
+ 0x17, 0x00,
+ 0x18, 0xa0,
+ 0x19, 0x00,
+ 0x1a, 0x78,
+ 0x03, 0x00,
+ 0x12, 0x00,
+};
+
+uint8_t bf3a03_default_regs_init[] = {
+ //0x12,0x80,
+ 0x09,0x55,
+ 0x15,0x00,
+ 0x1e,0x70,//HV mirror
+
+ //Analog signals
+ 0x06,0x78,
+ 0x21,0x00,
+ 0x3e,0x37,
+ 0x29,0x2b,
+ 0x27,0x98,
+ 0x16,0x25,
+ 0x20,0x00,
+
+ //Clock
+ 0x2f,0x42,//有绿色雪花点时,写为0x4e;
+ 0x11,0x10,//分频[1:0]
+ 0x1b,0x09,//倍频 PLL使能与0x2f[1]、0x1b[3]
+
+ //数据输出格式
+ 0x4a,0x98,//Sub、Win
+ 0x12,0x00,//YUV、sub时序
+ 0x3a,0x00,//YUV时序
+
+ //Manual
+ 0x13,0x08,//手写bit[3]GLB GAIN0
+ 0x01,0x14,
+ 0x02,0x20,
+ 0x8c,0x02,
+ 0x8d,0x4c,
+ 0x87,0x16,//GLB GAIN0
+
+ ///Auto
+ 0x13,0x07,
+
+ //Denoise
+ 0x70,0x0f,//插值模块开关
+ 0x3b,0x00,//去格子噪声
+ 0x71,0x0c,//插值模块开关
+ 0x73,0x27,//Denoise
+ 0x75,0x88,//Outdoor denoise
+ 0x76,0xd8,
+ 0x77,0x0a,//Low light denoise
+ 0x78,0xff,
+ 0x79,0x14,
+ 0x7a,0x24,//边缘增强
+ 0x9e,0x04,
+ 0x7d,0x2a,//去紫边
+
+ //Gamma default
+ 0x39,0xa0,//Gamma offset
+ 0x3f,0xa0,
+ /*
+ 0x90,0x20,
+ 0x5f,0x03,//Dark_sel gamma
+ 0x40,0x22,
+ 0x41,0x23,
+ 0x42,0x28,
+ 0x43,0x25,
+ 0x44,0x1d,
+ 0x45,0x17,
+ 0x46,0x13,
+ 0x47,0x12,
+ 0x48,0x10,
+ 0x49,0x0d,
+ 0x4b,0x0b,
+ 0x4c,0x0b,
+ 0x4e,0x09,
+ 0x4f,0x07,
+ 0x50,0x06,
+
+ //Gamma low noise
+ 0x40,0x24,
+ 0x41,0x30,
+ 0x42,0x24,
+ 0x43,0x1d,
+ 0x44,0x1a,
+ 0x45,0x14,
+ 0x46,0x11,
+ 0x47,0x0e,
+ 0x48,0x0d,
+ 0x49,0x0c,
+ 0x4b,0x0b,
+ 0x4c,0x09,
+ 0x4e,0x09,
+ 0x4f,0x08,
+ 0x50,0x07, */
+
+ //Gamma smooth under over-ex
+ 0x40,0x18,
+ 0x41,0x2c,
+ 0x42,0x28,
+ 0x43,0x20,
+ 0x44,0x16,
+ 0x45,0x10,
+ 0x46,0x0f,
+ 0x47,0x0f,
+ 0x48,0x0e,
+ 0x49,0x0a,
+ 0x4b,0x0b,
+ 0x4c,0x09,
+ 0x4e,0x09,
+ 0x4f,0x08,
+ 0x50,0x06,
+ /*
+ //Gamma sharp and pretty 清晰亮丽
+ 0x40,0x19,
+ 0x41,0x1e,
+ 0x42,0x1f,
+ 0x43,0x20,
+ 0x44,0x1d,
+ 0x45,0x19,
+ 0x46,0x17,
+ 0x47,0x17,
+ 0x48,0x14,
+ 0x49,0x12,
+ 0x4b,0x0f,
+ 0x4c,0x0c,
+ 0x4e,0x08,
+ 0x4f,0x06,
+ 0x50,0x03,
+ */
+
+ //AE
+ 0x24,0x48,//非A光Y_target 0x50
+ 0x97,0x40,//A光Y_target
+ 0x25,0x88,//AE_LOC
+ 0x81,0x00,//AE speed
+ 0x82,0x18,
+ 0x83,0x30,
+ 0x84,0x20,
+ 0x85,0x38,
+ 0x86,0x55,
+ 0x94,0x82,//对AE亮度权重调节
+ 0x80,0x92,//对过曝点数调节,bit[1]choose 50HZ or 60HZ step;
+ 0x98,0xbb,//对窗口权重调节 0x8a
+ 0x89,0x6d,//帧率调节bit[7:3]
+ 0x8e,0x2c,
+ 0x8f,0x86,
+
+ //Banding
+ 0x2b,0x20,
+ 0x8a,0x93,//50HZ
+ 0x8b,0x7a,//60HZ
+ 0x92,0x6D,
+
+ //Color
+ 0x5a,0xec,//Outdoor color
+ 0x51,0x90,
+ 0x52,0x10,
+ 0x53,0x8d,
+ 0x54,0x88,
+ 0x57,0x82,
+ 0x58,0x8d,
+ 0x5a,0x7c,//A light color
+ 0x51,0x80,
+ 0x52,0x04,
+ 0x53,0x8d,
+ 0x54,0x88,
+ 0x57,0x82,
+ 0x58,0x8d,
+
+ //Color default
+ 0x5a,0x6c,//Indoor color
+ 0x51,0x93,
+ 0x52,0x04,
+ 0x53,0x8a,
+ 0x54,0x88,
+ 0x57,0x02,
+ 0x58,0x8d,
+
+ /*//Color色彩艳丽
+ 0x5a,0x6c,//Indoor color
+ 0x51,0xa0,
+ 0x52,0x01,
+ 0x53,0x8d,
+ 0x54,0x85,
+ 0x57,0x01,
+ 0x58,0x90,
+
+ //Color肤色较好
+ 0x5a,0x6c,//Indoor color
+ 0x51,0x90,
+ 0x52,0x0a,
+ 0x53,0x84,
+ 0x54,0x05,
+ 0x57,0x05,
+ 0x58,0x87,
+
+ //Color色彩淡
+ 0x5a,0x6c,//Indoor color
+ 0x51,0x85,
+ 0x52,0x06,
+ 0x53,0x8a,
+ 0x54,0x81,
+ 0x57,0x02,
+ 0x58,0x8a,
+ */
+
+ //Saturation
+ 0xb0,0xa0,//A光饱和度
+ 0xb1,0x26,
+ 0xb2,0x1c,
+ 0xb4,0xfd,
+ 0xb0,0x30,//非A光饱和度
+ 0xb1,0xc0, ///0xd8
+ 0xb2,0xa0, ///0xb0
+ 0xb4,0xf1,
+
+ //Contrast
+ 0x3c,0x40,//K1
+ 0x56,0x48,//K2 0xb4[4]选择new or old
+ 0x4d,0x40,//K3
+ 0x59,0x40,//K4
+
+ /*//G gain大一些
+ 0x35,0x56,//shading R
+ 0x65,0x36,//shading G
+ 0x66,0x44,//shading B
+ //AWB
+ 0x6a,0x91,
+ 0x23,0x44,
+ 0xa2,0x04,
+ 0xa3,0x26,
+ 0xa4,0x04,
+ 0xa5,0x26,
+ 0xa7,0x1a,
+ 0xa8,0x10,
+ 0xa9,0x1f,
+ 0xaa,0x16,
+ 0xab,0x16,
+ 0xac,0x30,
+ 0xad,0xf0,
+ 0xae,0x57,
+ 0xc5,0xaa,
+ 0xc7,0x38,
+ 0xc8,0x0d,
+ 0xc9,0x16,
+ 0xd3,0x09,
+ 0xd4,0x15,
+ 0xd0,0x00,
+ 0xd1,0x01,
+ 0xd2,0x18,
+ */
+
+ //G gain小一些
+ 0x35,0x46,//shading R
+ 0x65,0x38,//shading G
+ 0x66,0x42,//shading B
+ //AWB
+ 0x6a,0xd1,//AWB
+ 0x23,0x11,//G GAIN
+ 0xa2,0x0b,//非户外 B上下线
+ 0xa3,0x26,
+ 0xa4,0x04,//非户外 R上下线
+ 0xa5,0x26,
+ 0xa7,0x13,//B GAIN
+ 0xa8,0x8e,//R GAIN
+ 0xa9,0x16,//白点
+ 0xaa,0x16,
+ 0xab,0x16,
+ 0xac,0x30,
+ 0xad,0xf0,
+ 0xae,0x57,
+ 0xc5,0x66,
+ 0xc7,0x38,//户内、外开关bit[4]
+ 0xc8,0x0d,//非户外 B上下线
+ 0xc9,0x16,
+ 0xd3,0x09,//非户外 R上下线
+ 0xd4,0x15,
+ 0xd0,0x00,//A光下的offset
+ 0xd1,0x01,//非A光下的offset
+ 0xd2,0x18,
+ 0x20,0x40, ////[6] dependent or not
+ 0x09,0x5c,///0x55 0x57
+};
+
+uint8_t bf3a03_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.c b/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.c
new file mode 100755
index 00000000..9cbd1d36
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.c
@@ -0,0 +1,155 @@
+/*
+ * linux/drivers/media/video/wmt_v4l2/cmos/cmos-dev.c
+ * WonderMedia v4l cmos device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include
+#include
+
+#include "cmos-subdev.h"
+#include "../wmt-vid.h"
+
+void cmos_init_8bit_addr(uint8_t *array_addr, size_t array_size, uint8_t i2c_addr)
+{
+ uint32_t addr, data;
+ int i;
+
+ for(i=0;iname);
+ list_add_tail(&sd->list, &__cmos_subdev_list);
+ return 0;
+}
+EXPORT_SYMBOL(cmos_register_sudbdev);
+
+void cmos_unregister_subdev(struct cmos_subdev *sd)
+{
+ printk(KERN_INFO "unregister cmos: %s\n", sd->name);
+ list_del(&sd->list);
+}
+EXPORT_SYMBOL(cmos_unregister_subdev);
+
+struct cmos_subdev *cmos_subdev_get_by_try(void)
+{
+ struct cmos_subdev *sd;
+ struct list_head *node, *next;
+
+ list_for_each_safe(node, next, &__cmos_subdev_list) {
+ sd = container_of(node, struct cmos_subdev, list);
+ if (!cmos_subdev_call(sd, identify)) {
+ return sd;
+ }
+ }
+ return NULL;
+}
+
+// below init all cmos
+
+extern struct cmos_subdev nmi;
+extern struct cmos_subdev gc0307, gc0308, gc0309, gc0311, gc0329, gc0328, gc2015, gc2035,gc2155;
+extern struct cmos_subdev ov2640, ov2643, ov2659, ov3640, ov3660, ov5640,ov7675,ov9740;
+extern struct cmos_subdev hi704, hi253,hi257;
+extern struct cmos_subdev siv121d,siv120d, sid130b;
+extern struct cmos_subdev sp0838, sp0718,sp0a19, sp2518;
+extern struct cmos_subdev bf3a03, bf3920,bf3703;
+extern struct cmos_subdev s5k5ca;
+extern struct cmos_subdev nt99141;
+
+static struct cmos_subdev *devices[] = {
+ &nmi,
+ /* SuperPix */
+ &sp0718, &sp0a19,&sp2518, &sp0838,
+ /* Seti */
+ &siv121d,&siv120d, &sid130b,
+ /* Hynix */
+ &hi253,&hi257,
+ /* Galaxyc */
+ &gc0307,&gc0308, &gc0309, &gc0328, &gc0329, &gc2035,&gc2155,
+ /* OminiVision */
+ &ov2659, &ov5640,&ov7675,&ov9740,&ov2643,
+ /*BYD*/
+ &bf3a03,&bf3920,&bf3703,
+ /* Samsung */
+ &s5k5ca,
+ /*Novatek*/
+ &nt99141,
+ NULL,
+};
+
+int cmos_subdev_init(void)
+{
+ int ret = 0;
+ struct cmos_subdev **sd = &devices[0];
+
+ while (*sd) {
+ ret = cmos_register_sudbdev(*sd);
+ if (ret) {
+ break;
+ }
+ sd++;
+ }
+
+ return ret;
+}
+
+void cmos_subdev_exit(void)
+{
+ struct cmos_subdev **sd = &devices[0];
+
+ while (*sd) {
+ cmos_unregister_subdev(*sd);
+ sd++;
+ }
+}
diff --git a/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.h b/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.h
new file mode 100755
index 00000000..18e0af36
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/cmos-subdev.h
@@ -0,0 +1,108 @@
+/*++
+ * linux/drivers/media/video/wmt_v4l2/cmos/cmos-dev.h
+ * WonderMedia v4l cmos device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#ifndef CMOS_DEV_H
+#define CMOS_DEV_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+typedef struct {
+ int width;
+ int height;
+ int cmos_v_flip;
+ int cmos_h_flip;
+ unsigned int pix_color_format;
+ int is_rawdata;
+ int mode_switch;
+} cmos_init_arg_t;
+
+struct cmos_subdev;
+
+struct cmos_subdev_ops {
+ /* core */
+ int (*identify)(struct cmos_subdev *sd);
+ int (*init)(struct cmos_subdev *sd);
+ int (*exit)(struct cmos_subdev *sd);
+ int (*queryctrl)(struct cmos_subdev *sd, struct v4l2_queryctrl *qc);
+ int (*querymenu)(struct cmos_subdev *sd, struct v4l2_querymenu *qm);
+ int (*g_ctrl)(struct cmos_subdev *sd, struct v4l2_control *ctrl);
+ int (*s_ctrl)(struct cmos_subdev *sd, struct v4l2_control *ctrl);
+
+ /* video */
+ int (*enum_framesizes)(struct cmos_subdev *sd, struct v4l2_frmsizeenum *fsize);
+ int (*enum_mbus_fmt)(struct cmos_subdev *sd, unsigned int index, enum v4l2_mbus_pixelcode *code);
+ int (*g_mbus_fmt)(struct cmos_subdev *sd, struct v4l2_mbus_framefmt *fmt);
+ int (*try_mbus_fmt)(struct cmos_subdev *sd, struct v4l2_mbus_framefmt *fmt);
+ int (*s_mbus_fmt)(struct cmos_subdev *sd, struct v4l2_mbus_framefmt *fmt);
+ int (*g_parm)(struct cmos_subdev *sd, struct v4l2_streamparm *param);
+ int (*s_parm)(struct cmos_subdev *sd, struct v4l2_streamparm *param);
+ int (*cropcap)(struct cmos_subdev *sd, struct v4l2_cropcap *cc);
+ int (*g_crop)(struct cmos_subdev *sd, struct v4l2_crop *crop);
+ int (*s_crop)(struct cmos_subdev *sd, struct v4l2_crop *crop);
+};
+
+struct cmos_subdev {
+ char name[12];
+ int i2c_addr;
+ int id;
+ int chipid;
+ int max_width;
+ int max_height;
+ struct cmos_subdev_ops *ops;
+ struct list_head list;
+};
+
+#define cmos_subdev_call(sd, f, args...) \
+ (!(sd) ? -ENODEV : (((sd)->ops && (sd)->ops->f) ? \
+ (sd)->ops->f((sd) , ##args) : -ENOIOCTLCMD))
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+extern struct regulator *regulator_get(struct device *dev, const char *id);
+extern void regulator_put(struct regulator *regulator);
+extern int regulator_enable(struct regulator *regulator);
+extern int regulator_disable(struct regulator *regulator);
+extern int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
+extern int cmos_register_sudbdev(struct cmos_subdev *cmos_subdev);
+extern void cmos_unregister_subdev(struct cmos_subdev *cmos_subdev);
+
+extern struct cmos_subdev *cmos_subdev_get_by_try(void);
+extern int cmos_subdev_init(void);
+extern void cmos_subdev_exit(void);
+
+void cmos_init_8bit_addr(unsigned char* array_addr, unsigned int array_size, unsigned char i2c_addr);
+void cmos_init_16bit_addr(unsigned int * array_addr, unsigned int array_size, unsigned int i2c_addr);
+void cmos_init_16bit_addr_16bit_data(unsigned int * array_addr, unsigned int array_size, unsigned int i2c_addr);
+
+#endif /* ifndef CMOS_DEV_H */
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash.c
new file mode 100755
index 00000000..7d5d3b2c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash.c
@@ -0,0 +1,54 @@
+/*
+ * ==========================================================================
+ *
+ * Filename: flash.c
+ *
+ * Description:
+ *
+ * Version: 0.01
+ * Created: 2013骞07鏈02鏃 14鏃16鍒08绉
+ *
+ * Author: smmei (),
+ * Company:
+ *
+ * ==========================================================================
+ */
+
+#include
+#include
+#include "flash.h"
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+static struct flash_dev *fl_devices[] = {
+ &flash_dev_gpio,
+ &flash_dev_eup2471,
+ &flash_dev_eup3618,
+ &flash_dev_ktd231,
+ &flash_dev_sgm3780,
+};
+
+struct flash_dev *flash_instantiation(void)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(fl_devices); i++) {
+ struct flash_dev *fl = fl_devices[i];
+ if (fl->init && fl->init() == 0)
+ return fl;
+ }
+ return NULL;
+}
+
+int flash_set_mode(struct flash_dev *fl, int mode)
+{
+ return (fl && fl->set_mode) ? fl->set_mode (mode) : -EINVAL;
+}
+
+void flash_destroy(struct flash_dev *fl)
+{
+ if (fl && fl->exit)
+ fl->exit();
+}
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash.h b/drivers/media/video/wmt_v4l2/sensors/flash/flash.h
new file mode 100755
index 00000000..38051ebc
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash.h
@@ -0,0 +1,36 @@
+/*
+ * --------------------------------------------------------------------------
+ *
+ * Filename: flash.h
+ *
+ * Description:
+ *
+ * Version: 0.01
+ * Created: 2013骞07鏈02鏃 14鏃17鍒16绉
+ *
+ * Author: smmei (),
+ * Company:
+ * --------------------------------------------------------------------------
+ */
+#ifndef __FLASH_H__
+#define __FLASH_H__
+
+struct flash_dev {
+ char name[20];
+ int (*init)(void);
+ int (*set_mode)(int mode);
+ void (*exit)(void);
+};
+
+extern struct flash_dev flash_dev_gpio;
+extern struct flash_dev flash_dev_eup2471;
+extern struct flash_dev flash_dev_eup3618;
+extern struct flash_dev flash_dev_ktd231;
+extern struct flash_dev flash_dev_sgm3780;
+
+extern struct flash_dev *flash_instantiation(void);
+extern int flash_set_mode(struct flash_dev *fl, int mode);
+extern void flash_destroy(struct flash_dev *fl);
+
+#endif /* #ifndef __FLASH_H__ */
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup2471.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup2471.c
new file mode 100755
index 00000000..d45daea4
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup2471.c
@@ -0,0 +1,131 @@
+
+/* wmt.camera.flash ::
+ * wmt.camera.flash eup2471:3:2
+ */
+
+#include
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "flash.h"
+
+struct eup2471_struct {
+ int gpio_en;
+ int gpio_flen;
+};
+
+static struct eup2471_struct *eup;
+
+#define EUP2471_I2CADDR 0x37
+
+/*
+ * TODO register flash as a subdev
+ */
+static int flash_dev_set_mode(int mode)
+{
+ if (!eup)
+ return -EINVAL;
+
+ switch (mode) {
+ case FLASH_MODE_OFF:
+ gpio_direction_output(eup->gpio_en, 0);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_ON:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 0);
+ msleep(1);
+ wmt_vid_i2c_write(EUP2471_I2CADDR, 0x00, 0x00);
+ wmt_vid_i2c_write(EUP2471_I2CADDR, 0x01, 0x33);
+ break;
+ case FLASH_MODE_STROBE:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 1);
+ msleep(1);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_TORCH:
+ gpio_direction_output(2, 0);
+ gpio_direction_output(3, 1);
+ msleep(1);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int parse_charger_param(void)
+{
+ char *dev_name = "eup2471";
+ char *env = "wmt.camera.flash";
+ char s[64];
+ size_t l = sizeof(s);
+ int gpio_en, gpio_flen;
+ int rc;
+
+ if (wmt_getsyspara(env, s, &l)) {
+ //pr_err("read %s fail!\n", env);
+ return -EINVAL;
+ }
+
+ if (strncmp(s, dev_name, strlen(dev_name))) {
+ return -EINVAL;
+ }
+
+ rc = sscanf(s, "eup2471:%d:%d", &gpio_en, &gpio_flen);
+ if (rc < 2) {
+ pr_err("bad uboot env: %s\n", env);
+ return -EINVAL;
+ }
+
+ rc = gpio_request(gpio_en, "flash eup2471 en");
+ if (rc) {
+ pr_err("flash en gpio(%d) request failed\n", gpio_en);
+ return rc;
+ }
+
+ rc = gpio_request(gpio_flen, "flash eup2471 flen");
+ if (rc) {
+ pr_err("flash flen gpio(%d) request failed\n", gpio_flen);
+ gpio_free(gpio_en);
+ return rc;
+ }
+
+ eup = kzalloc(sizeof(*eup), GFP_KERNEL);
+ if (!eup)
+ return -ENOMEM;
+
+ eup->gpio_en = gpio_en;
+ eup->gpio_flen = gpio_flen;
+
+ printk("flash eup2471 register ok: en %d, flen %d\n",
+ eup->gpio_en, eup->gpio_flen);
+ return 0;
+}
+
+static int flash_dev_init(void)
+{
+ if (eup)
+ return -EINVAL;
+
+ return parse_charger_param();
+}
+
+static void flash_dev_exit(void)
+{
+ if (eup) {
+ gpio_free(eup->gpio_en);
+ gpio_free(eup->gpio_flen);
+ kfree(eup);
+ eup = NULL;
+ }
+}
+
+struct flash_dev flash_dev_eup2471 = {
+ .name = "eup2471",
+ .init = flash_dev_init,
+ .set_mode = flash_dev_set_mode,
+ .exit = flash_dev_exit,
+};
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup3618.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup3618.c
new file mode 100755
index 00000000..f8b48ae8
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash_eup3618.c
@@ -0,0 +1,124 @@
+
+/* wmt.camera.flash ::
+ * wmt.camera.flash eup3618:14:15
+ */
+
+#include
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "flash.h"
+
+struct eup3618_struct {
+ int gpio_en;
+ int gpio_flen;
+};
+
+static struct eup3618_struct *eup;
+
+/*
+ * TODO register flash as a subdev
+ */
+static int flash_dev_set_mode(int mode)
+{
+ if (!eup)
+ return -EINVAL;
+
+ switch (mode) {
+ case FLASH_MODE_OFF:
+ gpio_direction_output(eup->gpio_en, 0);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_ON:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 1);
+ break;
+ case FLASH_MODE_STROBE:
+ gpio_direction_output(eup->gpio_en, 0);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_TORCH:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 1);
+ msleep(1);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int parse_charger_param(void)
+{
+ char *dev_name = "eup3618";
+ char *env = "wmt.camera.flash";
+ char s[64];
+ size_t l = sizeof(s);
+ int gpio_en, gpio_flen;
+ int rc;
+
+ if (wmt_getsyspara(env, s, &l)) {
+ // pr_err("read %s fail!\n", env);
+ return -EINVAL;
+ }
+
+ if (strncmp(s, dev_name, strlen(dev_name))) {
+ return -EINVAL;
+ }
+
+ rc = sscanf(s, "eup3618:%d:%d", &gpio_en, &gpio_flen);
+ if (rc < 2) {
+ pr_err("bad uboot env: %s\n", env);
+ return -EINVAL;
+ }
+
+ rc = gpio_request(gpio_en, "flash eup3618 en");
+ if (rc) {
+ pr_err("flash en gpio(%d) request failed\n", gpio_en);
+ return rc;
+ }
+
+ rc = gpio_request(gpio_flen, "flash eup3618 flen");
+ if (rc) {
+ pr_err("flash flen gpio(%d) request failed\n", gpio_flen);
+ gpio_free(gpio_en);
+ return rc;
+ }
+
+ eup = kzalloc(sizeof(*eup), GFP_KERNEL);
+ if (!eup)
+ return -ENOMEM;
+
+ eup->gpio_en = gpio_en;
+ eup->gpio_flen = gpio_flen;
+
+ printk("flash eup3618 register ok: en %d, flen %d\n",
+ eup->gpio_en, eup->gpio_flen);
+ return 0;
+}
+
+static int flash_dev_init(void)
+{
+ if (eup)
+ return -EINVAL;
+
+ return parse_charger_param();
+}
+
+static void flash_dev_exit(void)
+{
+ if (eup) {
+ gpio_free(eup->gpio_en);
+ gpio_free(eup->gpio_flen);
+ kfree(eup);
+ eup = NULL;
+ }
+}
+
+struct flash_dev flash_dev_eup3618 = {
+ .name = "eup3618",
+ .init = flash_dev_init,
+ .set_mode = flash_dev_set_mode,
+ .exit = flash_dev_exit,
+};
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash_gpio.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash_gpio.c
new file mode 100755
index 00000000..7e29306d
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash_gpio.c
@@ -0,0 +1,103 @@
+/*
+ * ==========================================================================
+ *
+ * Filename: flash_gpio.c
+ *
+ * Description: wmt.camera.flash gpio:6
+ *
+ * Version: 0.01
+ * Created: 2013骞07鏈02鏃 15鏃00鍒12绉
+ *
+ * Author: smmei (),
+ * Company:
+ *
+ * ==========================================================================
+ */
+
+#include
+#include
+#include "../cmos-subdev.h"
+#include "flash.h"
+
+static int fl_gpio = -1;
+
+static int flash_dev_set_mode(int mode)
+{
+ if (fl_gpio < 0)
+ return -EINVAL;
+
+ switch (mode) {
+ case FLASH_MODE_OFF:
+ gpio_direction_output(fl_gpio, 0);
+ break;
+ case FLASH_MODE_ON:
+ gpio_direction_output(fl_gpio, 1);
+ break;
+ case FLASH_MODE_STROBE:
+ gpio_direction_output(fl_gpio, 1);
+ break;
+ case FLASH_MODE_TORCH:
+ gpio_direction_output(fl_gpio, 1);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int parse_charger_param(void)
+{
+ char *dev_name = "gpio";
+ char *env = "wmt.camera.flash";
+ char s[64];
+ size_t l = sizeof(s);
+ int gpio;
+ int rc;
+
+ if (wmt_getsyspara(env, s, &l)) {
+ //pr_err("read %s fail!\n", env);
+ return -EINVAL;
+ }
+
+ if (strncmp(s, dev_name, strlen(dev_name))) {
+ return -EINVAL;
+ }
+
+ rc = sscanf(s, "gpio:%d", &gpio);
+ if (rc < 1) {
+ pr_err("bad uboot env: %s\n", env);
+ return -EINVAL;
+ }
+
+ rc = gpio_request(gpio, "flash gpio");
+ if (rc) {
+ pr_err("flash gpio(%d) request failed\n", gpio);
+ return rc;
+ }
+
+ fl_gpio = gpio;
+ printk("flash gpio%d register success\n", fl_gpio);
+ return 0;
+}
+
+static int flash_dev_init(void)
+{
+ return parse_charger_param();
+}
+
+static void flash_dev_exit(void)
+{
+ if (fl_gpio >= 0) {
+ gpio_free(fl_gpio);
+ fl_gpio = -1;
+ }
+}
+
+struct flash_dev flash_dev_gpio = {
+ .name = "gpio",
+ .init = flash_dev_init,
+ .set_mode = flash_dev_set_mode,
+ .exit = flash_dev_exit,
+};
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash_ktd231.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash_ktd231.c
new file mode 100755
index 00000000..a0926e4e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash_ktd231.c
@@ -0,0 +1,156 @@
+
+/* wmt.camera.flash ::
+ * wmt.camera.flash ktd231:2
+ */
+
+#include
+#include
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "flash.h"
+#include
+
+struct ktd231_struct {
+ int gpio_en;
+ struct pwm_device *pwm;
+};
+
+static struct ktd231_struct *ktd;
+
+static void config_pwm1_pin(int enable)
+{
+ int val;
+ if(enable) {
+ val = readb(0xd8110200+WMT_MMAP_OFFSET);
+ val &= ~(1 << 7);
+ writeb(val, 0xd8110200+WMT_MMAP_OFFSET);
+ }else{
+ val = readb(0xd8110200+WMT_MMAP_OFFSET);
+ val |= (1 << 7);
+ writeb(val, 0xd8110200+WMT_MMAP_OFFSET);
+ }
+}
+
+static void enable_pwm1_32KHz(int enable)
+{
+ if(enable) {
+ pwm_config(ktd->pwm, 15625, 31250);// configuration output 32Khz
+ pwm_enable(ktd->pwm);
+ //config_pwm1_pin(0x01);
+ printk("enable 32khz output\n");
+ }else{
+ pwm_disable(ktd->pwm);
+ //config_pwm1_pin(0x00);
+ printk("disable 32khz output\n");
+ }
+}
+
+/*
+ * TODO register flash as a subdev
+ */
+static int flash_dev_set_mode(int mode)
+{
+ if (!ktd)
+ return -EINVAL;
+
+ switch (mode) {
+ case FLASH_MODE_OFF:
+ gpio_direction_output(ktd->gpio_en, 0);
+ enable_pwm1_32KHz(0);
+ break;
+ case FLASH_MODE_ON:
+ gpio_direction_output(ktd->gpio_en, 1);
+ enable_pwm1_32KHz(0);
+ break;
+ case FLASH_MODE_STROBE:
+ break;
+ case FLASH_MODE_TORCH:
+ gpio_direction_output(ktd->gpio_en, 0);
+ enable_pwm1_32KHz(1);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int parse_charger_param(void)
+{
+ char *dev_name = "ktd231";
+ char *env = "wmt.camera.flash";
+ char s[64];
+ size_t l = sizeof(s);
+ int gpio_en;
+ int rc;
+ struct pwm_device *pwm;
+
+ if (wmt_getsyspara(env, s, &l)) {
+ // pr_err("read %s fail!\n", env);
+ return -EINVAL;
+ }
+
+ if (strncmp(s, dev_name, strlen(dev_name))) {
+ return -EINVAL;
+ }
+
+ rc = sscanf(s, "ktd231:%d", &gpio_en);
+ if (rc < 1) {
+ pr_err("bad uboot env: %s\n", env);
+ return -EINVAL;
+ }
+
+ rc = gpio_request(gpio_en, "flash ktd231 en");
+ if (rc) {
+ pr_err("flash en gpio(%d) request failed\n", gpio_en);
+ return rc;
+ }
+ gpio_direction_output(gpio_en, 0);
+
+ pwm = pwm_request(1, "pwm_flash");
+ if (IS_ERR(pwm)) {
+ pr_err("unable to request PWM for flash\n");
+ gpio_free(gpio_en);
+ return -EINVAL;
+ }
+
+ ktd = kzalloc(sizeof(*ktd), GFP_KERNEL);
+ if (!ktd)
+ return -ENOMEM;
+
+ config_pwm1_pin(0x01);
+
+ ktd->gpio_en = gpio_en;
+ ktd->pwm = pwm;
+ enable_pwm1_32KHz(0);
+ printk("flash ktd231 register ok: en %d\n",ktd->gpio_en);
+
+ return 0;
+}
+
+static int flash_dev_init(void)
+{
+ if (ktd)
+ return -EINVAL;
+
+ return parse_charger_param();
+}
+
+static void flash_dev_exit(void)
+{
+ if (ktd) {
+ enable_pwm1_32KHz(0);
+ gpio_free(ktd->gpio_en);
+ pwm_free(ktd->pwm);
+ kfree(ktd);
+ ktd = NULL;
+ }
+}
+
+struct flash_dev flash_dev_ktd231 = {
+ .name = "ktd231",
+ .init = flash_dev_init,
+ .set_mode = flash_dev_set_mode,
+ .exit = flash_dev_exit,
+};
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/flash/flash_sgm3780.c b/drivers/media/video/wmt_v4l2/sensors/flash/flash_sgm3780.c
new file mode 100755
index 00000000..42353545
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/flash/flash_sgm3780.c
@@ -0,0 +1,207 @@
+
+/* wmt.camera.flash :::
+ * wmt.camera.flash sgm3780:3:2:12
+ */
+
+#include
+#include
+#include
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "flash.h"
+
+enum key_status {
+ Idle,Pending,Pressure
+};
+
+struct key_struct{
+ int gpio;
+ enum key_status sts;
+ bool need_on;
+ struct work_struct work;
+};
+
+struct sgm3780_struct {
+ int gpio_en;
+ int gpio_flen;
+ struct key_struct torch_key;
+};
+
+static struct sgm3780_struct *eup;
+
+/*
+ * TODO register flash as a subdev
+ */
+static int flash_dev_set_mode(int mode)
+{
+ if (!eup)
+ return -EINVAL;
+
+ switch (mode) {
+ case FLASH_MODE_OFF:
+ gpio_direction_output(eup->gpio_en, 0);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_ON:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 1);
+ break;
+ case FLASH_MODE_STROBE:
+ gpio_direction_output(eup->gpio_en, 0);
+ gpio_direction_output(eup->gpio_flen, 0);
+ break;
+ case FLASH_MODE_TORCH:
+ gpio_direction_output(eup->gpio_en, 1);
+ gpio_direction_output(eup->gpio_flen, 0);
+ msleep(1);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static void flash_key_scan_work(struct work_struct *work)
+{
+ struct sgm3780_struct *peup = container_of(work, struct sgm3780_struct,torch_key.work);
+
+ if(peup->torch_key.sts !=Idle){
+ pr_err("torch key is busy!!!\n");
+ goto work_done;
+ }
+ peup->torch_key.sts = Pending;
+ msleep(50);
+ if(peup->torch_key.sts == Pending){
+ if(!gpio_get_value(peup->torch_key.gpio)){
+ peup->torch_key.sts = Pressure;
+ }
+ }
+
+ if(peup->torch_key.sts == Pressure){
+ if(peup->torch_key.need_on == true){
+ flash_dev_set_mode(FLASH_MODE_TORCH);
+ peup->torch_key.need_on = false;
+ }else{
+ flash_dev_set_mode(FLASH_MODE_OFF);
+ peup->torch_key.need_on = true;
+ }
+ }
+
+work_done:
+ peup->torch_key.sts = Idle;
+ wmt_gpio_unmask_irq(peup->torch_key.gpio);
+}
+
+static irqreturn_t flash_key_ext_irq (int irq, void *dev_id)
+{
+ struct sgm3780_struct *peup = dev_id;
+
+ if(!is_gpio_irqenable(peup->torch_key.gpio) || !gpio_irqstatus(peup->torch_key.gpio))
+ return IRQ_NONE;
+
+ wmt_gpio_ack_irq(peup->torch_key.gpio);
+ wmt_gpio_mask_irq(peup->torch_key.gpio);
+ schedule_work(&peup->torch_key.work);
+
+ return IRQ_HANDLED;
+}
+
+static void key_setup_extirq(struct sgm3780_struct *peup)
+{
+ int ret;
+
+ wmt_gpio_setpull(peup->torch_key.gpio,WMT_GPIO_PULL_UP);
+ wmt_gpio_set_irq_type(peup->torch_key.gpio,IRQ_TYPE_EDGE_FALLING);
+ wmt_gpio_mask_irq(peup->torch_key.gpio);
+ wmt_gpio_ack_irq(peup->torch_key.gpio);
+ ret = request_irq(IRQ_GPIO, flash_key_ext_irq, IRQF_SHARED,"sgm3780_key_irq", peup);
+ if (ret) {
+ printk("request irq type IRQ_TYPE_EDGE_FALLING fail!\n");
+ return;
+ }
+ wmt_gpio_ack_irq(peup->torch_key.gpio);
+ wmt_gpio_unmask_irq(peup->torch_key.gpio);
+}
+
+static int parse_charger_param(void)
+{
+ char *dev_name = "sgm3780";
+ char *env = "wmt.camera.flash";
+ char s[64];
+ size_t l = sizeof(s);
+ int gpio_en, gpio_flen,gpio_key;
+ int rc;
+
+ if (wmt_getsyspara(env, s, &l)) {
+ // pr_err("read %s fail!\n", env);
+ return -EINVAL;
+ }
+
+ if (strncmp(s, dev_name, strlen(dev_name))) {
+ return -EINVAL;
+ }
+
+ rc = sscanf(s, "sgm3780:%d:%d:%d", &gpio_en, &gpio_flen,&gpio_key);
+ if (rc < 2) {
+ pr_err("bad uboot env: %s\n", env);
+ return -EINVAL;
+ }
+
+ rc = gpio_request(gpio_en, "flash sgm3780 en");
+ if (rc) {
+ pr_err("flash en gpio(%d) request failed\n", gpio_en);
+ return rc;
+ }
+
+ rc = gpio_request(gpio_flen, "flash sgm3780 flen");
+ if (rc) {
+ pr_err("flash flen gpio(%d) request failed\n", gpio_flen);
+ gpio_free(gpio_en);
+ return rc;
+ }
+
+ eup = kzalloc(sizeof(*eup), GFP_KERNEL);
+ if (!eup)
+ return -ENOMEM;
+
+ eup->gpio_en = gpio_en;
+ eup->gpio_flen = gpio_flen;
+ eup->torch_key.gpio = gpio_key;
+ eup->torch_key.need_on = true;
+ INIT_WORK(&eup->torch_key.work,flash_key_scan_work);
+ key_setup_extirq(eup);
+
+ printk("flash sgm3780 register ok: en %d, flen %d, key %d\n",
+ eup->gpio_en, eup->gpio_flen,eup->torch_key.gpio);
+
+ return 0;
+}
+
+static int flash_dev_init(void)
+{
+ if (eup)
+ return -EINVAL;
+
+ return parse_charger_param();
+}
+
+static void flash_dev_exit(void)
+{
+ if (eup) {
+ gpio_free(eup->gpio_en);
+ gpio_free(eup->gpio_flen);
+ cancel_work_sync(&eup->torch_key.work);
+ free_irq(IRQ_GPIO,eup);
+ kfree(eup);
+ eup = NULL;
+ }
+}
+
+struct flash_dev flash_dev_sgm3780 = {
+ .name = "sgm3780",
+ .init = flash_dev_init,
+ .set_mode = flash_dev_set_mode,
+ .exit = flash_dev_exit,
+};
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307-twv82222z2-f10.h b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307-twv82222z2-f10.h
new file mode 100755
index 00000000..6e48cd00
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307-twv82222z2-f10.h
@@ -0,0 +1,624 @@
+#ifndef GC0307_H
+#define GC0307_H
+
+
+// Scene Mode
+uint8_t gc0307_scene_mode_auto[] = {
+
+};
+
+uint8_t gc0307_scene_mode_night[] = {
+
+};
+
+
+// White Balance
+uint8_t gc0307_wb_auto [] = {
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x4c,
+ 0xc8,0x40,
+ 0xc9,0x4a,
+};
+
+uint8_t gc0307_wb_incandescent [] = {
+ //bai re guang
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x48,
+ 0xc8,0x40,
+ 0xc9,0x5c,
+};
+
+uint8_t gc0307_wb_fluorescent [] = {
+ //ri guang deng
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x40,
+ 0xc8,0x42,
+ 0xc9,0x50,
+};
+
+uint8_t gc0307_wb_daylight [] = {
+ //tai yang guang
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x50,
+ 0xc8,0x45,
+ 0xc9,0x40,
+};
+
+uint8_t gc0307_wb_cloudy [] = {
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x5a,
+ 0xc8,0x42,
+ 0xc9,0x40,
+};
+
+
+// Exposure
+uint8_t gc0307_exposure_neg6[] = {
+ 0xf0,0x00,
+ 0x7a,0xd0,
+ 0xd1,0x38,
+};
+
+uint8_t gc0307_exposure_neg3[] = {
+ 0xf0,0x00,
+ 0x7a,0xe0,
+ 0xd1,0x48,
+};
+
+uint8_t gc0307_exposure_zero[] = {
+ 0xf0,0x00,
+ 0x7a,0x00,
+ 0xd1,0x50,
+};
+
+uint8_t gc0307_exposure_pos3[] = {
+ 0xf0,0x00,
+ 0x7a,0x20,
+ 0xd1,0x58,
+};
+
+uint8_t gc0307_exposure_pos6[] = {
+ 0xf0,0x00,
+ 0x7a,0x40,
+ 0xd1,0x68,
+};
+
+
+//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+ 0x9c ,0x7E,
+ 0x9d ,0x94,
+ 0x9e ,0xA7,
+ 0x9f ,0xBA,
+ 0xa0 ,0xC8,
+ 0xa1 ,0xD4,
+ 0xa2 ,0xE7,
+ 0xa3 ,0xF4,
+ 0xa4 ,0xFA,
+
+
+ 0xf0 ,0x00,
+ 0x40 ,0x7e,
+ 0x41 ,0x2F,
+
+
+ 0x0f, 0xb2,
+ 0x45, 0x27,
+ 0x47, 0x2c,
+
+
+
+
+#if 0
+
+ 0x0f, 0xb2,
+ 0x45, 0x27,
+ 0x47, 0x2c,
+
+
+ 0x0f, 0xa2,
+ 0x45, 0x26,
+ 0x47, 0x28,
+
+
+ 0x0f, 0x92,
+ 0x45, 0x25,
+ 0x47, 0x24,
+
+
+ 0x0f, 0x82,
+ 0x45, 0x24,
+ 0x47, 0x20,
+#endif
+
+
+
+ 0x43 ,0x40,
+ 0x44 ,0xE2,
+
+ 0xff,0xff,
+
+
+
+ 0x01 ,0xfa ,
+ 0x02 ,0x70,
+ 0x10 ,0x01 ,
+ 0xd6 ,0x64,
+ 0x28 ,0x02,
+ 0x29 ,0x58,
+ 0x2a ,0x03,
+ 0x2b ,0x20,
+ 0x2c ,0x03,
+ 0x2d ,0xe8 ,
+ 0x2e ,0x09,
+ 0x2f ,0xc4,
+
+ 0x7e ,0x65,
+ 0x7f ,0x56,
+
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.c b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.c
new file mode 100755
index 00000000..7d46e1de
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.c
@@ -0,0 +1,371 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0307.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+struct sensor_flip{
+ int h_flip;
+ int v_flip;
+ int cnt;
+}gc0307_flip;
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, gc0307_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0307_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs,data;
+
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ sensor_write(sd, 0xf0, 0x00);
+ data = sensor_read(sd, 0x41);
+ data |=0x04;
+ sensor_write(sd, 0x41, data);
+ regs = gc0307_wb_auto;
+ size = ARRAY_SIZE(gc0307_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ sensor_write(sd, 0xf0, 0x00);
+ data = sensor_read(sd, 0x41);
+ data &=0xfb;
+ sensor_write(sd, 0x41, data);
+ regs = gc0307_wb_incandescent;
+ size = ARRAY_SIZE(gc0307_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ sensor_write(sd, 0xf0, 0x00);
+ data = sensor_read(sd, 0x41);
+ data &=0xfb;
+ sensor_write(sd, 0x41, data);
+ regs = gc0307_wb_daylight;
+ size = ARRAY_SIZE(gc0307_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ sensor_write(sd, 0xf0, 0x00);
+ data = sensor_read(sd, 0x41);
+ data &=0xfb;
+ sensor_write(sd, 0x41, data);
+ regs = gc0307_wb_cloudy;
+ size = ARRAY_SIZE(gc0307_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ sensor_write(sd, 0xf0, 0x00);
+ data = sensor_read(sd, 0x41);
+ data &=0xfb;
+ sensor_write(sd, 0x41, data);
+ regs = gc0307_wb_fluorescent;
+ size = ARRAY_SIZE(gc0307_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ mdelay(80);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc0307_scene_mode_auto;
+ size = ARRAY_SIZE(gc0307_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc0307_scene_mode_night;
+ size = ARRAY_SIZE(gc0307_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc0307_exposure_neg6;
+ size = ARRAY_SIZE(gc0307_exposure_neg6);
+ break;
+ case -1:
+ regs = gc0307_exposure_neg3;
+ size = ARRAY_SIZE(gc0307_exposure_neg3);
+ break;
+ case 0:
+ regs = gc0307_exposure_zero;
+ size = ARRAY_SIZE(gc0307_exposure_zero);
+ break;
+ case 1:
+ regs = gc0307_exposure_pos3;
+ size = ARRAY_SIZE(gc0307_exposure_pos3);
+ break;
+ case 2:
+ regs = gc0307_exposure_pos6;
+ size = ARRAY_SIZE(gc0307_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_do_flip(struct cmos_subdev *sd)
+{
+ if ((gc0307_flip.h_flip == 0) &&(gc0307_flip.v_flip == 0)){
+ sensor_write( sd, 0x0f, 0xb2);
+ sensor_write( sd, 0x45, 0x27);
+ sensor_write( sd, 0x47, 0x2c);
+ }else if ((gc0307_flip.h_flip == 0) &&(gc0307_flip.v_flip == 1)){
+ sensor_write( sd, 0x0f, 0xa2);
+ sensor_write( sd, 0x45, 0x26);
+ sensor_write( sd, 0x47, 0x28);
+ }else if ((gc0307_flip.h_flip == 1) &&(gc0307_flip.v_flip == 0)){
+ sensor_write( sd, 0x0f, 0x92);
+ sensor_write( sd, 0x45, 0x25);
+ sensor_write( sd, 0x47, 0x24);
+ }else if ((gc0307_flip.h_flip == 1) &&(gc0307_flip.v_flip == 1)){
+ sensor_write( sd, 0x0f, 0x82);
+ sensor_write( sd, 0x45, 0x24);
+ sensor_write( sd, 0x47, 0x20);
+ }
+
+ msleep(100);
+ return 0;
+}
+
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ gc0307_flip.cnt ++;
+
+ switch (value) {
+ case 0:
+ gc0307_flip.h_flip=0;
+ break;
+ case 1:
+ gc0307_flip.h_flip=1;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if(gc0307_flip.cnt==2)
+ sensor_do_flip(sd);
+
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ gc0307_flip.cnt ++;
+
+ switch (value) {
+ case 0:
+ gc0307_flip.v_flip=0;
+ break;
+ case 1:
+ gc0307_flip.v_flip=1;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if(gc0307_flip.cnt==2)
+ sensor_do_flip(sd);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+ gc0307_flip.cnt=0;
+ sensor_write_array(sd, gc0307_default_regs_init,
+ ARRAY_SIZE(gc0307_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0307_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc0307 = {
+ .name = "gc0307",
+ .i2c_addr = 0x21,
+ .id = 0x99,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0307_ops,
+};
+
+#if 0
+static int __init gc0307_init(void)
+{
+ return cmos_register_sudbdev(&gc0307);
+}
+
+static void __exit gc0307_exit(void)
+{
+ return cmos_unregister_subdev(&gc0307);
+}
+
+module_init(gc0307_init);
+module_exit(gc0307_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.h b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.h
new file mode 100755
index 00000000..9c58f202
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0307/gc0307.h
@@ -0,0 +1,567 @@
+#ifndef GC0307_H
+#define GC0307_H
+
+
+// Scene Mode
+uint8_t gc0307_scene_mode_auto[] = {
+
+};
+
+uint8_t gc0307_scene_mode_night[] = {
+
+};
+
+
+// White Balance
+uint8_t gc0307_wb_auto [] = {
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x4c,
+ 0xc8,0x40,
+ 0xc9,0x4a,
+};
+
+uint8_t gc0307_wb_incandescent [] = {
+ //bai re guang
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x48,
+ 0xc8,0x40,
+ 0xc9,0x5c,
+};
+
+uint8_t gc0307_wb_fluorescent [] = {
+ //ri guang deng
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x40,
+ 0xc8,0x42,
+ 0xc9,0x50,
+};
+
+uint8_t gc0307_wb_daylight [] = {
+ //tai yang guang
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x50,
+ 0xc8,0x45,
+ 0xc9,0x40,
+};
+
+uint8_t gc0307_wb_cloudy [] = {
+ 0xf0,0x00,
+// 0x41,0x2b,
+ 0xc7,0x5a,
+ 0xc8,0x42,
+ 0xc9,0x40,
+};
+
+
+// Exposure
+uint8_t gc0307_exposure_neg6[] = {
+ 0xf0,0x00,
+ 0x7a,0xd0,
+ 0xd1,0x38,
+};
+
+uint8_t gc0307_exposure_neg3[] = {
+ 0xf0,0x00,
+ 0x7a,0xe0,
+ 0xd1,0x48,
+};
+
+uint8_t gc0307_exposure_zero[] = {
+ 0xf0,0x00,
+ 0x7a,0x00,
+ 0xd1,0x50,
+};
+
+uint8_t gc0307_exposure_pos3[] = {
+ 0xf0,0x00,
+ 0x7a,0x20,
+ 0xd1,0x58,
+};
+
+uint8_t gc0307_exposure_pos6[] = {
+ 0xf0,0x00,
+ 0x7a,0x40,
+ 0xd1,0x68,
+};
+
+
+// Resolution
+uint8_t gc0307_320x240[]= {
+ 0x05,0x00,
+ 0x06,0x78,
+ 0x07,0x00,
+ 0x08,0xa0,
+ 0x09,0x00,
+ 0x0a,0xf8,
+ 0x0b,0x01,
+ 0x0c,0x48,
+ 0x45,0x24, // bit[7:2]=001001
+ 0x48,0x04, // bit[7]= 0
+ 0xe0,0x02,
+ 0xe1,0x01,
+ 0xe2,0x13,
+ 0xe3,0x0f,
+ 0xe8,0x1c,
+ 0xe9,0x35,
+ 0xea,0x17,
+ 0xeb,0x29,
+ 0xec,0x39,
+};
+
+uint8_t gc0307_640x480[] = {
+#if 0
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x80,
+ 0x45,0x26, // bit[7:2]=001001
+ 0x48,0x84, // bit[7]=1
+ 0xe0,0x03,
+ 0xe1,0x02,
+ 0xe2,0x27,
+ 0xe3,0x1e,
+ 0xe8,0x3b,
+ 0xe9,0x6e,
+ 0xea,0x2c,
+ 0xeb,0x50,
+ 0xec,0x73,
+#endif
+};
+
+uint8_t gc0307_default_regs_init[] = {
+
+ // Initail Sequence Write In.
+ //========= close output
+ 0x43,0x00,
+ 0x44,0xa2,
+
+ //========= close some functions
+ // open them after configure their parmameters
+ 0x40,0x10,
+ 0x41,0x00,
+ 0x42,0x10,
+ 0x47,0x00,//mode1,
+ 0x48,0xc1,//mode2,
+ 0x49,0x00,//dither_mode
+ 0x4a,0x00,//clock_gating_en
+ 0x4b,0x00,//mode_reg3
+ 0x4E,0x23,//sync mode
+ 0x4F,0x01,//AWB, AEC, every N frame
+
+ //========= frame timing
+ 0x01,0x6a,//HB
+ 0x02,0x70,//VB//0c
+ 0x1C,0x00,//Vs_st
+ 0x1D,0x00,//Vs_et
+ 0x10,0x00,//high 4 bits of VB, HB
+ 0x11,0x05,//row_tail, AD_pipe_number
+
+ 0x03,0x01,//row_start
+ 0x04,0x2c,
+
+ //========= windowing
+ 0x05,0x00,//row_start
+ 0x06,0x00,
+ 0x07,0x00,//col start
+ 0x08,0x00,
+ 0x09,0x01,//win height
+ 0x0A,0xE8,
+ 0x0B,0x02,//win width, pixel array only 640
+ 0x0C,0x80,
+
+ //========= analog
+ 0x0D,0x22,//rsh_width
+ 0x0E,0x02,//CISCTL mode2,
+ 0x0F,0xb2,//CISCTL mode1
+
+
+ 0x12,0x70,//7 hrst, 6_4 darsg,
+ 0x13,0x00,//7 CISCTL_restart, 0 apwd
+ 0x14,0x00,//NA
+ 0x15,0xba,//7_4 vref
+ 0x16,0x13,//5to4 _coln_r, __1to0__da18
+ 0x17,0x52,//opa_r, ref_r, sRef_r
+ //0x18,0xc0,//analog_mode, best case for left band.
+ 0x18,0x00,
+
+ 0x1E,0x0d,//tsp_width
+ 0x1F,0x32,//sh_delay
+
+ //========= offset
+ 0x47,0x00, //7__test_image, __6__fixed_pga, //__5__auto_DN,__4__CbCr_fix,
+ //__3to2__dark_sequence, __1__allow_pclk_vcync, __0__LSC_test_image
+ 0x19,0x06, //pga_o
+ 0x1a,0x06, //pga_e
+
+ 0x31,0x00, //4 //pga_oFFset , high 8bits of 11bits
+ 0x3B,0x00, //global_oFFset, low 8bits of 11bits
+
+ 0x59,0x0f, //offset_mode
+ 0x58,0x88, //DARK_VALUE_RATIO_G, DARK_VALUE_RATIO_RB
+ 0x57,0x08, //DARK_CURRENT_RATE
+ 0x56,0x77, //PGA_OFFSET_EVEN_RATIO, PGA_OFFSET_ODD_RATIO
+
+ //========= blk
+ 0x35,0xd8, //blk_mode
+
+ 0x36,0x40,
+
+ 0x3C,0x00,
+ 0x3D,0x00,
+ 0x3E,0x00,
+ 0x3F,0x00,
+
+ 0xb5,0x70,
+ 0xb6,0x40,
+ 0xb7,0x00,
+ 0xb8,0x38,
+ 0xb9,0xc3,
+ 0xba,0x0f,
+
+ 0x7e,0x45,
+ 0x7f,0x66,
+
+ 0x5c,0x48,//78
+ 0x5d,0x58,//88
+
+
+ //========= manual_gain
+ 0x61,0x80,//manual_gain_g1
+ 0x63,0x80,//manual_gain_r
+ 0x65,0x98,//manual_gai_b, 0xa0=1.25, 0x98=1.1875
+ 0x67,0x80,//manual_gain_g2
+ 0x68,0x18,//global_manual_gain 2.4bits
+
+ //=========CC _R
+ 0x69,0x58, //54//58
+ 0x6A,0xf6, //ff
+ 0x6B,0xfb, //fe
+ 0x6C,0xf4, //ff
+ 0x6D,0x5a, //5f
+ 0x6E,0xe6, //e1
+
+ 0x6f,0x00,
+
+ //=========lsc
+ 0x70,0x14,
+ 0x71,0x1c,
+ 0x72,0x20,
+
+ 0x73,0x10,
+ 0x74,0x3c,//480/8
+ 0x75,0x52,// 640/8
+
+ //=========dn
+ 0x7d,0x2f, //dn_mode
+ 0x80,0x0c,//when auto_dn, check 7e,7f
+ 0x81,0x0c,
+ 0x82,0x44,
+
+ //dd
+ 0x83,0x18, //DD_TH1
+ 0x84,0x18, //DD_TH2
+ 0x85,0x04, //DD_TH3
+ 0x87,0x34, //32 b DNDD_low_range X16, DNDD_low_range_C_weight_center
+
+
+ //=========intp-ee
+ 0x88,0x04,
+ 0x89,0x01,
+ 0x8a,0x50,//60
+ 0x8b,0x50,//60
+ 0x8c,0x07,
+
+ 0x50,0x0c,
+ 0x5f,0x3c,
+
+ 0x8e,0x02,
+ 0x86,0x02,
+
+ 0x51,0x20,
+ 0x52,0x08,
+ 0x53,0x00,
+
+
+ //========= YCP
+ //contrast_center
+ 0x77,0x80,//contrast_center
+ 0x78,0x00,//fixed_Cb
+ 0x79,0x00,//fixed_Cr
+ 0x7a,0x00,//luma_offset
+ 0x7b,0x40,//hue_cos
+ 0x7c,0x00,//hue_sin
+
+ //saturation
+ 0xa0,0x40,//global_saturation
+ 0xa1,0x40,//luma_contrast
+ 0xa2,0x34,//saturation_Cb//0x34
+ 0xa3,0x32,// 34 saturation_Cr//0x34
+
+ 0xa4,0xc8,
+ 0xa5,0x02,
+ 0xa6,0x28,
+ 0xa7,0x02,
+
+ //skin
+ 0xa8,0xee,
+ 0xa9,0x12,
+ 0xaa,0x01,
+ 0xab,0x20,
+ 0xac,0xf0,
+ 0xad,0x10,
+
+ //========= ABS
+ 0xae,0x18,// black_pixel_target_number
+ 0xaf,0x74,
+ 0xb0,0xe0,
+ 0xb1,0x20,
+ 0xb2,0x6c,
+ 0xb3,0x40,
+ 0xb4,0x04,
+
+ //========= AWB
+ 0xbb,0x42,
+ 0xbc,0x60,
+ 0xbd,0x50,
+ 0xbe,0x50,
+
+ 0xbf,0x0c,
+ 0xc0,0x06,
+ 0xc1,0x60,
+ 0xc2,0xf1, //f4
+ 0xc3,0x40,
+ 0xc4,0x1c,//18
+ 0xc5,0x56,
+ 0xc6,0x1d,
+
+ 0xca,0x70,//0x70
+ 0xcb,0x70,//0x70
+ 0xcc,0x78,//0x78
+
+ 0xcd,0x80,//R_ratio
+ 0xce,0x80,//G_ratio , cold_white white
+ 0xcf,0x80,//B_ratio
+
+ //========= aecT
+ 0x20,0x06,//02
+ 0x21,0xc0,
+ 0x22,0x40,
+ 0x23,0x88,
+ 0x24,0x96,
+ 0x25,0x30,
+ 0x26,0xd0,
+ 0x27,0x00,
+
+
+ /////23 M
+ 0x28,0x02,//AEC_exp_level_1bit11to8
+ 0x29,0x58,//AEC_exp_level_1bit7to0
+ 0x2a,0x02,//AEC_exp_level_2bit11to8
+ 0x2b,0x58,//AEC_exp_level_2bit7to0
+ 0x2c,0x02,//AEC_exp_level_3bit11to8 659 - 8FPS, 8ca - 6FPS //
+ 0x2d,0x58,//AEC_exp_level_3bit7to0
+ 0x2e,0x02,//AEC_exp_level_4bit11to8 4FPS
+ 0x2f,0xee,//AEC_exp_level_4bit7to0
+
+ 0x30,0x20,
+ 0x31,0x00,
+ 0x32,0x1c,
+ 0x33,0x90,
+ 0x34,0x10,
+
+ 0xd0,0x34,//[2] 1 before gamma, 0 after gamma
+
+ 0xd1,0x50,//AEC_target_Y//0x50
+ 0xd2,0x61,//f2
+ 0xd4,0x4b,//96
+ 0xd5,0x01,// 10
+ 0xd6,0x4b,//antiflicker_step //96
+ 0xd7,0x03,//AEC_exp_time_min //10
+ 0xd8,0x02,
+
+ 0xdd,0x12,
+
+ //========= measure window
+ 0xe0,0x03,
+ 0xe1,0x02,
+ 0xe2,0x27,
+ 0xe3,0x1e,
+ 0xe8,0x3b,
+ 0xe9,0x6e,
+ 0xea,0x2c,
+ 0xeb,0x50,
+ 0xec,0x73,
+
+ //========= close_frame
+ 0xed,0x00,//close_frame_num1 ,can be use to reduce FPS
+ 0xee,0x00,//close_frame_num2
+ 0xef,0x00,//close_frame_num
+
+ // page1
+ 0xf0,0x01,//select page1
+
+ 0x00,0x20,
+ 0x01,0x20,
+ 0x02,0x20,
+ 0x03,0x20,
+ 0x04,0x78,
+ 0x05,0x78,
+ 0x06,0x78,
+ 0x07,0x78,
+
+
+
+ 0x10,0x04,
+ 0x11,0x04,
+ 0x12,0x04,
+ 0x13,0x04,
+ 0x14,0x01,
+ 0x15,0x01,
+ 0x16,0x01,
+ 0x17,0x01,
+
+
+ 0x20,0x00,
+ 0x21,0x00,
+ 0x22,0x00,
+ 0x23,0x00,
+ 0x24,0x00,
+ 0x25,0x00,
+ 0x26,0x00,
+ 0x27,0x00,
+
+ 0x40,0x11,
+
+ //=============================lscP
+ 0x45,0x06,
+ 0x46,0x06,
+ 0x47,0x05,
+
+ 0x48,0x04,
+ 0x49,0x03,
+ 0x4a,0x03,
+
+
+ 0x62,0xd8,
+ 0x63,0x24,
+ 0x64,0x24,
+ 0x65,0x24,
+ 0x66,0xd8,
+ 0x67,0x24,
+
+ 0x5a,0x00,
+ 0x5b,0x00,
+ 0x5c,0x00,
+ 0x5d,0x00,
+ 0x5e,0x00,
+ 0x5f,0x00,
+
+
+ //============================= ccP
+
+ 0x69,0x03,//cc_mode
+
+ //CC_G
+ 0x70,0x5d,
+ 0x71,0xed,
+ 0x72,0xff,
+ 0x73,0xe5,
+ 0x74,0x5f,
+ 0x75,0xe6,
+
+ //CC_B
+ 0x76,0x41,
+ 0x77,0xef,
+ 0x78,0xff,
+ 0x79,0xff,
+ 0x7a,0x5f,
+ 0x7b,0xfa,
+
+
+ //============================= AGP
+
+ 0x7e,0x00,
+ 0x7f,0x30, // 00 select gamma
+ 0x80,0x48, // c8
+ 0x81,0x06,
+ 0x82,0x08,
+
+
+ 0x83,0x23,
+ 0x84,0x38,
+ 0x85,0x4F,
+ 0x86,0x61,
+ 0x87,0x72,
+ 0x88,0x80,
+ 0x89,0x8D,
+ 0x8a,0xA2,
+ 0x8b,0xB2,
+ 0x8c,0xC0,
+ 0x8d,0xCA,
+ 0x8e,0xD3,
+ 0x8f,0xDB,
+ 0x90,0xE2,
+ 0x91,0xED,
+ 0x92,0xF6,
+ 0x93,0xFD,
+ /*
+ 0x83,0x13,
+ 0x84,0x23,
+ 0x85,0x35,
+ 0x86,0x44,
+ 0x87,0x53,
+ 0x88,0x60,
+ 0x89,0x6D,
+ 0x8a,0x84,
+ 0x8b,0x98,
+ 0x8c,0xaa,
+ 0x8d,0xb8,
+ 0x8e,0xc6,
+ 0x8f,0xd1,
+ 0x90,0xdb,
+ 0x91,0xea,
+ 0x92,0xf5,
+ 0x93,0xFb,
+ */
+ //about gamma1 is hex r oct
+ 0x94,0x04,
+ 0x95,0x0E,
+ 0x96,0x1B,
+ 0x97,0x28,
+ 0x98,0x35,
+ 0x99,0x41,
+ 0x9a,0x4E,
+ 0x9b,0x67,
+ 0x9c,0x7E,
+ 0x9d,0x94,
+ 0x9e,0xA7,
+ 0x9f,0xBA,
+ 0xa0,0xC8,
+ 0xa1,0xD4,
+ 0xa2,0xE7,
+ 0xa3,0xF4,
+ 0xa4,0xFA,
+
+ //========= open functions
+ 0xf0,0x00,//set back to page0
+
+ 0x40,0x7e,
+ 0x41,0x2f,
+ 0x43,0x40,
+ 0x44,0xE2,
+
+ 0x0f,0x82,
+ 0x45,0x24,
+ 0x47,0x20,
+ 0x4e,0x26,
+
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7303.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7303.h
new file mode 100755
index 00000000..06370f36
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7303.h
@@ -0,0 +1,450 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x03, //02//exp level 1 16.67fps
+ 0xe5,0x20, //58
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 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40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x40,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+
+ 0x57,0x7d,
+ 0x58,0x80,
+ 0x59,0x80,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7304.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7304.h
new file mode 100755
index 00000000..6610814b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-7304.h
@@ -0,0 +1,546 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg9[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xc0,
+ 0xd3, 0x20,
+};
+
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xd0,
+ 0xd3, 0x20,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x30,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x68,
+};
+
+uint8_t gc0308_exposure_pos9[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x30,
+ 0xd3, 0x78,
+};
+
+uint8_t gc0308_antibanding_auto[] = {
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+
+};
+
+uint8_t gc0308_antibanding_50hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+uint8_t gc0308_antibanding_60hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+
+};
+
+uint8_t gc0308_antibanding_off[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x14,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
+
+ 0x26,0x02, //0x03 20101016 zhj
+
+ 0x2f,0x01,
+ 0x30,0xf7,
+ 0x31,0x50,
+ 0x32,0x00,
+ 0x39,0x04,
+ 0x3a,0x18,
+ 0x3b,0x20,
+ 0x3c,0x00,
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0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x47,//42
+ 0xb5,0xf8,//fa
+ 0xb6,0xe0,
+
+ 0x57,0x7c,//0x7c
+ 0x58,0x7e,
+ 0x59,0x80,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-781a.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-781a.h
new file mode 100755
index 00000000..b6e44f40
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-781a.h
@@ -0,0 +1,448 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x04, //exp level 1 16.67fps
+ 0xe5,0x4c,
+ 0xe6,0x04, //exp level 2 12.5fps
+ 0xe7,0x4c,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x14,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,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,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x3a,// YCPT
+ 0xb2,0x3a,
+ 0xb3,0x42,//40 ary
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3.h
new file mode 100755
index 00000000..40c2dce6
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3.h
@@ -0,0 +1,451 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xfa,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
+
+ 0x26,0x02, //0x03 20101016 zhj
+
+ 0x2f,0x01,
+ 0x30,0xf7,
+ 0x31,0x50,
+ 0x32,0x00,
+ 0x39,0x04,
+ 0x3a,0x18,
+ 0x3b,0x20,
+ 0x3c,0x00,
+ 0x3d,0x00,
+ 0x3e,0x00,
+ 0x3f,0x00,
+ 0x50,0x10,
+ 0x53,0x82,
+ 0x54,0x80,
+ 0x55,0x80,
+ 0x56,0x82,
+ 0x8b,0x40,
+ 0x8c,0x40,
+ 0x8d,0x40,
+ 0x8e,0x2e,
+ 0x8f,0x2e,
+ 0x90,0x2e,
+ 0x91,0x3c,
+ 0x92,0x50,
+ 0x5d,0x12,
+ 0x5e,0x1a,
+ 0x5f,0x24,
+ 0x60,0x07,
+ 0x61,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xB0,
+ 0xca,0xCB,
+ 0xcb,0xE6,
+ 0xcc,0xFF,
+ 0xf0,0x02,
+ 0xf1,0x01,
+ 0xf2,0x01,
+ 0xf3,0x30,
+ 0xf9,0x9f,
+ 0xfa,0x78,
+ //----------------------------
+ 0xfe,0x01,// set page1
+ 0x00,0xf5,
+ 0x02,0x1a,
+ 0x0a,0xa0,
+ 0x0b,0x60,
+ 0x0c,0x08,
+ 0x0e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x3c,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x42,
+ 0xb5,0xfa,
+ 0xb6,0xe0,
+
+ 0x57,0x7c,
+ 0x58,0x7c,
+ 0x59,0x80,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3_qx.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3_qx.h
new file mode 100755
index 00000000..243c1a40
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gsg5-001gt7204-g3_qx.h
@@ -0,0 +1,451 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xfa,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x14,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
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0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x47,//42
+ 0xb5,0xf8,//fa
+ 0xb6,0xe0,
+
+ 0x57,0x7f,//0x7c
+ 0x58,0x7c,
+ 0x59,0x80,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gt7302-gmt.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gt7302-gmt.h
new file mode 100755
index 00000000..5dc8c66c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-gt7302-gmt.h
@@ -0,0 +1,609 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xfd,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+uint8_t gc0308_antibanding_auto[] = {
+ #if 0
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+ #else
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+ #endif
+
+};
+
+uint8_t gc0308_antibanding_50hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+uint8_t gc0308_antibanding_60hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+
+};
+
+uint8_t gc0308_antibanding_off[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x30,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
+
+ 0x26,0x02, //0x03 20101016 zhj
+
+ 0x2f,0x01,
+ 0x30,0xf7,
+ 0x31,0x50,
+ 0x32,0x00,
+ 0x39,0x04,
+ 0x3a,0x18,
+ 0x3b,0x20,
+ 0x3c,0x00,
+ 0x3d,0x00,
+ 0x3e,0x00,
+ 0x3f,0x00,
+ 0x50,0x10,
+ 0x53,0x82,
+ 0x54,0x80,
+ 0x55,0x80,
+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0x78,
+ //----------------------------
+ 0xfe,0x01,// set page1
+ 0x00,0xf5,
+ 0x02,0x1a,
+ 0x0a,0xa0,
+ 0x0b,0x60,
+ 0x0c,0x08,
+ 0x0e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x3a,// YCPT
+ 0xb2,0x3a,
+ 0xb3,0x38,// 3c
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x40,// 80
+ 0xb5,0xf8,
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-jfs0672-clw-gt7305.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-jfs0672-clw-gt7305.h
new file mode 100755
index 00000000..4f9ad904
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-jfs0672-clw-gt7305.h
@@ -0,0 +1,481 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xfa,//0x00
+ 0xd3, 0x44,//0x48 hyper
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ /*0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,*/
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x05, //exp level 3 7.14fps
+ 0xe9,0x78,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,//hyper
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0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e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x42,// YCPT
+ 0xb2,0x42,//40 hyper
+ 0xb3,0x42,//40 2013-7-24 dustin//45 hyper
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x44,// 80//48 hyper
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-110_v1.0.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-110_v1.0.h
new file mode 100755
index 00000000..9bbaab31
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-110_v1.0.h
@@ -0,0 +1,446 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0xd4,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0xe8,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x78,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
+
+ 0x26,0x02, //0x03 20101016 zhj
+
+ 0x2f,0x01,
+ 0x30,0xf7,
+ 0x31,0x50,
+ 0x32,0x00,
+ 0x39,0x04,
+ 0x3a,0x18,
+ 0x3b,0x20,
+ 0x3c,0x00,
+ 0x3d,0x00,
+ 0x3e,0x00,
+ 0x3f,0x00,
+ 0x50,0x10,
+ 0x53,0x82,
+ 0x54,0x80,
+ 0x55,0x80,
+ 0x56,0x82,
+ 0x8b,0x40,
+ 0x8c,0x40,
+ 0x8d,0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
+ 0xc0,0x00,
+ 0xc1,0x10,
+ 0xc2,0x1C,
+ 0xc3,0x30,
+ 0xc4,0x43,
+ 0xc5,0x54,
+ 0xc6,0x65,
+ 0xc7,0x75,
+ 0xc8,0x93,
+ 0xc9,0xB0,
+ 0xca,0xCB,
+ 0xcb,0xE6,
+ 0xcc,0xFF,
+ 0xf0,0x02,
+ 0xf1,0x01,
+ 0xf2,0x01,
+ 0xf3,0x30,
+ 0xf9,0x9f,
+ 0xfa,0x78,
+ //----------------------------
+ 0xfe,0x01,// set page1
+ 0x00,0xf5,
+ 0x02,0x1a,
+ 0x0a,0xa0,
+ 0x0b,0x60,
+ 0x0c,0x08,
+ 0x0e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x3a,// YCPT
+ 0xb2,0x3a,
+ 0xb3,0x43,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x45,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-173_v1.0.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-173_v1.0.h
new file mode 100755
index 00000000..e0fe145b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-kyt-173_v1.0.h
@@ -0,0 +1,446 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,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 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x40,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1.h
new file mode 100755
index 00000000..1bc51987
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1.h
@@ -0,0 +1,452 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x44,//48
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,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,0xa0,
+ 0x0b,0x60,
+ 0x0c,0x08,
+ 0x0e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x3b,//40//3xd
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x44,// 80//48
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1_qx.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1_qx.h
new file mode 100755
index 00000000..69692438
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-mrs-gt7305_v1_qx.h
@@ -0,0 +1,452 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x44,//48
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x14,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,
+ 0x25,0x0f,
+
+ //output sync_mode
+
+
+ 0x26,0x02, //0x03 20101016 zhj
+
+ 0x2f,0x01,
+ 0x30,0xf7,
+ 0x31,0x50,
+ 0x32,0x00,
+ 0x39,0x04,
+ 0x3a,0x18,
+ 0x3b,0x20,
+ 0x3c,0x00,
+ 0x3d,0x00,
+ 0x3e,0x00,
+ 0x3f,0x00,
+ 0x50,0x10,
+ 0x53,0x82,
+ 0x54,0x80,
+ 0x55,0x80,
+ 0x56,0x82,
+
+ 0x57,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//-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x42,// YCPT
+ 0xb2,0x42,
+ 0xb3,0x40,//40//3xd
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80//44
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-syx-gt7206.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-syx-gt7206.h
new file mode 100755
index 00000000..443407b3
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-syx-gt7206.h
@@ -0,0 +1,446 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b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 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x00, // 02
+ 0x95,0x07,
+ 0x96,0xf8, // e0
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x40,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-yb474-gt7303.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-yb474-gt7303.h
new file mode 100755
index 00000000..2702a6bb
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-yb474-gt7303.h
@@ -0,0 +1,465 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //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xc2,0x1C,
+ 0xc3,0x30,
+ 0xc4,0x43,
+ 0xc5,0x54,
+ 0xc6,0x65,
+ 0xc7,0x75,
+ 0xc8,0x93,
+ 0xc9,0xB0,
+ 0xca,0xCB,
+ 0xcb,0xE6,
+ 0xcc,0xFF,
+ 0xf0,0x02,
+ 0xf1,0x01,
+ 0xf2,0x01,
+ 0xf3,0x30,
+ 0xf9,0x9f,
+ 0xfa,0x78,
+ //----------------------------
+ 0xfe,0x01,// set page1
+ 0x00,0xf5,
+ 0x02,0x1a,
+ 0x0a,0xa0,
+ 0x0b,0x60,
+ 0x0c,0x08,
+ 0x0e,0x4c,
+ 0x0f,0x39,
+ 0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x45,//40 2013-7-24 dustin
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zh_tvbox.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zh_tvbox.h
new file mode 100755
index 00000000..e26931ad
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zh_tvbox.h
@@ -0,0 +1,447 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0xe8,
+ 0xe8,0x05, //exp level 3 8.33fps
+ 0xe9,0x78,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0x1f,0x16,
+
+
+
+ 0x20,0xff,
+ 0x21,0xf8,
+ 0x22,0x57,
+ 0x24,0xa2,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
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x36,// YCPT
+ 0xb2,0x36,
+ 0xb3,0x3c,
+ 0xb5,0xf0,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x42,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zyhb-twd8802.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zyhb-twd8802.h
new file mode 100755
index 00000000..817f09cf
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308-zyhb-twd8802.h
@@ -0,0 +1,447 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,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0x11,0x3f,
+ 0x12,0x72,
+ 0x13,0x13,
+ 0x14,0x42,
+ 0x15,0x43,
+ 0x16,0xc2,
+ 0x17,0xa8,
+ 0x18,0x18,
+ 0x19,0x40,
+ 0x1a,0xd0,
+ 0x1b,0xf5,
+ 0x70,0x40,
+ 0x71,0x58,
+ 0x72,0x30,
+ 0x73,0x48,
+ 0x74,0x20,
+ 0x75,0x60,
+ 0x77,0x20,
+ 0x78,0x32,
+ 0x30,0x03,
+ 0x31,0x40,
+ 0x32,0xe0,
+ 0x33,0xe0,
+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd
+
+ 0x1a,0x2a, // 1e
+
+
+ 0x1c,0x49,// c1
+ 0x1d,0x9a,// 08
+
+
+ 0x1e,0x61,// 60
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x38,// YCPT
+ 0xb2,0x38,
+ 0xb3,0x44,
+ 0xb5,0x04,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x4a,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.c b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.c
new file mode 100755
index 00000000..29be14b2
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.c
@@ -0,0 +1,378 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0308.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x10
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, gc0308_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0308_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc0308_wb_auto;
+ size = ARRAY_SIZE(gc0308_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc0308_wb_incandescent;
+ size = ARRAY_SIZE(gc0308_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc0308_wb_daylight;
+ size = ARRAY_SIZE(gc0308_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc0308_wb_cloudy;
+ size = ARRAY_SIZE(gc0308_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc0308_wb_fluorescent;
+ size = ARRAY_SIZE(gc0308_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc0308_scene_mode_auto;
+ size = ARRAY_SIZE(gc0308_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc0308_scene_mode_night;
+ size = ARRAY_SIZE(gc0308_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc0308_exposure_neg6;
+ size = ARRAY_SIZE(gc0308_exposure_neg6);
+ break;
+ case -1:
+ regs = gc0308_exposure_neg3;
+ size = ARRAY_SIZE(gc0308_exposure_neg3);
+ break;
+ case 0:
+ regs = gc0308_exposure_zero;
+ size = ARRAY_SIZE(gc0308_exposure_zero);
+ break;
+ case 1:
+ regs = gc0308_exposure_pos3;
+ size = ARRAY_SIZE(gc0308_exposure_pos3);
+ break;
+ case 2:
+ regs = gc0308_exposure_pos6;
+ size = ARRAY_SIZE(gc0308_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_antibanding(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case 0:
+ regs = gc0308_antibanding_auto;
+ size = ARRAY_SIZE(gc0308_antibanding_auto);
+ break;
+ case 1:
+ regs = gc0308_antibanding_50hz;
+ size = ARRAY_SIZE(gc0308_antibanding_50hz);
+ break;
+ case 2:
+ regs = gc0308_antibanding_60hz;
+ size = ARRAY_SIZE(gc0308_antibanding_60hz);
+ break;
+ case 3:
+ regs = gc0308_antibanding_off;
+ size = ARRAY_SIZE(gc0308_antibanding_off);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_CAMERA_ANTI_BANDING:
+ return sensor_s_antibanding(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc0308_default_regs_init,
+ ARRAY_SIZE(gc0308_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc0308_default_regs_exit,
+ ARRAY_SIZE(gc0308_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0308_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc0308 = {
+ .name = "gc0308",
+ .i2c_addr = 0x21,
+ .id = 0x9b,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0308_ops,
+};
+
+#if 0
+static int __init gc0308_init(void)
+{
+ return cmos_register_sudbdev(&gc0308);
+}
+
+static void __exit gc0308_exit(void)
+{
+ return cmos_unregister_subdev(&gc0308);
+}
+
+module_init(gc0308_init);
+module_exit(gc0308_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.h
new file mode 100755
index 00000000..5bd4382b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308.h
@@ -0,0 +1,530 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+uint8_t gc0308_antibanding_auto[] = {
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+
+};
+
+uint8_t gc0308_antibanding_50hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+uint8_t gc0308_antibanding_60hz[] = {
+ 0xfe,0x00,
+
+ 0x01,0x97,
+ 0x02,0x84,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x3e, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x6c,
+ 0xe6,0x02, //exp level 1 10fps
+ 0xe7,0xe8,
+ 0xe8,0x03, //exp level 2 7.69fps
+ 0xe9,0xe0,
+ 0xea,0x05, //exp level 3 5.00fps
+ 0xeb,0xd0,
+
+};
+
+uint8_t gc0308_antibanding_off[] = {
+ 0xfe,0x00,
+
+ 0x01,0x26,
+ 0x02,0x98,
+ 0x0f,0x03,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x50, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 0 12.5fps
+ 0xe5,0x80,
+ 0xe6,0x03, //exp level 1 10fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 2 7.69fps
+ 0xe9,0x10,
+ 0xea,0x06, //exp level 3 5.00fps
+ 0xeb,0x40,
+
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[] = {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[] = {
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x64, //anti-flicker step [7:0]
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x03, //exp level 2 12.5fps
+ 0xe7,0x20,
+ 0xe8,0x04, //exp level 3 8.33fps
+ 0xe9,0xb0,
+ 0xea,0x09, //exp level 4 4.00fps
+ 0xeb,0xc4,
+
+ 0xec,0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xd3,0x48,// 80
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_7300_hd.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_7300_hd.h
new file mode 100755
index 00000000..424eff2b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_7300_hd.h
@@ -0,0 +1,424 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+#define GC0308_I2C_ADDR 0x21
+
+#define gc0308_read_reg(r) wmt_vid_i2c_read(GC0308_I2C_ADDR, r)
+
+#define gc0308_write_reg(r, d) wmt_vid_i2c_write(GC0308_I2C_ADDR, r, d)
+
+#define gc0308_write_array(a) \
+do { \
+ cmos_init_8bit_addr(a, ARRAY_SIZE(a), GC0308_I2C_ADDR); \
+} while (0)
+
+
+// Scene Mode
+unsigned char gc0308_scene_mode_auto[] = {
+ 0xec, 0x20,
+};
+
+unsigned char gc0308_scene_mode_night[] = {
+ 0xec, 0x30,
+};
+
+
+// White Balance
+unsigned char gc0308_wb_auto [] = {
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+unsigned char gc0308_wb_incandescent [] = {
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+unsigned char gc0308_wb_fluorescent [] = {
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+unsigned char gc0308_wb_daylight [] = {
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+unsigned char gc0308_wb_cloudy [] = {
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+unsigned char gc0308_exposure_neg6[] = {
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+unsigned char gc0308_exposure_neg3[] = {
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+unsigned char gc0308_exposure_zero[] = {
+ 0xb5, 0x00,
+ 0xd3, 0x40,
+};
+
+unsigned char gc0308_exposure_pos3[] = {
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+unsigned char gc0308_exposure_pos6[] = {
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+unsigned char gc0308_320x240[]= {
+0xfe, 0x01, 0x54, 0x22, 0x55, 0x03, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0xfe, 0x00
+};
+
+unsigned char gc0308_640x480[]={
+0xfe,0x80,
+
+0xfe,0x00, // set page0
+
+0xd2,0x10, // close AEC
+0x22,0x55, // close AWB
+
+0x03,0x01,
+0x04,0x2c,
+0x5a,0x56,
+0x5b,0x40,
+0x5c,0x4a,
+
+0x22,0x57, // Open AWB
+
+0x01,0xfa,
+0x02,0x70,
+0x0f,0x01,
+
+0xe2,0x00, //anti-flicker step [11:8]
+0xe3,0x64, //anti-flicker step [7:0]
+
+0xe4,0x02, //exp level 1 16.67fps
+0xe5,0x58,
+0xe6,0x03, //exp level 2 12.5fps
+0xe7,0x20,
+0xe8,0x04, //exp level 3 8.33fps
+0xe9,0xb0,
+0xea,0x09, //exp level 4 4.00fps
+0xeb,0xc4,
+
+0xec,0x20,
+
+0x05,0x00,
+0x06,0x00,
+0x07,0x00,
+0x08,0x00,
+0x09,0x01,
+0x0a,0xe8,
+0x0b,0x02,
+0x0c,0x88,
+0x0d,0x02,
+0x0e,0x02,
+0x10,0x22,
+0x11,0xfd,
+0x12,0x2a,
+0x13,0x00,
+0x14,0x10, //0x10
+
+0x15,0x0a,
+0x16,0x05,
+0x17,0x01,
+0x18,0x44,
+0x19,0x44,
+0x1a,0x1e,
+0x1b,0x00,
+0x1c,0xc1,
+0x1d,0x08,
+0x1e,0x60,
+0x1f,0x03,
+
+
+
+0x20,0xff,
+0x21,0xf8,
+0x22,0x57,
+0x24,0xa2,
+0x25,0x0f,
+
+//output sync_mode
+
+
+0x26,0x02, //0x03 20101016 zhj
+
+0x2f,0x01,
+0x30,0xf7,
+0x31,0x50,
+0x32,0x00,
+0x39,0x04,
+0x3a,0x18,
+0x3b,0x20,
+0x3c,0x00,
+0x3d,0x00,
+0x3e,0x00,
+0x3f,0x00,
+0x50,0x10,
+0x53,0x82,
+0x54,0x80,
+0x55,0x80,
+0x56,0x82,
+0x8b,0x40,
+0x8c,0x40,
+0x8d,0x40,
+0x8e,0x2e,
+0x8f,0x2e,
+0x90,0x2e,
+0x91,0x3c,
+0x92,0x50,
+0x5d,0x12,
+0x5e,0x1a,
+0x5f,0x24,
+0x60,0x07,
+0x61,0x15,
+0x62,0x08,
+0x64,0x03,
+0x66,0xe8,
+0x67,0x86,
+0x68,0xa2,
+0x69,0x18,
+0x6a,0x0f,
+0x6b,0x00,
+0x6c,0x5f,
+0x6d,0x8f,
+0x6e,0x55,
+0x6f,0x38,
+0x70,0x15,
+0x71,0x33,
+0x72,0xdc,
+0x73,0x80,
+0x74,0x02,
+0x75,0x3f,
+0x76,0x02,
+0x77,0x54,
+0x78,0x88,
+0x79,0x81,
+0x7a,0x81,
+0x7b,0x22,
+0x7c,0xff,
+0x93,0x48,
+0x94,0x00,
+0x95,0x05,
+0x96,0xe8,
+0x97,0x40,
+0x98,0xf0,
+0xb1,0x38,
+0xb2,0x38,
+0xbd,0x38,
+0xbe,0x36,
+0xd0,0xc9,
+0xd1,0x10,
+//{{0xd2,0x90,
+0xd3,0x80,
+0xd5,0xf2,
+0xd6,0x16,
+0xdb,0x92,
+0xdc,0xa5,
+0xdf,0x23,
+0xd9,0x00,
+0xda,0x00,
+0xe0,0x09,
+
+0xed,0x04,
+0xee,0xa0,
+0xef,0x40,
+0x80,0x03,
+0x80,0x03,
+
+
+0x9F,0x10,
+0xA0,0x20,
+0xA1,0x38,
+0xA2,0x4E,
+0xA3,0x63,
+0xA4,0x76,
+0xA5,0x87,
+0xA6,0xA2,
+0xA7,0xB8,
+0xA8,0xCA,
+0xA9,0xD8,
+0xAA,0xE3,
+0xAB,0xEB,
+0xAC,0xF0,
+0xAD,0xF8,
+0xAE,0xFD,
+0xAF,0xFF,
+
+0xc0,0x00,
+0xc1,0x10,
+0xc2,0x1C,
+0xc3,0x30,
+0xc4,0x43,
+0xc5,0x54,
+0xc6,0x65,
+0xc7,0x75,
+0xc8,0x93,
+0xc9,0xB0,
+0xca,0xCB,
+0xcb,0xE6,
+0xcc,0xFF,
+0xf0,0x02,
+0xf1,0x01,
+0xf2,0x01,
+0xf3,0x30,
+0xf9,0x9f,
+0xfa,0x78,
+//----------------------------
+0xfe,0x01,// set page1
+0x00,0xf5,
+0x02,0x1a,
+0x0a,0xa0,
+0x0b,0x60,
+0x0c,0x08,
+0x0e,0x4c,
+0x0f,0x39,
+0x11,0x3f,
+0x12,0x72,
+0x13,0x13,
+0x14,0x42,
+0x15,0x43,
+0x16,0xc2,
+0x17,0xa8,
+0x18,0x18,
+0x19,0x40,
+0x1a,0xd0,
+0x1b,0xf5,
+0x70,0x40,
+0x71,0x58,
+0x72,0x30,
+0x73,0x48,
+0x74,0x20,
+0x75,0x60,
+0x77,0x20,
+0x78,0x32,
+0x30,0x03,
+0x31,0x40,
+0x32,0xe0,
+0x33,0xe0,
+0x34,0xe0,
+0x35,0xb0,
+0x36,0xc0,
+0x37,0xc0,
+0x38,0x04,
+0x39,0x09,
+0x3a,0x12,
+0x3b,0x1C,
+0x3c,0x28,
+0x3d,0x31,
+0x3e,0x44,
+0x3f,0x57,
+0x40,0x6C,
+0x41,0x81,
+0x42,0x94,
+0x43,0xA7,
+0x44,0xB8,
+0x45,0xD6,
+0x46,0xEE,
+0x47,0x0d,
+0xfe,0x00,// set page0
+
+//-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+0xfe,0x00,// set page0
+0x10,0x26,
+0x11,0x0d, // fd},{modified by mormo 2010/07/06
+
+0x1a,0x2a, // 1e},{modified by mormo 2010/07/06
+
+
+0x1c,0x49,// c1},{modified by mormo 2010/07/06
+0x1d,0x9a,// 08},{modified by mormo 2010/07/06
+
+
+0x1e,0x61,// 60},{modified by mormo 2010/07/06
+
+0x3a,0x20,
+
+0x50,0x14, // 10},{modified by mormo 2010/07/06
+
+
+0x53,0x80,
+0x56,0x80,
+
+0x8b,0x20,//LSC
+0x8c,0x20,
+0x8d,0x20,
+0x8e,0x14,
+0x8f,0x10,
+0x90,0x14,
+
+0x94,0x02,
+0x95,0x07,
+0x96,0xe0,
+
+0xb1,0x40,// YCPT
+0xb2,0x40,
+0xb3,0x38,
+0xb6,0xe0,
+
+0xd0,0xcb,// AECT c9},{modifed by mormo 2010/07/06
+
+
+0xd3,0x40,// 80},{modified by mormor 2010/07/06
+
+
+
+0xf2,0x02,
+0xf7,0x12,
+0xf8,0x0a,
+
+ //Registers of Page1
+0xfe,0x01,// set page1
+0x02,0x20,
+0x04,0x10,
+0x05,0x08,
+0x06,0x20,
+0x08,0x0a,
+
+0x0e,0x44,
+0x0f,0x32,
+0x10,0x41,
+0x11,0x37,
+0x12,0x22,
+0x13,0x19,
+0x14,0x44,
+0x15,0x44,
+
+0x19,0x50,
+0x1a,0xd8,
+
+0x32,0x10,
+
+0x35,0x00,
+0x36,0x80,
+0x37,0x00,
+//-----------Update the registers end---------//
+0xfe,0x00,// set page0
+0xd2,0x90,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8335c.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8335c.h
new file mode 100755
index 00000000..678d799e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8335c.h
@@ -0,0 +1,424 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+#define GC0308_I2C_ADDR 0x21
+
+#define gc0308_read_reg(r) wmt_vid_i2c_read(GC0308_I2C_ADDR, r)
+
+#define gc0308_write_reg(r, d) wmt_vid_i2c_write(GC0308_I2C_ADDR, r, d)
+
+#define gc0308_write_array(a) \
+do { \
+ cmos_init_8bit_addr(a, ARRAY_SIZE(a), GC0308_I2C_ADDR); \
+} while (0)
+
+
+// Scene Mode
+unsigned char gc0308_scene_mode_auto[] = {
+ 0xec, 0x20,
+};
+
+unsigned char gc0308_scene_mode_night[] = {
+ 0xec, 0x30,
+};
+
+
+// White Balance
+unsigned char gc0308_wb_auto [] = {
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+unsigned char gc0308_wb_incandescent [] = {
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+unsigned char gc0308_wb_fluorescent [] = {
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+unsigned char gc0308_wb_daylight [] = {
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+unsigned char gc0308_wb_cloudy [] = {
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+unsigned char gc0308_exposure_neg6[] = {
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+unsigned char gc0308_exposure_neg3[] = {
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+unsigned char gc0308_exposure_zero[] = {
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+unsigned char gc0308_exposure_pos3[] = {
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+unsigned char gc0308_exposure_pos6[] = {
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+unsigned char gc0308_320x240[]= {
+0xfe, 0x01, 0x54, 0x22, 0x55, 0x03, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0xfe, 0x00
+};
+
+unsigned char gc0308_640x480[]={
+0xfe,0x80,
+
+0xfe,0x00, // set page0
+
+0xd2,0x10, // close AEC
+0x22,0x55, // close AWB
+
+0x03,0x01,
+0x04,0x2c,
+0x5a,0x56,
+0x5b,0x40,
+0x5c,0x4a,
+
+0x22,0x57, // Open AWB
+
+0x01,0xfa,
+0x02,0x70,
+0x0f,0x01,
+
+0xe2,0x00, //anti-flicker step [11:8]
+0xe3,0x64, //anti-flicker step [7:0]
+
+0xe4,0x02, //exp level 1 16.67fps
+0xe5,0x58,
+0xe6,0x03, //exp level 2 12.5fps
+0xe7,0x20,
+0xe8,0x04, //exp level 3 8.33fps
+0xe9,0xb0,
+0xea,0x09, //exp level 4 4.00fps
+0xeb,0xc4,
+
+0xec,0x20,
+
+0x05,0x00,
+0x06,0x00,
+0x07,0x00,
+0x08,0x00,
+0x09,0x01,
+0x0a,0xe8,
+0x0b,0x02,
+0x0c,0x88,
+0x0d,0x02,
+0x0e,0x02,
+0x10,0x22,
+0x11,0xfd,
+0x12,0x2a,
+0x13,0x00,
+0x14,0x10, //0x10
+
+0x15,0x0a,
+0x16,0x05,
+0x17,0x01,
+0x18,0x44,
+0x19,0x44,
+0x1a,0x1e,
+0x1b,0x00,
+0x1c,0xc1,
+0x1d,0x08,
+0x1e,0x60,
+0x1f,0x03,
+
+
+
+0x20,0xff,
+0x21,0xf8,
+0x22,0x57,
+0x24,0xa2,
+0x25,0x0f,
+
+//output sync_mode
+
+
+0x26,0x02, //0x03 20101016 zhj
+
+0x2f,0x01,
+0x30,0xf7,
+0x31,0x50,
+0x32,0x00,
+0x39,0x04,
+0x3a,0x18,
+0x3b,0x20,
+0x3c,0x00,
+0x3d,0x00,
+0x3e,0x00,
+0x3f,0x00,
+0x50,0x10,
+0x53,0x82,
+0x54,0x80,
+0x55,0x80,
+0x56,0x82,
+0x8b,0x40,
+0x8c,0x40,
+0x8d,0x40,
+0x8e,0x2e,
+0x8f,0x2e,
+0x90,0x2e,
+0x91,0x3c,
+0x92,0x50,
+0x5d,0x12,
+0x5e,0x1a,
+0x5f,0x24,
+0x60,0x07,
+0x61,0x15,
+0x62,0x08,
+0x64,0x03,
+0x66,0xe8,
+0x67,0x86,
+0x68,0xa2,
+0x69,0x18,
+0x6a,0x0f,
+0x6b,0x00,
+0x6c,0x5f,
+0x6d,0x8f,
+0x6e,0x55,
+0x6f,0x38,
+0x70,0x15,
+0x71,0x33,
+0x72,0xdc,
+0x73,0x80,
+0x74,0x02,
+0x75,0x3f,
+0x76,0x02,
+0x77,0x54,
+0x78,0x88,
+0x79,0x81,
+0x7a,0x81,
+0x7b,0x22,
+0x7c,0xff,
+0x93,0x48,
+0x94,0x00,
+0x95,0x05,
+0x96,0xe8,
+0x97,0x40,
+0x98,0xf0,
+0xb1,0x38,
+0xb2,0x38,
+0xbd,0x38,
+0xbe,0x36,
+0xd0,0xc9,
+0xd1,0x10,
+//{{0xd2,0x90,
+0xd3,0x80,
+0xd5,0xf2,
+0xd6,0x16,
+0xdb,0x92,
+0xdc,0xa5,
+0xdf,0x23,
+0xd9,0x00,
+0xda,0x00,
+0xe0,0x09,
+
+0xed,0x04,
+0xee,0xa0,
+0xef,0x40,
+0x80,0x03,
+0x80,0x03,
+
+
+0x9F,0x10,
+0xA0,0x20,
+0xA1,0x38,
+0xA2,0x4E,
+0xA3,0x63,
+0xA4,0x76,
+0xA5,0x87,
+0xA6,0xA2,
+0xA7,0xB8,
+0xA8,0xCA,
+0xA9,0xD8,
+0xAA,0xE3,
+0xAB,0xEB,
+0xAC,0xF0,
+0xAD,0xF8,
+0xAE,0xFD,
+0xAF,0xFF,
+
+0xc0,0x00,
+0xc1,0x10,
+0xc2,0x1C,
+0xc3,0x30,
+0xc4,0x43,
+0xc5,0x54,
+0xc6,0x65,
+0xc7,0x75,
+0xc8,0x93,
+0xc9,0xB0,
+0xca,0xCB,
+0xcb,0xE6,
+0xcc,0xFF,
+0xf0,0x02,
+0xf1,0x01,
+0xf2,0x01,
+0xf3,0x30,
+0xf9,0x9f,
+0xfa,0x78,
+//----------------------------
+0xfe,0x01,// set page1
+0x00,0xf5,
+0x02,0x1a,
+0x0a,0xa0,
+0x0b,0x60,
+0x0c,0x08,
+0x0e,0x4c,
+0x0f,0x39,
+0x11,0x3f,
+0x12,0x72,
+0x13,0x13,
+0x14,0x42,
+0x15,0x43,
+0x16,0xc2,
+0x17,0xa8,
+0x18,0x18,
+0x19,0x40,
+0x1a,0xd0,
+0x1b,0xf5,
+0x70,0x40,
+0x71,0x58,
+0x72,0x30,
+0x73,0x48,
+0x74,0x20,
+0x75,0x60,
+0x77,0x20,
+0x78,0x32,
+0x30,0x03,
+0x31,0x40,
+0x32,0xe0,
+0x33,0xe0,
+0x34,0xe0,
+0x35,0xb0,
+0x36,0xc0,
+0x37,0xc0,
+0x38,0x04,
+0x39,0x09,
+0x3a,0x12,
+0x3b,0x1C,
+0x3c,0x28,
+0x3d,0x31,
+0x3e,0x44,
+0x3f,0x57,
+0x40,0x6C,
+0x41,0x81,
+0x42,0x94,
+0x43,0xA7,
+0x44,0xB8,
+0x45,0xD6,
+0x46,0xEE,
+0x47,0x0d,
+0xfe,0x00,// set page0
+
+//-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+0xfe,0x00,// set page0
+0x10,0x26,
+0x11,0x0d, // fd},{modified by mormo 2010/07/06
+
+0x1a,0x2a, // 1e},{modified by mormo 2010/07/06
+
+
+0x1c,0x49,// c1},{modified by mormo 2010/07/06
+0x1d,0x9a,// 08},{modified by mormo 2010/07/06
+
+
+0x1e,0x61,// 60},{modified by mormo 2010/07/06
+
+0x3a,0x20,
+
+0x50,0x14, // 10},{modified by mormo 2010/07/06
+
+
+0x53,0x80,
+0x56,0x80,
+
+0x8b,0x20,//LSC
+0x8c,0x20,
+0x8d,0x20,
+0x8e,0x14,
+0x8f,0x10,
+0x90,0x14,
+
+0x94,0x02,
+0x95,0x07,
+0x96,0xe0,
+
+0xb1,0x40,// YCPT
+0xb2,0x40,
+0xb3,0x40,
+0xb6,0xe0,
+
+0xd0,0xcb,// AECT c9},{modifed by mormo 2010/07/06
+
+
+0xd3,0x48,// 80},{modified by mormor 2010/07/06
+
+
+
+0xf2,0x02,
+0xf7,0x12,
+0xf8,0x0a,
+
+ //Registers of Page1
+0xfe,0x01,// set page1
+0x02,0x20,
+0x04,0x10,
+0x05,0x08,
+0x06,0x20,
+0x08,0x0a,
+
+0x0e,0x44,
+0x0f,0x32,
+0x10,0x41,
+0x11,0x37,
+0x12,0x22,
+0x13,0x19,
+0x14,0x44,
+0x15,0x44,
+
+0x19,0x50,
+0x1a,0xd8,
+
+0x32,0x10,
+
+0x35,0x00,
+0x36,0x80,
+0x37,0x00,
+//-----------Update the registers end---------//
+0xfe,0x00,// set page0
+0xd2,0x90,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8353.h b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8353.h
new file mode 100755
index 00000000..717e5a42
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0308/gc0308_8353.h
@@ -0,0 +1,457 @@
+#ifndef GC0308_H
+#define GC0308_H
+
+
+// Scene Mode
+uint8_t gc0308_scene_mode_auto[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x20,
+};
+
+uint8_t gc0308_scene_mode_night[] = {
+ 0xfe, 0x00, // set page0
+ 0xec, 0x30,
+};
+
+
+// White Balance
+uint8_t gc0308_wb_auto [] = {
+ 0xfe, 0x00, // set page0
+ 0x5a, 0x56,
+ 0x5b, 0x40,
+ 0x5c, 0x4a,
+ 0x22, 0x57,
+};
+
+uint8_t gc0308_wb_incandescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x48,
+ 0x5b, 0x40,
+ 0x5c, 0x5c,
+};
+
+uint8_t gc0308_wb_fluorescent [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x40,
+ 0x5b, 0x42,
+ 0x5c, 0x50,
+};
+
+uint8_t gc0308_wb_daylight [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x74,
+ 0x5b, 0x52,
+ 0x5c, 0x40,
+};
+
+uint8_t gc0308_wb_cloudy [] = {
+ 0xfe, 0x00, // set page0
+ 0x22, 0x55,
+ 0x5a, 0x8c,
+ 0x5b, 0x50,
+ 0x5c, 0x40,
+};
+
+
+// Exposure
+uint8_t gc0308_exposure_neg6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xe0,
+ 0xd3, 0x38,
+};
+
+uint8_t gc0308_exposure_neg3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0xf0,
+ 0xd3, 0x40,
+};
+
+uint8_t gc0308_exposure_zero[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x00,
+ 0xd3, 0x48,
+};
+
+uint8_t gc0308_exposure_pos3[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x10,
+ 0xd3, 0x50,
+};
+
+uint8_t gc0308_exposure_pos6[] = {
+ 0xfe, 0x00, // set page0
+ 0xb5, 0x20,
+ 0xd3, 0x58,
+};
+
+
+// Resolution
+uint8_t gc0308_320x240[]= {
+ 0xfe, 0x01,
+ 0x54, 0x22,
+ 0x55, 0x03,
+ 0x56, 0x00,
+ 0x57, 0x00,
+ 0x58, 0x00,
+ 0x59, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc0308_640x480[]= {
+ 0xfe,0x01,
+ 0x54,0x11,
+ 0x55,0x03,
+ 0x56,0x00,
+ 0x57,0x00,
+ 0x58,0x00,
+ 0x59,0x00,
+ 0xfe,0x00,
+ 0x46,0x00,
+ 0xfe,0x00,
+};
+
+uint8_t gc0308_default_regs_init[]={
+ 0xfe,0x80,
+
+ 0xfe,0x00, // set page0
+
+ 0xd2,0x10, // close AEC
+ 0x22,0x55, // close AWB
+
+ 0x03,0x01,
+ 0x04,0x2c,
+ 0x5a,0x56,
+ 0x5b,0x40,
+ 0x5c,0x4a,
+
+ 0x22,0x57, // Open AWB
+
+ 0x28,0x11,
+ 0x57,0x80,
+ 0x57,0x80,
+ 0x59,0x80,
+
+
+ 0x01,0xfa,
+ 0x02,0x70,
+ 0x0f,0x01,
+
+ 0xe2,0x00, //anti-flicker step [11:8]
+ 0xe3,0x32, //anti-flicker step [7:0] //64
+
+ 0xe4,0x02, //exp level 1 16.67fps
+ 0xe5,0x58,
+ 0xe6,0x02, //exp level 2 12.5fps
+ 0xe7,0x58,
+ 0xe8,0x02, //exp level 3 8.33fps
+ 0xe9,0x58,
+ 0xea,0x03, //exp level 4 4.00fps
+ 0xeb,0xe8,
+
+ 0xec,0x20,
+
+ 0x05,0x00,
+ 0x06,0x00,
+ 0x07,0x00,
+ 0x08,0x00,
+ 0x09,0x01,
+ 0x0a,0xe8,
+ 0x0b,0x02,
+ 0x0c,0x88,
+ 0x0d,0x02,
+ 0x0e,0x02,
+ 0x10,0x22,
+ 0x11,0xfd,
+ 0x12,0x2a,
+ 0x13,0x00,
+ 0x14,0x10, //0x10
+
+ 0x15,0x0a,
+ 0x16,0x05,
+ 0x17,0x01,
+ 0x18,0x44,
+ 0x19,0x44,
+ 0x1a,0x1e,
+ 0x1b,0x00,
+ 0x1c,0xc1,
+ 0x1d,0x08,
+ 0x1e,0x60,
+ 0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+ 0x34,0xe0,
+ 0x35,0xb0,
+ 0x36,0xc0,
+ 0x37,0xc0,
+ 0x38,0x04,
+ 0x39,0x09,
+ 0x3a,0x12,
+ 0x3b,0x1C,
+ 0x3c,0x28,
+ 0x3d,0x31,
+ 0x3e,0x44,
+ 0x3f,0x57,
+ 0x40,0x6C,
+ 0x41,0x81,
+ 0x42,0x94,
+ 0x43,0xA7,
+ 0x44,0xB8,
+ 0x45,0xD6,
+ 0x46,0xEE,
+ 0x47,0x0d,
+ 0xfe,0x00,// set page0
+
+ //-----------Update the registers 2010/07/06-----------
+ //Registers of Page0
+ 0xfe,0x00,// set page0
+ 0x10,0x26,
+ 0x11,0x0d, // fd},{modified by mormo 2010/07/06
+
+ 0x1a,0x2a, // 1e},{modified by mormo 2010/07/06
+
+
+ 0x1c,0x49,// c1},{modified by mormo 2010/07/06
+ 0x1d,0x9a,// 08},{modified by mormo 2010/07/06
+
+
+ 0x1e,0x61,// 60},{modified by mormo 2010/07/06
+
+ 0x3a,0x20,
+
+ 0x50,0x14, // 10},
+
+
+ 0x53,0x80,
+ 0x56,0x80,
+
+ 0x8b,0x20,//LSC
+ 0x8c,0x20,
+ 0x8d,0x20,
+ 0x8e,0x14,
+ 0x8f,0x10,
+ 0x90,0x14,
+
+ 0x94,0x02,
+ 0x95,0x07,
+ 0x96,0xe0,
+
+ 0xb1,0x40,// YCPT
+ 0xb2,0x40,
+ 0xb3,0x40,
+ 0xb6,0xe0,
+
+ 0xd0,0xcb,// AECT c9
+
+
+ 0xd3,0x48,// 80,
+
+
+
+ 0xf2,0x02,
+ 0xf7,0x12,
+ 0xf8,0x0a,
+
+ //Registers of Page1
+ 0xfe,0x01,// set page1
+ 0x02,0x20,
+ 0x04,0x10,
+ 0x05,0x08,
+ 0x06,0x20,
+ 0x08,0x0a,
+
+ 0x0e,0x44,
+ 0x0f,0x32,
+ 0x10,0x41,
+ 0x11,0x37,
+ 0x12,0x22,
+ 0x13,0x19,
+ 0x14,0x44,
+ 0x15,0x44,
+
+ 0x19,0x50,
+ 0x1a,0xd8,
+
+ 0x32,0x10,
+
+ 0x35,0x00,
+ 0x36,0x80,
+ 0x37,0x00,
+ //-----------Update the registers end---------//
+ 0xfe,0x00,// set page0
+ 0xd2,0x90,
+};
+
+uint8_t gc0308_default_regs_exit[]={
+ 0x28,0x00,
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309-zyhb0309.h b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309-zyhb0309.h
new file mode 100755
index 00000000..2c63765e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309-zyhb0309.h
@@ -0,0 +1,725 @@
+#ifndef GC0309_H
+#define GC0309_H
+
+// Scene Mode
+uint8_t gc0309_scene_mode_auto[] = {
+};
+
+uint8_t gc0309_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0309_wb_auto [] = {
+ 0x5a, 0x4c ,
+ 0x5b, 0x40 ,
+ 0x5c, 0x4a ,
+ 0x22, 0x57 ,
+};
+
+uint8_t gc0309_wb_incandescent [] = {
+ //bai re guang
+ 0x22,0x55,
+ 0x5a,0x48,
+ 0x5b,0x40,
+ 0x5c,0x5c,
+};
+
+uint8_t gc0309_wb_fluorescent [] = {
+ //ri guang deng
+ 0x22,0x55,
+ 0x5a,0x40,
+ 0x5b,0x42,
+ 0x5c,0x50,
+};
+
+uint8_t gc0309_wb_daylight [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x50 ,//74
+ 0x5b, 0x45 ,//52
+ 0x5c, 0x40 ,
+
+};
+
+uint8_t gc0309_wb_cloudy [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x5a ,//8c
+ 0x5b, 0x42 ,//50
+ 0x5c, 0x40 ,
+
+};
+
+uint8_t gc0309_wb_tungsten [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x48 ,
+ 0x5b, 0x40 ,
+ 0x5c, 0x5c ,
+
+};
+
+
+// Exposure
+uint8_t gc0309_exposure_neg6[] = {
+ 0xd3, 0x38 ,
+
+};
+
+uint8_t gc0309_exposure_neg3[] = {
+ 0xd3, 0x40 ,
+};
+
+uint8_t gc0309_exposure_zero[] = {
+ 0xd3, 0x4a ,//50 cyrille
+};
+
+uint8_t gc0309_exposure_pos3[] = {
+ 0xd3, 0x58 ,
+};
+
+uint8_t gc0309_exposure_pos6[] = {
+ 0xd3, 0x60 ,
+};
+
+
+// Color Effect
+uint8_t gc0309_colorfx_none[] = {
+ 0x23,0x00 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0x77,0x54 ,
+ 0xb3,0x38 , // 40 cyrille
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+};
+
+uint8_t gc0309_colorfx_bw[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x38 ,// 40 cyrille
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+
+};
+
+uint8_t gc0309_colorfx_sepia[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x38 ,
+ 0xb4,0x80 ,
+ 0xba,0xd0 ,
+ 0xbb,0x28 ,
+
+};
+
+uint8_t gc0309_colorfx_negative[] = {
+ 0x23,0x01 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x38 ,
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+
+};
+
+uint8_t gc0309_colorfx_emboss[] = {
+
+};
+
+uint8_t gc0309_colorfx_sketch[] = {
+};
+
+uint8_t gc0309_colorfx_sky_blue[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x38 ,
+ 0xb4,0x80 ,
+ 0xba,0x50 ,
+ 0xbb,0xe0 ,
+};
+
+uint8_t gc0309_colorfx_grass_green[] = {
+// Greenish
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x77,0x88 ,
+ 0xb3,0x38 ,
+ 0xb4,0x80 ,
+ 0xba,0xc0 ,
+ 0xbb,0xc0 ,
+};
+
+uint8_t gc0309_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0309_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0309_brightness_neg4[] = {
+};
+
+uint8_t gc0309_brightness_neg3[] = {
+};
+
+uint8_t gc0309_brightness_neg2[] = {
+};
+
+uint8_t gc0309_brightness_neg1[] = {
+};
+
+uint8_t gc0309_brightness_zero[] = {
+};
+
+uint8_t gc0309_brightness_pos1[] = {
+};
+
+uint8_t gc0309_brightness_pos2[] = {
+};
+
+uint8_t gc0309_brightness_pos3[] = {
+};
+
+uint8_t gc0309_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0309_contrast_neg4[] = {
+};
+
+uint8_t gc0309_contrast_neg3[] = {
+};
+
+uint8_t gc0309_contrast_neg2[] = {
+};
+
+uint8_t gc0309_contrast_neg1[] = {
+};
+
+uint8_t gc0309_contrast_zero[] = {
+};
+
+uint8_t gc0309_contrast_pos1[] = {
+};
+
+uint8_t gc0309_contrast_pos2[] = {
+};
+
+uint8_t gc0309_contrast_pos3[] = {
+};
+
+uint8_t gc0309_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0309_saturation_neg4[] = {
+};
+
+uint8_t gc0309_saturation_neg3[] = {
+};
+
+uint8_t gc0309_saturation_neg2[] = {
+};
+
+uint8_t gc0309_saturation_neg1[] = {
+};
+
+uint8_t gc0309_saturation_zero[] = {
+};
+
+uint8_t gc0309_saturation_pos1[] = {
+};
+
+uint8_t gc0309_saturation_pos2[] = {
+};
+
+uint8_t gc0309_saturation_pos3[] = {
+};
+
+uint8_t gc0309_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0309_176x144[]={
+};
+
+uint8_t gc0309_320x240[]={
+0xfe,0x01,
+0x54,0x22, // 1/2 subsample
+0x55,0x03,
+0x56,0x00,
+0x57,0x00,
+0x58,0x00,
+0x59,0x00,
+
+0xfe,0x00,
+0x46,0x80,//enable crop window mode
+0x47,0x00,
+0x48,0x00,
+0x49,0x00,
+0x4a,0xf0,//240
+0x4b,0x01,
+0x4c,0x40, //320
+0xfe,0x00,
+
+
+};
+
+// CIF
+uint8_t gc0309_352x288[]={
+};
+
+// VGA
+uint8_t gc0309_640x480[]={
+};
+
+
+// Initiliztion
+uint8_t gc0309_default_regs_init[] = {
+
+0xfe,0x80,
+
+0xfe,0x00,
+
+0x1a,0x16,
+
+0xd2,0x10,
+
+0x22,0x55,
+
+0x5a,0x56,
+
+0x5b,0x40,
+
+0x5c,0x4a,
+
+0x22,0x57,
+
+0x01,0xfa, // 32 cyrille
+0x02,0x70,
+0x0f,0x01,
+
+0xe2,0x00,
+0xe3,0x64, //78 cyrille
+
+0x03,0x01,
+0x04,0x2c,
+
+0xe4,0x02,
+0xe5,0x58,
+
+0xe6,0x03,
+0xe7,0xe8,//48 cyrille
+
+0xe8,0x05,
+0xe9,0x14,//a0 cyrille
+
+0xea,0x06,
+0xeb,0x40,
+
+0xec,0x20,
+
+0x05,0x00,
+
+0x06,0x00,
+
+0x07,0x00,
+
+0x08,0x00,
+
+0x09,0x01,
+
+0x0a,0xe8,
+
+0x0b,0x02,
+
+0x0c,0x88,
+
+0x0d,0x02,
+
+0x0e,0x02,
+
+0x10,0x22,
+
+0x11,0x0d,
+
+0x12,0x2a,
+
+0x13,0x00,
+
+0x14,0x10,
+
+0x15,0x0a,
+
+0x16,0x05,
+
+0x17,0x01,
+
+0x1b,0x03,
+
+0x1c,0xc1,
+
+0x1d,0x08,
+
+0x1e,0x20,
+
+0x1f,0x16,
+
+0x20,0xff,
+
+0x21,0xf8,
+
+0x24,0xa2,
+
+0x25,0x0f,
+
+0x26,0x02,
+
+0x2f,0x01,
+
+0x30,0xf7,
+
+0x31,0x40,
+
+0x32,0x00,
+
+0x39,0x04,
+
+0x3a,0x20,
+
+0x3b,0x20,
+
+0x3c,0x02,
+
+0x3d,0x02,
+
+0x3e,0x02,
+
+0x3f,0x02,
+
+0x50,0x24,
+
+0x53,0x82,
+
+0x54,0x80,
+
+0x55,0x80,
+
+0x56,0x82,
+
+0x8b,0x20,
+
+0x8c,0x20,
+
+0x8d,0x20,
+
+0x8e,0x10,
+
+0x8f,0x10,
+
+0x90,0x10,
+
+0x91,0x3c,
+
+0x92,0x50,
+
+0x5d,0x12,
+
+0x5e,0x1a,
+
+0x5f,0x24,
+
+0x60,0x07,
+
+0x61,0x0e,
+
+0x62,0x0c,
+
+0x64,0x03,
+
+0x66,0xe8,
+
+0x67,0x86,
+
+0x68,0xa2,
+
+0x69,0x20,
+
+0x6a,0x0f,
+
+0x6b,0x00,
+
+0x6c,0x53,
+
+0x6d,0x83,
+
+0x6e,0xac,
+
+0x6f,0xac,
+
+0x70,0x15,
+
+0x71,0x33,
+
+0x72,0xdc,
+
+0x73,0x80,
+
+0x74,0x02,
+
+0x75,0x3f,
+
+0x76,0x02,
+
+0x77,0x34, // 54 cyrille
+
+0x78,0x88,
+
+0x79,0x81,
+
+0x7a,0x81,
+
+0x7b,0x22,
+
+0x7c,0xff,
+
+0x93,0x45,
+
+0x94,0x00,
+
+0x95,0x00,
+
+0x96,0x00,
+
+0x97,0x45,
+
+0x98,0xf0,
+
+0x9c,0x00,
+
+0x9d,0x03,
+
+0x9e,0x00,
+
+0xb1,0x40,
+
+0xb2,0x40,
+
+0xb3,0x3b, // cyrille
+
+0xb5,0xfa,// cyrille
+
+0xb8,0x20,
+
+0xbe,0x36,
+
+0xbf,0x00,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,
+
+0xfe,0x00,
+
+0xd2,0x90,
+
+0x8b,0x22,
+
+0x71,0x43,
+
+0x93,0x48,
+
+0x94,0x00,
+
+0x95,0x05,
+
+0x96,0xe8,
+
+0x97,0x40,
+
+0x98,0xf8,
+
+0x9c,0x00,
+
+0x9d,0x00,
+
+0x9e,0x00,
+
+0xd0,0xcb,
+
+0xd3,0x4a, // a0 //50 cyrille
+
+0x31,0x60,
+
+0x1c,0x49,
+
+0x1d,0x98,
+
+0x10,0x26,
+
+0x1a,0x26,
+
+};
+
+uint8_t gc0309_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.c b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.c
new file mode 100755
index 00000000..488a677f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.c
@@ -0,0 +1,346 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0309.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x10
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, gc0309_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0309_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc0309_wb_auto;
+ size = ARRAY_SIZE(gc0309_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc0309_wb_incandescent;
+ size = ARRAY_SIZE(gc0309_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc0309_wb_daylight;
+ size = ARRAY_SIZE(gc0309_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc0309_wb_cloudy;
+ size = ARRAY_SIZE(gc0309_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc0309_wb_fluorescent;
+ size = ARRAY_SIZE(gc0309_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc0309_scene_mode_auto;
+ size = ARRAY_SIZE(gc0309_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc0309_scene_mode_night;
+ size = ARRAY_SIZE(gc0309_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc0309_exposure_neg6;
+ size = ARRAY_SIZE(gc0309_exposure_neg6);
+ break;
+ case -1:
+ regs = gc0309_exposure_neg3;
+ size = ARRAY_SIZE(gc0309_exposure_neg3);
+ break;
+ case 0:
+ regs = gc0309_exposure_zero;
+ size = ARRAY_SIZE(gc0309_exposure_zero);
+ break;
+ case 1:
+ regs = gc0309_exposure_pos3;
+ size = ARRAY_SIZE(gc0309_exposure_pos3);
+ break;
+ case 2:
+ regs = gc0309_exposure_pos6;
+ size = ARRAY_SIZE(gc0309_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc0309_default_regs_init,
+ ARRAY_SIZE(gc0309_default_regs_init));
+ mdelay(200);
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc0309_default_regs_exit,
+ ARRAY_SIZE(gc0309_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0309_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc0309 = {
+ .name = "gc0309",
+ .i2c_addr = 0x21,
+ .id = 0xa0,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0309_ops,
+};
+
+#if 0
+static int __init gc0309_init(void)
+{
+ return cmos_register_sudbdev(&gc0309);
+}
+
+static void __exit gc0309_exit(void)
+{
+ return cmos_unregister_subdev(&gc0309);
+}
+
+module_init(gc0309_init);
+module_exit(gc0309_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.h b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.h
new file mode 100755
index 00000000..51a2e505
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0309/gc0309.h
@@ -0,0 +1,737 @@
+#ifndef GC0309_H
+#define GC0309_H
+
+// Scene Mode
+uint8_t gc0309_scene_mode_auto[] = {
+};
+
+uint8_t gc0309_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0309_wb_auto [] = {
+ 0x5a, 0x4c ,
+ 0x5b, 0x40 ,
+ 0x5c, 0x4a ,
+ 0x22, 0x57 ,
+};
+
+uint8_t gc0309_wb_incandescent [] = {
+ //bai re guang
+ 0x22,0x55,
+ 0x5a,0x48,
+ 0x5b,0x40,
+ 0x5c,0x5c,
+};
+
+uint8_t gc0309_wb_fluorescent [] = {
+ //ri guang deng
+ 0x22,0x55,
+ 0x5a,0x40,
+ 0x5b,0x42,
+ 0x5c,0x50,
+};
+
+uint8_t gc0309_wb_daylight [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x50 ,//74
+ 0x5b, 0x45 ,//52
+ 0x5c, 0x40 ,
+
+};
+
+uint8_t gc0309_wb_cloudy [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x5a ,//8c
+ 0x5b, 0x42 ,//50
+ 0x5c, 0x40 ,
+
+};
+
+uint8_t gc0309_wb_tungsten [] = {
+ 0x22, 0x55 , // Disable AWB
+ 0x5a, 0x48 ,
+ 0x5b, 0x40 ,
+ 0x5c, 0x5c ,
+
+};
+
+
+// Exposure
+uint8_t gc0309_exposure_neg6[] = {
+ 0xf0,0x00,
+ 0xb5,0xc0,
+ 0xd3,0x28
+};
+
+uint8_t gc0309_exposure_neg3[] = {
+ 0xf0,0x00,
+ 0xb5,0xe0,
+ 0xd3,0x38
+};
+
+uint8_t gc0309_exposure_zero[] = {
+ 0xf0,0x00,
+ 0xb5,0x00,
+ 0xd3,0x48
+};
+
+uint8_t gc0309_exposure_pos3[] = {
+ 0xf0,0x00,
+ 0xb5,0x20,
+ 0xd3,0x58
+};
+
+uint8_t gc0309_exposure_pos6[] = {
+ 0xf0,0x00,
+ 0xb5,0x40,
+ 0xd3,0x68
+};
+
+
+// Color Effect
+uint8_t gc0309_colorfx_none[] = {
+ 0x23,0x00 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0x77,0x45 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+};
+
+uint8_t gc0309_colorfx_bw[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+
+};
+
+uint8_t gc0309_colorfx_sepia[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0xd0 ,
+ 0xbb,0x28 ,
+
+};
+
+uint8_t gc0309_colorfx_negative[] = {
+ 0x23,0x01 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0x00 ,
+ 0xbb,0x00 ,
+
+};
+
+uint8_t gc0309_colorfx_emboss[] = {
+
+};
+
+uint8_t gc0309_colorfx_sketch[] = {
+};
+
+uint8_t gc0309_colorfx_sky_blue[] = {
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x73,0x00 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0x50 ,
+ 0xbb,0xe0 ,
+};
+
+uint8_t gc0309_colorfx_grass_green[] = {
+// Greenish
+ 0x23,0x02 ,
+ 0x2d,0x0a ,
+ 0x20,0x7f ,
+ 0xd2,0x90 ,
+ 0x77,0x88 ,
+ 0xb3,0x42 ,
+ 0xb4,0x80 ,
+ 0xba,0xc0 ,
+ 0xbb,0xc0 ,
+};
+
+uint8_t gc0309_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0309_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0309_brightness_neg4[] = {
+};
+
+uint8_t gc0309_brightness_neg3[] = {
+};
+
+uint8_t gc0309_brightness_neg2[] = {
+};
+
+uint8_t gc0309_brightness_neg1[] = {
+};
+
+uint8_t gc0309_brightness_zero[] = {
+};
+
+uint8_t gc0309_brightness_pos1[] = {
+};
+
+uint8_t gc0309_brightness_pos2[] = {
+};
+
+uint8_t gc0309_brightness_pos3[] = {
+};
+
+uint8_t gc0309_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0309_contrast_neg4[] = {
+};
+
+uint8_t gc0309_contrast_neg3[] = {
+};
+
+uint8_t gc0309_contrast_neg2[] = {
+};
+
+uint8_t gc0309_contrast_neg1[] = {
+};
+
+uint8_t gc0309_contrast_zero[] = {
+};
+
+uint8_t gc0309_contrast_pos1[] = {
+};
+
+uint8_t gc0309_contrast_pos2[] = {
+};
+
+uint8_t gc0309_contrast_pos3[] = {
+};
+
+uint8_t gc0309_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0309_saturation_neg4[] = {
+};
+
+uint8_t gc0309_saturation_neg3[] = {
+};
+
+uint8_t gc0309_saturation_neg2[] = {
+};
+
+uint8_t gc0309_saturation_neg1[] = {
+};
+
+uint8_t gc0309_saturation_zero[] = {
+};
+
+uint8_t gc0309_saturation_pos1[] = {
+};
+
+uint8_t gc0309_saturation_pos2[] = {
+};
+
+uint8_t gc0309_saturation_pos3[] = {
+};
+
+uint8_t gc0309_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0309_176x144[]={
+};
+
+uint8_t gc0309_320x240[]={
+0xfe,0x01,
+0x54,0x22, // 1/2 subsample
+0x55,0x03,
+0x56,0x00,
+0x57,0x00,
+0x58,0x00,
+0x59,0x00,
+
+0xfe,0x00,
+0x46,0x80,//enable crop window mode
+0x47,0x00,
+0x48,0x00,
+0x49,0x00,
+0x4a,0xf0,//240
+0x4b,0x01,
+0x4c,0x40, //320
+0xfe,0x00,
+
+
+};
+
+// CIF
+uint8_t gc0309_352x288[]={
+};
+
+// VGA
+uint8_t gc0309_640x480[]={
+};
+
+
+// Initiliztion
+uint8_t gc0309_default_regs_init[] = {
+
+0xfe,0x80,
+
+0xfe,0x00,
+
+0x1a,0x16,
+
+0xd2,0x10,
+
+0x22,0x55,
+
+0x5a,0x56,
+
+0x5b,0x40,
+
+0x5c,0x4a,
+
+0x22,0x57,
+
+0x01,0x32,
+0x02,0x70,
+0x0f,0x01,
+
+0xe2,0x00,
+0xe3,0x78,
+
+0x03,0x01,
+0x04,0x2c,
+
+0xe4,0x02,
+0xe5,0x58,
+
+0xe6,0x03,
+0xe7,0x48,
+
+0xe8,0x05,
+0xe9,0xa0,
+
+0xea,0x05,
+0xeb,0xa0,
+
+0x05,0x00,
+
+0x06,0x00,
+
+0x07,0x00,
+
+0x08,0x00,
+
+0x09,0x01,
+
+0x0a,0xe8,
+
+0x0b,0x02,
+
+0x0c,0x88,
+
+0x0d,0x02,
+
+0x0e,0x02,
+
+0x10,0x22,
+
+0x11,0x0d,
+
+0x12,0x2a,
+
+0x13,0x00,
+
+0x14,0x10,
+
+0x15,0x0a,
+
+0x16,0x05,
+
+0x17,0x01,
+
+0x1b,0x03,
+
+0x1c,0xc1,
+
+0x1d,0x08,
+
+0x1e,0x20,
+
+0x1f,0x16,
+
+0x20,0xff,
+
+0x21,0xf8,
+
+0x24,0xa2,
+
+0x25,0x0f,
+
+0x26,0x02,
+
+0x2f,0x01,
+
+0x30,0xf7,
+
+0x31,0x40,
+
+0x32,0x00,
+
+0x39,0x04,
+
+0x3a,0x20,
+
+0x3b,0x20,
+
+0x3c,0x02,
+
+0x3d,0x02,
+
+0x3e,0x02,
+
+0x3f,0x02,
+
+0x50,0x24,
+
+0x53,0x82,
+
+0x54,0x80,
+
+0x55,0x80,
+
+0x56,0x82,
+
+0x8b,0x20,
+
+0x8c,0x20,
+
+0x8d,0x20,
+
+0x8e,0x10,
+
+0x8f,0x10,
+
+0x90,0x10,
+
+0x91,0x3c,
+
+0x92,0x50,
+
+0x5d,0x12,
+
+0x5e,0x1a,
+
+0x5f,0x24,
+
+0x60,0x07,
+
+0x61,0x0e,
+
+0x62,0x1f, //0c
+
+0x64,0x01, //03
+
+0x66,0xe8,
+
+0x67,0x86,
+
+0x68,0xa2,
+
+0x69,0x20,
+
+0x6a,0x0f,
+
+0x6b,0x00,
+
+0x6c,0x53,
+
+0x6d,0x83,
+
+0x6e,0xac,
+
+0x6f,0xac,
+
+0x70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+
+0xf9,0x9f,
+
+0xfa,0x78,
+
+0xfe,0x01,
+
+0x00,0xf5,
+
+0x02,0x1a,
+
+0x0a,0xa0,
+
+0x0b,0x60,
+
+0x0c,0x08,
+
+0x0e,0x4c,
+
+0x0f,0x39,
+
+0x11,0x3f,
+
+0x12,0x72,
+
+0x13,0x13,
+
+0x14,0x42,
+
+0x15,0x43,
+
+0x16,0xc2,
+
+0x17,0xa8,
+
+0x18,0x18,
+
+0x19,0x40,
+
+0x1a,0xd0,
+
+0x1b,0xf5,
+
+0x70,0x40,
+
+0x71,0x58,
+
+0x72,0x30,
+
+0x73,0x48,
+
+0x74,0x20,
+
+0x75,0x60,
+
+0xfe,0x00,
+
+0xd2,0x90,
+
+0x8b,0x22,
+
+0x71,0x43,
+
+0x93,0x48,
+
+0x94,0x00,
+
+0x95,0x05,
+
+0x96,0xe8,
+
+0x97,0x40,
+
+0x98,0xf8,
+
+0x9c,0x00,
+
+0x9d,0x00,
+
+0x9e,0x00,
+
+0xd0,0xcb,
+
+0xd3,0x50, // a0
+
+0x31,0x60,
+
+0x1c,0x49,
+
+0x1d,0x98,
+
+0x10,0x26,
+
+0x1a,0x26,
+
+0xfe,0x00,
+0x57,0x7b,
+0x58,0x80,
+0x59,0x80,
+
+
+};
+
+uint8_t gc0309_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.c b/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.c
new file mode 100755
index 00000000..c057106f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.c
@@ -0,0 +1,224 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0311.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, gc0311_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0311_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ int data;
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x14, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ int data;
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x14, data);
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc0311_wb_auto;
+ size = ARRAY_SIZE(gc0311_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc0311_wb_incandescent;
+ size = ARRAY_SIZE(gc0311_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc0311_wb_daylight;
+ size = ARRAY_SIZE(gc0311_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc0311_wb_cloudy;
+ size = ARRAY_SIZE(gc0311_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc0311_wb_fluorescent;
+ size = ARRAY_SIZE(gc0311_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win)
+ return -EINVAL;
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (!sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc0311_default_regs_init,
+ ARRAY_SIZE(gc0311_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0311_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+};
+
+struct cmos_subdev gc0311 = {
+ .name = "gc0311",
+ .i2c_addr = 0x21,
+ .id = 0xbb,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0311_ops,
+};
+
+static int __init gc0311_init(void)
+{
+ return cmos_register_sudbdev(&gc0311);
+}
+
+static void __exit gc0311_exit(void)
+{
+ return cmos_unregister_subdev(&gc0311);
+}
+
+module_init(gc0311_init);
+module_exit(gc0311_exit);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.h b/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.h
new file mode 100755
index 00000000..1e5a3da6
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0311/gc0311.h
@@ -0,0 +1,444 @@
+#ifndef GC0311_H
+#define GC0311_H
+
+// Scene Mode
+unsigned char gc0311_scene_mode_auto[] = {
+};
+
+unsigned char gc0311_scene_mode_night[] = {
+};
+
+
+// White Balance
+unsigned char gc0311_wb_auto [] = {
+};
+
+unsigned char gc0311_wb_incandescent [] = {
+};
+
+unsigned char gc0311_wb_fluorescent [] = {
+};
+
+unsigned char gc0311_wb_daylight [] = {
+};
+
+unsigned char gc0311_wb_cloudy [] = {
+};
+
+unsigned char gc0311_wb_tungsten [] = {
+};
+
+
+// Exposure
+unsigned char gc0311_exposure_neg6[] = {
+};
+
+unsigned char gc0311_exposure_neg3[] = {
+};
+
+unsigned char gc0311_exposure_zero[] = {
+};
+
+unsigned char gc0311_exposure_pos3[] = {
+};
+
+unsigned char gc0311_exposure_pos6[] = {
+};
+
+
+// Color Effect
+unsigned char gc0311_colorfx_none[] = {
+};
+
+unsigned char gc0311_colorfx_bw[] = {
+};
+
+unsigned char gc0311_colorfx_sepia[] = {
+};
+
+unsigned char gc0311_colorfx_negative[] = {
+};
+
+unsigned char gc0311_colorfx_emboss[] = {
+};
+
+unsigned char gc0311_colorfx_sketch[] = {
+};
+
+unsigned char gc0311_colorfx_sky_blue[] = {
+};
+
+unsigned char gc0311_colorfx_grass_green[] = {
+};
+
+unsigned char gc0311_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0311_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0311_brightness_neg4[] = {
+};
+
+unsigned char gc0311_brightness_neg3[] = {
+};
+
+unsigned char gc0311_brightness_neg2[] = {
+};
+
+unsigned char gc0311_brightness_neg1[] = {
+};
+
+unsigned char gc0311_brightness_zero[] = {
+};
+
+unsigned char gc0311_brightness_pos1[] = {
+};
+
+unsigned char gc0311_brightness_pos2[] = {
+};
+
+unsigned char gc0311_brightness_pos3[] = {
+};
+
+unsigned char gc0311_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0311_contrast_neg4[] = {
+};
+
+unsigned char gc0311_contrast_neg3[] = {
+};
+
+unsigned char gc0311_contrast_neg2[] = {
+};
+
+unsigned char gc0311_contrast_neg1[] = {
+};
+
+unsigned char gc0311_contrast_zero[] = {
+};
+
+unsigned char gc0311_contrast_pos1[] = {
+};
+
+unsigned char gc0311_contrast_pos2[] = {
+};
+
+unsigned char gc0311_contrast_pos3[] = {
+};
+
+unsigned char gc0311_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0311_saturation_neg4[] = {
+};
+
+unsigned char gc0311_saturation_neg3[] = {
+};
+
+unsigned char gc0311_saturation_neg2[] = {
+};
+
+unsigned char gc0311_saturation_neg1[] = {
+};
+
+unsigned char gc0311_saturation_zero[] = {
+};
+
+unsigned char gc0311_saturation_pos1[] = {
+};
+
+unsigned char gc0311_saturation_pos2[] = {
+};
+
+unsigned char gc0311_saturation_pos3[] = {
+};
+
+unsigned char gc0311_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0311_176x144[]={
+};
+
+unsigned char gc0311_320x240[]={
+0xfe,0x00,
+0x59,0x22,
+0x5a,0x03,
+0x5b,0x00,
+0x5c,0x00,
+0x5d,0x00,
+0x5e,0x00,
+0x5f,0x00,
+0x60,0x00,
+0x61,0x00,
+0x62,0x00,
+};
+
+unsigned char gc0311_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0311_default_regs_init[] = {
+0xfe,0xf0,
+0xfe,0xf0,
+0xfe,0xf0,
+0x42,0x00,
+0x4f,0x00,
+0x03,0x01,
+0x04,0x20,
+0xfc,0x16,
+0xf1,0x07,
+0xf2,0x01,
+0xfc,0x16,
+0xfe,0x00,
+0x0d,0x01,
+0x0e,0xe8,
+0x0f,0x02,
+0x10,0x88,
+0x09,0x00,
+0x0a,0x00,
+0x0b,0x00,
+0x0c,0x04,
+0x05,0x02,
+0x06,0x2c,
+0x07,0x00,
+0x08,0xb8,
+0x77,0x7c,
+0x78,0x40,
+0x79,0x56,
+0xfe,0x01,
+0x29,0x00,
+0x2a,0x60,
+0x2b,0x02,
+0x2c,0xa0,
+0x2d,0x03,
+0x2e,0x00,
+0x2f,0x03,
+0x30,0xc0,
+0x31,0x07,
+0x32,0x80,
+0x33,0x20,
+0xfe,0x00,
+0x17,0x14,
+0x19,0x04,
+0x1f,0x08,
+0x20,0x01,
+0x21,0x48,
+0x1b,0x48,
+0x22,0xba,
+0x23,0x07,
+0x24,0x16,
+0x70,0x54,
+0x73,0x80,
+0x76,0x80,
+0x26,0xf7,
+0x28,0x7f,
+0x29,0x40,
+0x33,0x18,
+0x34,0x18,
+0x35,0x18,
+0x36,0x18,
+0x40,0xdf,
+0x41,0x2e,
+0x42,0xff,
+0x44,0xa2,
+0x46,0x02,
+0x4d,0x01,
+0x4f,0x01,
+0x7e,0x08,
+0x7f,0xc3,
+0x80,0xe7,
+0x82,0x30,
+0x84,0x02,
+0x89,0x22,
+0x90,0xbc,
+0x92,0x08,
+0x94,0x08,
+0x95,0x64,
+0x9a,0x15,
+0x9c,0x46,
+0xfe,0x00,
+0x63,0x00,
+0x64,0x06,
+0x65,0x0c,
+0x66,0x18,
+0x67,0x2A,
+0x68,0x3D,
+0x69,0x50,
+0x6A,0x60,
+0x6B,0x80,
+0x6C,0xA0,
+0x6D,0xC0,
+0x6E,0xE0,
+0x6F,0xFF,
+0xfe,0x00,
+0xBF,0x0E,
+0xc0,0x1C,
+0xc1,0x34,
+0xc2,0x48,
+0xc3,0x5A,
+0xc4,0x6B,
+0xc5,0x7B,
+0xc6,0x95,
+0xc7,0xAB,
+0xc8,0xBF,
+0xc9,0xCE,
+0xcA,0xD9,
+0xcB,0xE4,
+0xcC,0xEC,
+0xcD,0xF7,
+0xcE,0xFD,
+0xcF,0xFF,
+0xd1,0x36,
+0xd2,0x36,
+0xdd,0x00,
+0xed,0x00,
+0xde,0x38,
+0xe4,0x88,
+0xe5,0x40,
+0xfe,0x01,
+0x18,0x22,
+0x08,0xa4,
+0x09,0xf0,
+0xfe,0x01,
+0x10,0x08,
+0x11,0x11,
+0x12,0x14,
+0x13,0x40,
+0x16,0xd8,
+0x17,0x98,
+0x18,0x01,
+0x21,0xc0,
+0x22,0x40,
+0x06,0x10,
+0x08,0xa0,
+0x50,0xfe,
+0x51,0x05,
+0x52,0x28,
+0x53,0x05,
+0x54,0x10,
+0x55,0x20,
+0x56,0x16,
+0x57,0x10,
+0x58,0xf0,
+0x59,0x10,
+0x5a,0x10,
+0x5b,0xf0,
+0x5e,0xe8,
+0x5f,0x20,
+0x60,0x20,
+0x61,0xe0,
+0x62,0x03,
+0x63,0x30,
+0x64,0xc0,
+0x65,0xd0,
+0x66,0x20,
+0x67,0x00,
+0x6d,0x40,
+0x6e,0x08,
+0x6f,0x08,
+0x70,0x10,
+0x71,0x62,
+0x72,0x2e,
+0x73,0x71,
+0x74,0x23,
+0x75,0x40,
+0x76,0x48,
+0x77,0xc2,
+0x78,0xa5,
+0x79,0x18,
+0x7a,0x40,
+0x7b,0xb0,
+0x7c,0xf5,
+0x81,0x80,
+0x82,0x60,
+0x83,0xa0,
+0x8a,0xf8,
+0x8b,0xf4,
+0x8c,0x0a,
+0x8d,0x00,
+0x8e,0x00,
+0x8f,0x00,
+0x90,0x12,
+0xfe,0x00,
+0xad,0x00,
+0xfe,0x01,
+0xa0,0x00,
+0xa1,0x3c,
+0xa2,0x50,
+0xa3,0x00,
+0xa8,0x09,
+0xa9,0x04,
+0xaa,0x00,
+0xab,0x0c,
+0xac,0x02,
+0xad,0x00,
+0xae,0x15,
+0xaf,0x05,
+0xb0,0x00,
+0xb1,0x0f,
+0xb2,0x06,
+0xb3,0x00,
+0xb4,0x36,
+0xb5,0x2a,
+0xb6,0x25,
+0xba,0x36,
+0xbb,0x25,
+0xbc,0x22,
+0xc0,0x1e,
+0xc1,0x18,
+0xc2,0x17,
+0xc6,0x1c,
+0xc7,0x18,
+0xc8,0x17,
+0xb7,0x00,
+0xb8,0x00,
+0xb9,0x00,
+0xbd,0x00,
+0xbe,0x00,
+0xbf,0x00,
+0xc3,0x00,
+0xc4,0x00,
+0xc5,0x00,
+0xc9,0x00,
+0xca,0x00,
+0xcb,0x00,
+0xa4,0x00,
+0xa5,0x00,
+0xa6,0x00,
+0xa7,0x00,
+0xfe,0x01,
+0x74,0x13,
+0x15,0xfe,
+0x21,0xe0,
+0xfe,0x00,
+0x41,0x6e,
+0x83,0x03,
+0x7e,0x08,
+0x9c,0x64,
+0x95,0x65,
+0xd1,0x2d,
+0xd2,0x2d,
+0xb0,0x13,
+0xb1,0x26,
+0xb2,0x07,
+0xb3,0xf5,
+0xb4,0xea,
+0xb5,0x21,
+0xb6,0x21,
+0xb7,0xe4,
+0xb8,0xfb,
+0xfe,0x00,
+0x50,0x01,
+0x44,0xa2,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-gt7302-gmt.h b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-gt7302-gmt.h
new file mode 100755
index 00000000..ecec395d
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-gt7302-gmt.h
@@ -0,0 +1,686 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//4
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x35,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x37,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x38,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x55,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe , 0x80,
+ 0xfe , 0x80,
+ 0xfc , 0x16,
+ 0xfc , 0x16,
+ 0xfc , 0x16,
+ 0xfc , 0x16,
+ 0xf1 , 0x00,
+ 0xf2 , 0x00,
+ 0xfe , 0x00,
+ 0x4f , 0x00,
+ 0x03 , 0x00,
+ 0x04 , 0xc0,
+ 0x42 , 0x00,
+ 0x77 , 0x5a,
+ 0x78 , 0x40,
+ 0x79 , 0x56,
+
+ 0xfe , 0x00,
+ 0x0d , 0x01,
+ 0x0e , 0xe8,
+ 0x0f , 0x02,
+ 0x10 , 0x88,
+ 0x09 , 0x00,
+ 0x0a , 0x00,
+ 0x0b , 0x00,
+ 0x0c , 0x00,
+ 0x16 , 0x00,
+ 0x17 , 0x14,
+ 0x18 , 0x0e,
+ 0x19 , 0x06,
+
+ 0x1b , 0x48,
+ 0x1f , 0xC8,
+ 0x20 , 0x01,
+ 0x21 , 0x78,
+ 0x22 , 0xb0,
+ 0x23 , 0x06,
+ 0x24 , 0x11,
+ 0x26 , 0x00,
+ 0x50 , 0x01, //crop mode
+
+ //global gain for range
+ 0x70 , 0x45,
+
+ /////////////banding/////////////
+ 0x05 , 0x02,//hb
+ 0x06 , 0x2c,//
+ 0x07 , 0x00,//vb
+ 0x08 , 0xb8,//
+ 0xfe , 0x01,//
+ 0x29 , 0x00,//anti-flicker step [11:8]
+ 0x2a , 0x60,//anti-flicker step [7:0]
+ 0x2b , 0x02,//exp level 0 14.28fps
+ 0x2c , 0xa0,//
+ 0x2d , 0x03,//exp level 1 12.50fps
+ 0x2e , 0x00,//
+ 0x2f , 0x03,//exp level 2 10.00fps
+ 0x30 , 0xc0,//
+ 0x31 , 0x05,//exp level 3 7.14fps
+ 0x32 , 0x40,//
+ 0xfe , 0x00,//
+
+ ///////////////AWB//////////////
+ 0xfe , 0x01,
+ 0x50 , 0x00,
+ 0x4f , 0x00,
+ 0x4c , 0x01,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4d , 0x30,
+ 0x4e , 0x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
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4f , 0x01,
+ 0x50 , 0x88,
+ 0xfe , 0x00,
+
+ //////////// BLK//////////////////////
+ 0xfe , 0x00,
+ 0x27 , 0xb7,
+ 0x28 , 0x7F,
+ 0x29 , 0x20,
+ 0x33 , 0x20,
+ 0x34 , 0x20,
+ 0x35 , 0x20,
+ 0x36 , 0x20,
+ 0x32 , 0x08,
+ 0x3b , 0x00,
+ 0x3c , 0x00,
+ 0x3d , 0x00,
+ 0x3e , 0x00,
+ 0x47 , 0x00,
+ 0x48 , 0x00,
+
+ //////////// block enable/////////////
+ 0x40 , 0x7f,
+ 0x41 , 0x26,
+ 0x42 , 0xfb,
+ 0x44 , 0x02, //yuv
+ 0x45 , 0x00,
+ 0x46 , 0x02,
+ 0x4f , 0x01,
+ 0x4b , 0x01,
+ 0x50 , 0x01,
+
+ /////DN & EEINTP/////
+ 0x7e , 0x0a,
+ 0x7f , 0x03,
+ 0x81 , 0x15,
+ 0x82 , 0x90,
+ 0x83 , 0x02,
+ 0x84 , 0xe5,
+ 0x90 , 0x2c,
+ 0x92 , 0x02,
+ 0x94 , 0x02,
+ 0x95 , 0x35,
+
+ ////////////YCP///////////
+ 0xd1 , 0x24,// 0x30 for front
+ 0xd2 , 0x24,// 0x30 for front
+ 0xd3 , 0x40,
+ 0xdd , 0xd3,
+ 0xde , 0x38,
+ 0xe4 , 0x88,
+ 0xe5 , 0x40,
+ 0xd7 , 0x0e,
+
+ ///////////rgb gamma ////////////
+ 0xfe , 0x00,
+ 0xbf , 0x0e,
+ 0xc0 , 0x1c,
+ 0xc1 , 0x34,
+ 0xc2 , 0x48,
+ 0xc3 , 0x5a,
+ 0xc4 , 0x6e,
+ 0xc5 , 0x80,
+ 0xc6 , 0x9c,
+ 0xc7 , 0xb4,
+ 0xc8 , 0xc7,
+ 0xc9 , 0xd7,
+ 0xca , 0xe3,
+ 0xcb , 0xed,
+ 0xcc , 0xf2,
+ 0xcd , 0xf8,
+ 0xce , 0xfd,
+ 0xcf , 0xff,
+
+ /////////////Y gamma//////////
+ 0xfe , 0x00,
+ 0x63 , 0x00,
+ 0x64 , 0x05,
+ 0x65 , 0x0b,
+ 0x66 , 0x19,
+ 0x67 , 0x2e,
+ 0x68 , 0x40,
+ 0x69 , 0x54,
+ 0x6a , 0x66,
+ 0x6b , 0x86,
+ 0x6c , 0xa7,
+ 0x6d , 0xc6,
+ 0x6e , 0xe4,
+ 0x6f , 0xff,
+
+ //////////////ASDE/////////////
+ 0xfe , 0x01,
+ 0x18 , 0x02,
+ 0xfe , 0x00,
+ 0x97 , 0x30,
+ 0x98 , 0x00,
+ 0x9b , 0x60,
+ 0x9c , 0x60,
+ 0xa4 , 0x50,
+ 0xa8 , 0x80,
+ 0xaa , 0x40,
+ 0xa2 , 0x23,
+ 0xad , 0x28,
+
+ //////////////abs///////////
+ 0xfe , 0x01,
+ 0x9c , 0x00,
+ 0x9e , 0xc0,
+ 0x9f , 0x40,
+
+ ////////////// AEC////////////
+ 0xfe , 0x01,
+ 0x08 , 0xa0,
+ 0x09 , 0xe8,
+ 0x10 , 0x08,
+ 0x11 , 0x21,
+ 0x12 , 0x11,
+ 0x13 , 0x45,
+ 0x15 , 0xfc,
+ 0x18 , 0x02,
+ 0x21 , 0xf0,
+ 0x22 , 0x60,
+ 0x23 , 0x30,
+ 0x25 , 0x00,
+ 0x24 , 0x14,
+ 0x3d , 0x80,
+ 0x3e , 0x40,
+
+ ////////////////AWB///////////
+ 0xfe , 0x01,
+ 0x51 , 0x88,
+ 0x52 , 0x12,
+ 0x53 , 0x80,
+ 0x54 , 0x60,
+ 0x55 , 0x01,
+ 0x56 , 0x02,
+ 0x58 , 0x00,
+ 0x5b , 0x02,
+ 0x5e , 0xa4,
+ 0x5f , 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 , 0xf5,
+ 0xb3 , 0xfe,
+ 0xb4 , 0xe0,
+ 0xb5 , 0x15,
+ 0xb6 , 0xc8,
+
+ /////skin CC for front //////
+ //0xb1 , 0x00,
+ //0xb2 , 0x00,
+ //0xb3 , 0x00,
+ //0xb4 , 0xf0,
+ //0xb5 , 0x00,
+ //0xb6 , 0x00,
+
+
+ ///////////////AWB////////////////
+ 0xfe , 0x01,
+ 0x50 , 0x00,
+ 0xfe , 0x01,
+ 0x4f , 0x00,
+ 0x4c , 0x01,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4f , 0x00,
+ 0x4d , 0x34,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x02,
+ 0x4e , 0x02,
+ 0x4d , 0x44,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x53,
+ 0x4e , 0x00,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x65,
+ 0x4e , 0x04,
+ 0x4d , 0x73,
+ 0x4e , 0x20,
+ 0x4d , 0x83,
+ 0x4e , 0x20,
+ 0x4f , 0x01,
+ 0x50 , 0x88,
+ /////////output////////
+ 0xfe , 0x00,
+ 0xf1 , 0x07,
+ 0xf2 , 0x01,
+
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_cold.h b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_cold.h
new file mode 100755
index 00000000..2d0a6c28
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_cold.h
@@ -0,0 +1,606 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//4
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x45,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x47,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x4a,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x55,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfe, 0x80,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+
+ //0x42, 0x02,
+ 0xfa, 0x11,
+ 0x4f, 0x00,
+ 0x03, 0x06,
+ 0x04, 0x24,
+ 0x4f, 0x01,
+
+ 0xfe, 0x01,
+ 0x4f, 0x00,
+ 0x4c, 0x01,
+ 0xfe, 0x00,
+ //////////////////////////////
+ //AWB
+ ////////////////////////////////
+0xfe, 0x01,
+ 0x51, 0x80,//20
+ 0x52, 0x12,// 16 //1f
+ 0x53, 0x80,//40
+ 0x54, 0x60,//9f
+ 0x55, 0x04,//01
+ 0x56, 0x0e,//00
+ 0x5b, 0x02,//02
+ 0x61, 0xdc,//R2G_stand0[7:0]
+ 0x62, 0xca,//B2G_stand0[7:0]
+
+ 0x70, 0xf5,
+ 0x71, 0x0a,
+ 0x72, 0x18,//y2c
+ 0x73, 0x30,//28 //20, 0x//AWB_C_inter
+ 0x74, 0x58,//40 //20, 0x// AWB_C_max
+ 0x7c, 0x71,//AWB speed,AWB margin
+ 0x7d, 0x00,//10 //AWB every N
+ 0x76, 0x8f,//move mode en,Move mode TH
+ 0x79, 0x00,//00
+
+
+
+ ////AWB////
+0x4f, 0x00,
+ 0x4d, 0x34,
+ 0x4e, 0x04,
+ 0x4e, 0x02,
+ 0x4e, 0x02,
+ 0x4d, 0x43,
+ 0x4e, 0x04,
+ 0x4e, 0x04,//D50
+ 0x4e, 0x02,// d65 add
+ 0x4e, 0x02,// d65 add
+ 0x4d, 0x53,
+ 0x4e, 0x08,//cwf
+ 0x4e, 0x04,
+ 0x4e, 0x02,//D65
+ 0x4e, 0x02,//D65
+ 0x4d, 0x63,
+ 0x4e, 0x10,//tl84
+ 0x4d, 0x72,
+ 0x4e, 0x20,
+ 0x4e, 0x20,
+ 0x4d, 0x82,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0x92,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0xa0,
+ 0x4e, 0x40,// H
+ 0x4e, 0x40,
+ 0x4e, 0x40,
+ 0x4f, 0x01,
+ 0x50, 0x84,//80//
+ 0xfe, 0x00,//page0
+
+ ////////////////////////////////////////////////
+ //////////// BLK //////////////////////
+ ////////////////////////////////////////////////
+ 0x27, 0xf7,
+ 0x28, 0x7F,
+ 0x29, 0x20,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x32, 0x08,
+
+ 0x47, 0x00,
+ 0x48, 0x00,
+
+ //////////////////////////////////////////////
+ ////////// page 0 ////////////////////////
+ //////////////////////////////////////////////
+ 0xfe, 0x00,
+ //0x05, 0x00,
+ //0x06, 0xde,
+ //0x07, 0x00,
+ //0x08, 0xa7,
+
+ 0x0d, 0x01,
+ 0x0e, 0xe8,
+ 0x0f, 0x02,
+ 0x10, 0x88,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x16, 0x00,
+ 0x17, 0x14,
+ 0x18, 0x0e,
+ 0x19, 0x06,
+
+ 0x1b, 0x48,
+ 0x1f, 0xC8,
+ 0x20, 0x01,
+ 0x21, 0x78,
+ 0x22, 0xb0,
+ 0x23, 0x06,
+ 0x24, 0x16,
+ 0x26, 0x00,
+
+ 0x50, 0x01,
+
+ //global gain for range
+ 0x70, 0x45,
+
+ //////////////////////////////////////
+ //////////// block enable ///
+ //////////////////////////////////////
+ 0x40, 0x7f,
+ 0x41, 0x24,
+
+ 0x42, 0xff,
+
+ 0x45, 0x00,
+ 0x44, 0x02,
+ 0x46, 0x02, //0x03
+
+ 0x4b, 0x01,
+ 0x50, 0x01,
+
+ //DN & EEINTP
+ 0x7e, 0x0a,
+ 0x7f, 0x03,
+ 0x81, 0x15,
+ 0x82, 0x85,
+ 0x83, 0x01,
+ 0x84, 0xe5,
+ 0x90, 0xac,
+ 0x92, 0x03,
+ 0x94, 0x04,//02
+ 0x95, 0x76,//43
+
+
+ ///////YCP
+ 0xd1, 0x30,//38
+ 0xd2, 0x38,//38
+ 0xd3, 0x38,//38
+ 0xdd, 0x54,
+ 0xde, 0x38,
+ 0xe4, 0x88,
+ 0xe5, 0x40,
+ 0xd7, 0x0e,
+
+ //////////////////////////////
+ //////////////// GAMMA //////
+ //////////////////////////////
+ //rgb gamma
+
+
+ 0xBF, 0x10,
+ 0xc0, 0x20,
+ 0xc1, 0x38,
+ 0xc2, 0x4E,
+ 0xc3, 0x63,
+ 0xc4, 0x76,
+ 0xc5, 0x87,
+ 0xc6, 0xA2,
+ 0xc7, 0xB8,
+ 0xc8, 0xCA,
+ 0xc9, 0xD8,
+ 0xcA, 0xE3,
+ 0xcB, 0xEB,
+ 0xcC, 0xF0,
+ 0xcD, 0xF8,
+ 0xcE, 0xFD,
+ 0xcF, 0xFF,
+
+ ///Y gamma
+ 0xfe, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x05,
+ 0x65, 0x0b,
+ 0x66, 0x19,
+ 0x67, 0x2e,
+ 0x68, 0x40,
+ 0x69, 0x54,
+ 0x6a, 0x66,
+ 0x6b, 0x86,
+ 0x6c, 0xa7,
+ 0x6d, 0xc6,
+ 0x6e, 0xe4,
+ 0x6f, 0xff,
+
+
+
+ //////ASDE
+ 0xfe, 0x01,
+ 0x18, 0x02,
+
+ 0xfe, 0x00,
+
+ 0x98, 0x00,
+ 0x9b, 0x20,
+ 0x9c, 0x80,
+ 0xa4, 0x10,
+ 0xa8, 0xB0,
+ 0xaa, 0x40,
+ 0xa2, 0x23,
+ 0xad, 0x01,
+
+ ///////////////////////////////////////
+ ////////// AEC /////////////////////
+ ///////////////////////////////////////
+ 0xfe, 0x01,
+ 0x9c, 0x02,
+ 0x08, 0xa0,
+ 0x09, 0xe8,
+
+ 0x10, 0x08,
+
+ 0x11, 0x91,
+ 0x12, 0x10,
+ 0x13, 0x30,// 45
+ 0x15, 0xfc,
+ 0x21, 0xa0,//c0
+ 0x22, 0x40,//60
+ 0x23, 0x30,
+ 0x25, 0x00,
+ 0x24, 0x14,
+
+
+ //0x28, 0x0a,
+
+ 0xfe,0x00 ,
+ 0x05,0x00 ,
+ 0x06,0x80 , // hb
+ 0x07,0x00 ,
+ 0x08,0x60 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x49 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 20fps
+ 0x2c,0x48,
+ 0x2d,0x02 , //exp level 14 fps
+ 0x2e,0xda ,
+ 0x2f,0x03 , //exp level 2 10.00fps
+ 0x30,0xfe ,
+ 0x31,0x05 , //exp level 3 8fps
+ 0x32,0x6b ,
+ 0xfe,0x00 ,
+ //////////////////////////////////////
+ ////////////LSC//////////////////////
+ //////////////////////////////////////
+ 0xfe, 0x01,
+ 0xc0, 0x0f,
+ 0xc1, 0x0b,
+ 0xc2, 0x0b,
+ 0xc6, 0x04,
+ 0xc7, 0x00,
+ 0xc8, 0x00,
+ 0xba, 0x1e,
+ 0xbb, 0x1a,
+ 0xbc, 0x1b,
+ 0xb4, 0x1a,
+ 0xb5, 0x12,
+ 0xb6, 0x14,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xbd, 0x0a,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xb7, 0x04,
+ 0xb8, 0x00,
+ 0xb9, 0x00,
+ 0xa8, 0x13,
+ 0xa9, 0x0b,
+ 0xaa, 0x0b,
+ 0xab, 0x20,
+ 0xac, 0x1c,
+ 0xad, 0x22,
+ 0xae, 0x0e,
+ 0xaf, 0x05,
+ 0xb0, 0x06,
+ 0xb1, 0x0d,
+ 0xb2, 0x0a,
+ 0xb3, 0x08,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xa1, 0x3c,
+ 0xa2, 0x50,
+ 0xfe, 0x00,
+
+ ///cct
+ #if 0
+ 0xB1, 0x02,
+ 0xB2, 0x02,
+ 0xB3, 0x07,
+ 0xB4, 0xf0,
+ 0xB5, 0x05,
+ 0xB6, 0xf0,
+
+ 0xf1, 0x07,
+
+ 0xf2, 0x01,
+ #endif
+0xB1,0x08 ,// 40
+ 0xB2,0x02 ,
+ 0xB3,0x03 ,//07
+ 0xB4,0xe0 ,
+ 0xB5,0x00 ,//
+ 0xB6,0xf0 ,
+ 0xB7,0x0a ,
+
+ 0xf1,0x07 ,
+ 0xf1,0x07 ,
+ 0xf2,0x01 ,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_warm.h b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_warm.h
new file mode 100755
index 00000000..4b7746bf
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328-wave7_warm.h
@@ -0,0 +1,605 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//4
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x45,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x47,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x05,
+ 0xfe, 0x01,
+ 0x13, 0x50,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x75,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfe, 0x80,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+
+ //0x42, 0x02,
+ 0xfa, 0x11,
+ 0x4f, 0x00,
+ 0x03, 0x06,
+ 0x04, 0x24,
+ 0x4f, 0x01,
+
+ 0xfe, 0x01,
+ 0x4f, 0x00,
+ 0x4c, 0x01,
+ 0xfe, 0x00,
+ //////////////////////////////
+ //AWB
+ ////////////////////////////////
+0xfe, 0x01,
+ 0x51, 0x80,//20
+ 0x52, 0x12,// 16 //1f
+ 0x53, 0x80,//40
+ 0x54, 0x60,//9f
+ 0x55, 0x04,//01
+ 0x56, 0x0e,//00
+ 0x5b, 0x02,//02
+ 0x61, 0xdc,//R2G_stand0[7:0]
+ 0x62, 0xca,//B2G_stand0[7:0]
+
+ 0x70, 0xf5,
+ 0x71, 0x0a,
+ 0x72, 0x18,//y2c
+ 0x73, 0x30,//28 //20, 0x//AWB_C_inter
+ 0x74, 0x58,//40 //20, 0x// AWB_C_max
+ 0x7c, 0x71,//AWB speed,AWB margin
+ 0x7d, 0x00,//10 //AWB every N
+ 0x76, 0x8f,//move mode en,Move mode TH
+ 0x79, 0x00,//00
+
+
+
+ ////AWB////
+0x4f, 0x00,
+ 0x4d, 0x34,
+ 0x4e, 0x04,
+ 0x4e, 0x02,
+ 0x4e, 0x02,
+ 0x4d, 0x43,
+ 0x4e, 0x04,
+ 0x4e, 0x04,//D50
+ 0x4e, 0x02,// d65 add
+ 0x4e, 0x02,// d65 add
+ 0x4d, 0x53,
+ 0x4e, 0x08,//cwf
+ 0x4e, 0x04,
+ 0x4e, 0x02,//D65
+ 0x4e, 0x02,//D65
+ 0x4d, 0x63,
+ 0x4e, 0x10,//tl84
+ 0x4d, 0x72,
+ 0x4e, 0x20,
+ 0x4e, 0x20,
+ 0x4d, 0x82,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0x92,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0xa0,
+ 0x4e, 0x40,// H
+ 0x4e, 0x40,
+ 0x4e, 0x40,
+ 0x4f, 0x01,
+ 0x50, 0x84,//80//
+ 0xfe, 0x00,//page0
+
+ ////////////////////////////////////////////////
+ //////////// BLK //////////////////////
+ ////////////////////////////////////////////////
+ 0x27, 0xf7,
+ 0x28, 0x7F,
+ 0x29, 0x20,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x32, 0x08,
+
+ 0x47, 0x00,
+ 0x48, 0x00,
+
+ //////////////////////////////////////////////
+ ////////// page 0 ////////////////////////
+ //////////////////////////////////////////////
+ 0xfe, 0x00,
+ //0x05, 0x00,
+ //0x06, 0xde,
+ //0x07, 0x00,
+ //0x08, 0xa7,
+
+ 0x0d, 0x01,
+ 0x0e, 0xe8,
+ 0x0f, 0x02,
+ 0x10, 0x88,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x16, 0x00,
+ 0x17, 0x14,
+ 0x18, 0x0e,
+ 0x19, 0x06,
+
+ 0x1b, 0x48,
+ 0x1f, 0xC8,
+ 0x20, 0x01,
+ 0x21, 0x78,
+ 0x22, 0xb0,
+ 0x23, 0x06,
+ 0x24, 0x16,
+ 0x26, 0x00,
+
+ 0x50, 0x01,
+
+ //global gain for range
+ 0x70, 0x45,
+
+ //////////////////////////////////////
+ //////////// block enable ///
+ //////////////////////////////////////
+ 0x40, 0x7f,
+ 0x41, 0x24,
+
+ 0x42, 0xff,
+
+ 0x45, 0x00,
+ 0x44, 0x02,
+ 0x46, 0x02, //0x03
+
+ 0x4b, 0x01,
+ 0x50, 0x01,
+
+ //DN & EEINTP
+ 0x7e, 0x0a,
+ 0x7f, 0x03,
+ 0x81, 0x15,
+ 0x82, 0x85,
+ 0x83, 0x03,
+ 0x84, 0xe5,
+ 0x90, 0xac,
+ 0x92, 0x02,
+ 0x94, 0x04,//02
+ 0x95, 0x87,//76
+
+
+ ///////YCP
+ 0xd1, 0x30,//38
+ 0xd2, 0x38,//38
+ 0xd3, 0x42,//38
+ 0xdd, 0x54,
+ 0xde, 0x38,
+ 0xe4, 0x88,
+ 0xe5, 0x40,
+ 0xd7, 0x0e,
+
+ //////////////////////////////
+ //////////////// GAMMA //////
+ //////////////////////////////
+ //rgb gamma
+ 0xBF, 0x14,
+ 0xc0, 0x28,
+ 0xc1, 0x44,
+ 0xc2, 0x5D,
+ 0xc3, 0x72,
+ 0xc4, 0x86,
+ 0xc5, 0x95,
+ 0xc6, 0xB1,
+ 0xc7, 0xC6,
+ 0xc8, 0xD5,
+ 0xc9, 0xE1,
+ 0xcA, 0xEA,
+ 0xcB, 0xF1,
+ 0xcC, 0xF5,
+ 0xcD, 0xFB,
+ 0xcE, 0xFE,
+ 0xcF, 0xFF,
+
+ ///Y gamma
+ 0xfe, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x05,
+ 0x65, 0x0b,
+ 0x66, 0x19,
+ 0x67, 0x2e,
+ 0x68, 0x40,
+ 0x69, 0x54,
+ 0x6a, 0x66,
+ 0x6b, 0x86,
+ 0x6c, 0xa7,
+ 0x6d, 0xc6,
+ 0x6e, 0xe4,
+ 0x6f, 0xff,
+
+
+
+ //////ASDE
+ 0xfe, 0x01,
+ 0x18, 0x02,
+
+ 0xfe, 0x00,
+
+ 0x98, 0x00,
+ 0x9b, 0x20,
+ 0x9c, 0x80,
+ 0xa4, 0x10,
+ 0xa8, 0xB0,
+ 0xaa, 0x40,
+ 0xa2, 0x23,
+ 0xad, 0x01,
+
+ ///////////////////////////////////////
+ ////////// AEC /////////////////////
+ ///////////////////////////////////////
+ 0xfe, 0x01,
+ 0x9c, 0x02,
+ 0x08, 0xa0,
+ 0x09, 0xe8,
+
+ 0x10, 0x08,
+
+ 0x11, 0x91,
+ 0x12, 0x10,
+ 0x13, 0x5a,// 45
+ 0x15, 0xfc,
+ 0x21, 0xa0,//c0
+ 0x22, 0x60,//40
+ 0x23, 0x30,
+ 0x25, 0x00,
+ 0x24, 0x14,
+
+
+ //0x28, 0x0a,
+
+ 0xfe,0x00 ,
+ 0x05,0x00 ,
+ 0x06,0x80 , // hb
+ 0x07,0x00 ,
+ 0x08,0x60 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x49 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 20fps
+ 0x2c,0x48,
+ 0x2d,0x02 , //exp level 14 fps
+ 0x2e,0xda ,
+ 0x2f,0x03 , //exp level 2 10.00fps
+ 0x30,0xfe ,
+ 0x31,0x05 , //exp level 3 8fps
+ 0x32,0x6b ,
+ 0x33,0x20,
+ 0xfe,0x00 ,
+ //////////////////////////////////////
+ ////////////LSC//////////////////////
+ //////////////////////////////////////
+ 0xfe, 0x01,
+ 0xc0, 0x0f,
+ 0xc1, 0x0b,
+ 0xc2, 0x0b,
+ 0xc6, 0x04,
+ 0xc7, 0x00,
+ 0xc8, 0x00,
+ 0xba, 0x1e,
+ 0xbb, 0x1a,
+ 0xbc, 0x1b,
+ 0xb4, 0x1a,
+ 0xb5, 0x12,
+ 0xb6, 0x14,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xbd, 0x0a,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xb7, 0x04,
+ 0xb8, 0x00,
+ 0xb9, 0x00,
+ 0xa8, 0x13,
+ 0xa9, 0x0b,
+ 0xaa, 0x0b,
+ 0xab, 0x20,
+ 0xac, 0x1c,
+ 0xad, 0x22,
+ 0xae, 0x0e,
+ 0xaf, 0x05,
+ 0xb0, 0x06,
+ 0xb1, 0x0d,
+ 0xb2, 0x0a,
+ 0xb3, 0x08,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xa1, 0x3c,
+ 0xa2, 0x50,
+ 0xfe, 0x00,
+
+ ///cct
+ #if 0
+ 0xB1, 0x02,
+ 0xB2, 0x02,
+ 0xB3, 0x07,
+ 0xB4, 0xf0,
+ 0xB5, 0x05,
+ 0xB6, 0xf0,
+
+ 0xf1, 0x07,
+
+ 0xf2, 0x01,
+ #endif
+0xB1,0x08 ,// 40
+ 0xB2,0x02 ,
+ 0xB3,0x03 ,//07
+ 0xB4,0xe0 ,
+ 0xB5,0x00 ,//
+ 0xB6,0xf0 ,
+ 0xB7,0x0a ,
+
+ 0xf1,0x07 ,
+ 0xf1,0x07 ,
+ 0xf2,0x01 ,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.c b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.c
new file mode 100755
index 00000000..bb709e91
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.c
@@ -0,0 +1,346 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0328.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+struct sensor_flip{
+ int h_flip;
+ int v_flip;
+}gc0328_flip;
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ //CMOS_WIN_SIZE("QVGA", 320, 240, gc0328_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0328_640x480),
+};
+
+#define FILP_REG_INIT_VALUE 0x14
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc0328_wb_auto;
+ size = ARRAY_SIZE(gc0328_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc0328_wb_incandescent;
+ size = ARRAY_SIZE(gc0328_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc0328_wb_daylight;
+ size = ARRAY_SIZE(gc0328_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc0328_wb_cloudy;
+ size = ARRAY_SIZE(gc0328_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc0328_wb_fluorescent;
+ size = ARRAY_SIZE(gc0328_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc0328_scene_mode_auto;
+ size = ARRAY_SIZE(gc0328_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc0328_scene_mode_night;
+ size = ARRAY_SIZE(gc0328_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc0328_exposure_neg6;
+ size = ARRAY_SIZE(gc0328_exposure_neg6);
+ break;
+ case -1:
+ regs = gc0328_exposure_neg3;
+ size = ARRAY_SIZE(gc0328_exposure_neg3);
+ break;
+ case 0:
+ regs = gc0328_exposure_zero;
+ size = ARRAY_SIZE(gc0328_exposure_zero);
+ break;
+ case 1:
+ regs = gc0328_exposure_pos3;
+ size = ARRAY_SIZE(gc0328_exposure_pos3);
+ break;
+ case 2:
+ regs = gc0328_exposure_pos6;
+ size = ARRAY_SIZE(gc0328_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ //data = sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ gc0328_flip.h_flip = 0x00;
+ data= (0x14&~0x01);
+ break;
+ case 1:
+ gc0328_flip.h_flip =0x01;
+ data = (0x14|0x01);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ data|=gc0328_flip.v_flip;
+ sensor_write(sd, 0x17, data);
+ msleep(50);
+
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ //data = sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ gc0328_flip.v_flip = 0x00;
+ data = (0x14&~0x02);
+ break;
+ case 1:
+ gc0328_flip.v_flip = 0x02;
+ data = (0x14|0x02);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ data|=gc0328_flip.h_flip;
+ sensor_write(sd, 0x17, data);
+ msleep(50);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0xf0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ gc0328_flip.h_flip=0;
+ gc0328_flip.v_flip=0;
+ sensor_write_array(sd, gc0328_default_regs_init,
+ ARRAY_SIZE(gc0328_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ //sensor_write_array(sd, gc0328_default_regs_exit,
+ // ARRAY_SIZE(gc0328_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0328_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc0328 = {
+ .name = "gc0328",
+ .i2c_addr = 0x21,
+ .id = 0x9d,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0328_ops,
+};
+
+#if 0
+static int __init gc0328_init(void)
+{
+ return cmos_register_sudbdev(&gc0328);
+}
+
+static void __exit gc0328_exit(void)
+{
+ return cmos_unregister_subdev(&gc0328);
+}
+
+module_init(gc0328_init);
+module_exit(gc0328_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.h b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.h
new file mode 100755
index 00000000..05e49ba5
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328.h
@@ -0,0 +1,604 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//4
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x35,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x37,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x38,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x55,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfe, 0x80,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+
+ //0x42, 0x02,
+ 0xfa, 0x11,
+ 0x4f, 0x00,
+ 0x03, 0x06,
+ 0x04, 0x24,
+ 0x4f, 0x01,
+
+ 0xfe, 0x01,
+ 0x4f, 0x00,
+ 0x4c, 0x01,
+ 0xfe, 0x00,
+ //////////////////////////////
+ //AWB
+ ////////////////////////////////
+0xfe, 0x01,
+ 0x51, 0x80,//20
+ 0x52, 0x12,// 16 //1f
+ 0x53, 0x80,//40
+ 0x54, 0x60,//9f
+ 0x55, 0x04,//01
+ 0x56, 0x0e,//00
+ 0x5b, 0x02,//02
+ 0x61, 0xdc,//R2G_stand0[7:0]
+ 0x62, 0xca,//B2G_stand0[7:0]
+
+ 0x70, 0xf5,
+ 0x71, 0x0a,
+ 0x72, 0x18,//y2c
+ 0x73, 0x30,//28 //20, 0x//AWB_C_inter
+ 0x74, 0x58,//40 //20, 0x// AWB_C_max
+ 0x7c, 0x71,//AWB speed,AWB margin
+ 0x7d, 0x00,//10 //AWB every N
+ 0x76, 0x8f,//move mode en,Move mode TH
+ 0x79, 0x00,//00
+
+
+
+ ////AWB////
+0x4f, 0x00,
+ 0x4d, 0x34,
+ 0x4e, 0x04,
+ 0x4e, 0x02,
+ 0x4e, 0x02,
+ 0x4d, 0x43,
+ 0x4e, 0x04,
+ 0x4e, 0x04,//D50
+ 0x4e, 0x02,// d65 add
+ 0x4e, 0x02,// d65 add
+ 0x4d, 0x53,
+ 0x4e, 0x08,//cwf
+ 0x4e, 0x04,
+ 0x4e, 0x02,//D65
+ 0x4e, 0x02,//D65
+ 0x4d, 0x63,
+ 0x4e, 0x10,//tl84
+ 0x4d, 0x72,
+ 0x4e, 0x20,
+ 0x4e, 0x20,
+ 0x4d, 0x82,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0x92,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0xa0,
+ 0x4e, 0x40,// H
+ 0x4e, 0x40,
+ 0x4e, 0x40,
+ 0x4f, 0x01,
+ 0x50, 0x84,//80//
+ 0xfe, 0x00,//page0
+
+ ////////////////////////////////////////////////
+ //////////// BLK //////////////////////
+ ////////////////////////////////////////////////
+ 0x27, 0xf7,
+ 0x28, 0x7F,
+ 0x29, 0x20,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x32, 0x08,
+
+ 0x47, 0x00,
+ 0x48, 0x00,
+
+ //////////////////////////////////////////////
+ ////////// page 0 ////////////////////////
+ //////////////////////////////////////////////
+ 0xfe, 0x00,
+ //0x05, 0x00,
+ //0x06, 0xde,
+ //0x07, 0x00,
+ //0x08, 0xa7,
+
+ 0x0d, 0x01,
+ 0x0e, 0xe8,
+ 0x0f, 0x02,
+ 0x10, 0x88,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x16, 0x00,
+ 0x17, 0x14,
+ 0x18, 0x0e,
+ 0x19, 0x06,
+
+ 0x1b, 0x48,
+ 0x1f, 0xC8,
+ 0x20, 0x01,
+ 0x21, 0x78,
+ 0x22, 0xb0,
+ 0x23, 0x06,
+ 0x24, 0x16,
+ 0x26, 0x00,
+
+ 0x50, 0x01,
+
+ //global gain for range
+ 0x70, 0x45,
+
+ //////////////////////////////////////
+ //////////// block enable ///
+ //////////////////////////////////////
+ 0x40, 0x7f,
+ 0x41, 0x24,
+
+ 0x42, 0xff,
+
+ 0x45, 0x00,
+ 0x44, 0x02,
+ 0x46, 0x02, //0x03
+
+ 0x4b, 0x01,
+ 0x50, 0x01,
+
+ //DN & EEINTP
+ 0x7e, 0x0a,
+ 0x7f, 0x03,
+ 0x81, 0x15,
+ 0x82, 0x85,
+ 0x83, 0x02,
+ 0x84, 0xe5,
+ 0x90, 0xac,
+ 0x92, 0x02,
+ 0x94, 0x04,//02
+ 0x95, 0x76,//43
+
+
+ ///////YCP
+ 0xd1, 0x30,//38
+ 0xd2, 0x38,//38
+ 0xd3, 0x38,//38
+ 0xdd, 0x54,
+ 0xde, 0x38,
+ 0xe4, 0x88,
+ 0xe5, 0x40,
+ 0xd7, 0x0e,
+
+ //////////////////////////////
+ //////////////// GAMMA //////
+ //////////////////////////////
+ //rgb gamma
+ 0xBF, 0x0E,
+ 0xc0, 0x1C,
+ 0xc1, 0x34,
+ 0xc2, 0x48,
+ 0xc3, 0x5A,
+ 0xc4, 0x6B,
+ 0xc5, 0x7B,
+ 0xc6, 0x95,
+ 0xc7, 0xAB,
+ 0xc8, 0xBF,
+ 0xc9, 0xCE,
+ 0xcA, 0xD9,
+ 0xcB, 0xE4,
+ 0xcC, 0xEC,
+ 0xcD, 0xF7,
+ 0xcE, 0xFD,
+ 0xcF, 0xFF,
+
+ ///Y gamma
+ 0xfe, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x05,
+ 0x65, 0x0b,
+ 0x66, 0x19,
+ 0x67, 0x2e,
+ 0x68, 0x40,
+ 0x69, 0x54,
+ 0x6a, 0x66,
+ 0x6b, 0x86,
+ 0x6c, 0xa7,
+ 0x6d, 0xc6,
+ 0x6e, 0xe4,
+ 0x6f, 0xff,
+
+
+
+ //////ASDE
+ 0xfe, 0x01,
+ 0x18, 0x02,
+
+ 0xfe, 0x00,
+
+ 0x98, 0x00,
+ 0x9b, 0x20,
+ 0x9c, 0x80,
+ 0xa4, 0x10,
+ 0xa8, 0xB0,
+ 0xaa, 0x40,
+ 0xa2, 0x23,
+ 0xad, 0x01,
+
+ ///////////////////////////////////////
+ ////////// AEC /////////////////////
+ ///////////////////////////////////////
+ 0xfe, 0x01,
+ 0x9c, 0x02,
+ 0x08, 0xa0,
+ 0x09, 0xe8,
+
+ 0x10, 0x08,
+
+ 0x11, 0x91,
+ 0x12, 0x10,
+ 0x13, 0x30,// 45
+ 0x15, 0xfc,
+ 0x21, 0xa0,//c0
+ 0x22, 0x40,//60
+ 0x23, 0x30,
+ 0x25, 0x00,
+ 0x24, 0x14,
+
+
+ //0x28, 0x0a,
+
+ 0xfe,0x00 ,
+ 0x05,0x00 ,
+ 0x06,0x80 , // hb
+ 0x07,0x00 ,
+ 0x08,0x60 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x49 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 20fps
+ 0x2c,0x48,
+ 0x2d,0x02 , //exp level 14 fps
+ 0x2e,0xda ,
+ 0x2f,0x03 , //exp level 2 10.00fps
+ 0x30,0xfe ,
+ 0x31,0x05 , //exp level 3 8fps
+ 0x32,0x6b ,
+ 0xfe,0x00 ,
+ //////////////////////////////////////
+ ////////////LSC//////////////////////
+ //////////////////////////////////////
+ 0xfe, 0x01,
+ 0xc0, 0x0f,
+ 0xc1, 0x0b,
+ 0xc2, 0x0b,
+ 0xc6, 0x04,
+ 0xc7, 0x00,
+ 0xc8, 0x00,
+ 0xba, 0x1e,
+ 0xbb, 0x1a,
+ 0xbc, 0x1b,
+ 0xb4, 0x1a,
+ 0xb5, 0x12,
+ 0xb6, 0x14,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xbd, 0x0a,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xb7, 0x04,
+ 0xb8, 0x00,
+ 0xb9, 0x00,
+ 0xa8, 0x13,
+ 0xa9, 0x0b,
+ 0xaa, 0x0b,
+ 0xab, 0x20,
+ 0xac, 0x1c,
+ 0xad, 0x22,
+ 0xae, 0x0e,
+ 0xaf, 0x05,
+ 0xb0, 0x06,
+ 0xb1, 0x0d,
+ 0xb2, 0x0a,
+ 0xb3, 0x08,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xa1, 0x3c,
+ 0xa2, 0x50,
+ 0xfe, 0x00,
+
+ ///cct
+ #if 0
+ 0xB1, 0x02,
+ 0xB2, 0x02,
+ 0xB3, 0x07,
+ 0xB4, 0xf0,
+ 0xB5, 0x05,
+ 0xB6, 0xf0,
+
+ 0xf1, 0x07,
+
+ 0xf2, 0x01,
+ #endif
+0xB1,0x08 ,// 40
+ 0xB2,0x02 ,
+ 0xB3,0x03 ,//07
+ 0xB4,0xe0 ,
+ 0xB5,0x00 ,//
+ 0xB6,0xf0 ,
+ 0xB7,0x0a ,
+
+ 0xf1,0x07 ,
+ 0xf1,0x07 ,
+ 0xf2,0x01 ,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_kyt111_v7.h b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_kyt111_v7.h
new file mode 100755
index 00000000..d41427a7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_kyt111_v7.h
@@ -0,0 +1,604 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//40
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x35,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x37,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x38,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x55,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfe, 0x80,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+
+ //0x42, 0x02,
+ 0xfa, 0x11,
+ 0x4f, 0x00,
+ 0x03, 0x06,
+ 0x04, 0x24,
+ 0x4f, 0x01,
+
+ 0xfe, 0x01,
+ 0x4f, 0x00,
+ 0x4c, 0x01,
+ 0xfe, 0x00,
+ //////////////////////////////
+ //AWB
+ ////////////////////////////////
+0xfe, 0x01,
+ 0x51, 0x80,//20
+ 0x52, 0x12,// 16 //1f
+ 0x53, 0x80,//40
+ 0x54, 0x60,//9f
+ 0x55, 0x04,//01
+ 0x56, 0x0e,//00
+ 0x5b, 0x02,//02
+ 0x61, 0xdc,//R2G_stand0[7:0]
+ 0x62, 0xca,//B2G_stand0[7:0]
+
+ 0x70, 0xf5,
+ 0x71, 0x0a,
+ 0x72, 0x18,//y2c
+ 0x73, 0x30,//28 //20, 0x//AWB_C_inter
+ 0x74, 0x58,//40 //20, 0x// AWB_C_max
+ 0x7c, 0x71,//AWB speed,AWB margin
+ 0x7d, 0x00,//10 //AWB every N
+ 0x76, 0x8f,//move mode en,Move mode TH
+ 0x79, 0x00,//00
+
+
+
+ ////AWB////
+0x4f, 0x00,
+ 0x4d, 0x34,
+ 0x4e, 0x04,
+ 0x4e, 0x02,
+ 0x4e, 0x02,
+ 0x4d, 0x43,
+ 0x4e, 0x04,
+ 0x4e, 0x04,//D50
+ 0x4e, 0x02,// d65 add
+ 0x4e, 0x02,// d65 add
+ 0x4d, 0x53,
+ 0x4e, 0x08,//cwf
+ 0x4e, 0x04,
+ 0x4e, 0x02,//D65
+ 0x4e, 0x02,//D65
+ 0x4d, 0x63,
+ 0x4e, 0x10,//tl84
+ 0x4d, 0x72,
+ 0x4e, 0x20,
+ 0x4e, 0x20,
+ 0x4d, 0x82,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0x92,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0xa0,
+ 0x4e, 0x40,// H
+ 0x4e, 0x40,
+ 0x4e, 0x40,
+ 0x4f, 0x01,
+ 0x50, 0x84,//80//
+ 0xfe, 0x00,//page0
+
+ ////////////////////////////////////////////////
+ //////////// BLK //////////////////////
+ ////////////////////////////////////////////////
+ 0x27, 0xf7,
+ 0x28, 0x7F,
+ 0x29, 0x20,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x32, 0x08,
+
+ 0x47, 0x00,
+ 0x48, 0x00,
+
+ //////////////////////////////////////////////
+ ////////// page 0 ////////////////////////
+ //////////////////////////////////////////////
+ 0xfe, 0x00,
+ //0x05, 0x00,
+ //0x06, 0xde,
+ //0x07, 0x00,
+ //0x08, 0xa7,
+
+ 0x0d, 0x01,
+ 0x0e, 0xe8,
+ 0x0f, 0x02,
+ 0x10, 0x88,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x16, 0x00,
+ 0x17, 0x14,
+ 0x18, 0x0e,
+ 0x19, 0x06,
+
+ 0x1b, 0x48,
+ 0x1f, 0xC8,
+ 0x20, 0x01,
+ 0x21, 0x78,
+ 0x22, 0xb0,
+ 0x23, 0x06,
+ 0x24, 0x16,
+ 0x26, 0x00,
+
+ 0x50, 0x01,
+
+ //global gain for range
+ 0x70, 0x44, //45 2013-7-24 dustin
+
+ //////////////////////////////////////
+ //////////// block enable ///
+ //////////////////////////////////////
+ 0x40, 0x7f,
+ 0x41, 0x24,
+
+ 0x42, 0xff,
+
+ 0x45, 0x00,
+ 0x44, 0x02,
+ 0x46, 0x02, //0x03
+
+ 0x4b, 0x01,
+ 0x50, 0x01,
+
+ //DN & EEINTP
+ 0x7e, 0x0a,
+ 0x7f, 0x03,
+ 0x81, 0x15,
+ 0x82, 0x85,
+ 0x83, 0x02,
+ 0x84, 0xe5,
+ 0x90, 0xac,
+ 0x92, 0x02,
+ 0x94, 0x04,//02
+ 0x95, 0x76,//43
+
+
+ ///////YCP
+ 0xd1, 0x30,//38
+ 0xd2, 0x38,//38
+ 0xd3, 0x38,//38
+ 0xdd, 0x2f,//54 2013-7-24 dustin
+ 0xde, 0x38,
+ 0xe4, 0x88,
+ 0xe5, 0x40,
+ 0xd7, 0x0e,
+
+ //////////////////////////////
+ //////////////// GAMMA //////
+ //////////////////////////////
+ //rgb gamma
+ 0xBF, 0x0E,
+ 0xc0, 0x1C,
+ 0xc1, 0x34,
+ 0xc2, 0x48,
+ 0xc3, 0x5A,
+ 0xc4, 0x6B,
+ 0xc5, 0x7B,
+ 0xc6, 0x95,
+ 0xc7, 0xAB,
+ 0xc8, 0xBF,
+ 0xc9, 0xCE,
+ 0xcA, 0xD9,
+ 0xcB, 0xE4,
+ 0xcC, 0xEC,
+ 0xcD, 0xF7,
+ 0xcE, 0xFD,
+ 0xcF, 0xFF,
+
+ ///Y gamma
+ 0xfe, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x05,
+ 0x65, 0x0b,
+ 0x66, 0x19,
+ 0x67, 0x2e,
+ 0x68, 0x40,
+ 0x69, 0x54,
+ 0x6a, 0x66,
+ 0x6b, 0x86,
+ 0x6c, 0xa7,
+ 0x6d, 0xc6,
+ 0x6e, 0xe4,
+ 0x6f, 0xff,
+
+
+
+ //////ASDE
+ 0xfe, 0x01,
+ 0x18, 0x02,
+
+ 0xfe, 0x00,
+
+ 0x98, 0x00,
+ 0x9b, 0x20,
+ 0x9c, 0x80,
+ 0xa4, 0x10,
+ 0xa8, 0xB0,
+ 0xaa, 0x40,
+ 0xa2, 0x23,
+ 0xad, 0x01,
+
+ ///////////////////////////////////////
+ ////////// AEC /////////////////////
+ ///////////////////////////////////////
+ 0xfe, 0x01,
+ 0x9c, 0x02,
+ 0x08, 0xa0,
+ 0x09, 0xe8,
+
+ 0x10, 0x08,
+
+ 0x11, 0x91,
+ 0x12, 0x10,
+ 0x13, 0x30,// 45
+ 0x15, 0xfc,
+ 0x21, 0xa0,//c0
+ 0x22, 0x40,//60
+ 0x23, 0x30,
+ 0x25, 0x00,
+ 0x24, 0x14,
+
+
+ //0x28, 0x0a,
+
+ 0xfe,0x00 ,
+ 0x05,0x00 ,
+ 0x06,0x80 , // hb
+ 0x07,0x00 ,
+ 0x08,0x60 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x49 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 248
+ 0x2c,0x48,
+ 0x2d,0x03 , //exp level 1 2da
+ 0x2e,0x6c ,
+ 0x2f,0x04 , //exp level 2 3fe
+ 0x30,0x47 ,
+ 0x31,0x05 , //exp level 3 56b
+ 0x32,0x6b ,
+ 0xfe,0x00 ,
+ //////////////////////////////////////
+ ////////////LSC//////////////////////
+ //////////////////////////////////////
+ 0xfe, 0x01,
+ 0xc0, 0x0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++ b/drivers/media/video/wmt_v4l2/sensors/gc0328/gc0328_ra474a_v7.h
@@ -0,0 +1,624 @@
+#ifndef GC0328_H
+#define GC0328_H
+
+
+// Scene Mode
+unsigned char gc0328_scene_mode_auto[] = {
+ 0xfa, 0x00,
+};
+
+unsigned char gc0328_scene_mode_night[] = {
+ 0xfa, 0x11,
+};
+
+
+// White Balance
+unsigned char gc0328_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x60,//57
+ 0x78, 0x40,//4
+ 0x79, 0x60,//45
+ 0x42, 0xfe,
+};
+
+unsigned char gc0328_wb_incandescent [] = {
+ //bai re guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+};
+
+unsigned char gc0328_wb_fluorescent [] = {
+ //ri guang deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+};
+
+unsigned char gc0328_wb_daylight [] = {
+ //tai yang guang
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+};
+
+unsigned char gc0328_wb_tungsten [] = {
+ //wu si deng
+ 0xfe, 0x00,
+ 0x42, 0xfd,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70
+};
+
+
+// Exposure
+unsigned char gc0328_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x35,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x37,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x38,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x55,
+ 0xfe, 0x00
+};
+
+unsigned char gc0328_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x65,
+ 0xfe, 0x00
+};
+
+
+// Color Effect
+unsigned char gc0328_colorfx_none[] = {
+
+ 0x43, 0x00
+};
+
+unsigned char gc0328_colorfx_bw[] = {
+
+ 0x43, 0x02,
+ 0xda, 0xd0,
+ 0xdb, 0x28
+};
+
+unsigned char gc0328_colorfx_sepia[] = {
+ 0x43, 0x02,
+ 0xda, 0xc0,
+ 0xdb, 0xc0
+};
+
+unsigned char gc0328_colorfx_negative[] = {
+
+ 0x43, 0x01
+};
+
+unsigned char gc0328_colorfx_emboss[] = {
+ 0x43, 0x02,
+ 0xda, 0x50,
+ 0xdb, 0xe0
+};
+
+unsigned char gc0328_colorfx_sketch[] = {
+ 0x43, 0x02,
+ 0xda, 0x00,
+ 0xdb, 0x00
+};
+
+unsigned char gc0328_colorfx_sky_blue[] = {
+ 0x43,0x02,
+ 0xda,0x50,
+ 0xdb,0xe0,
+};
+
+unsigned char gc0328_colorfx_grass_green[] = {
+ 0x43,0x02,
+ 0xda,0xc0,
+ 0xdb,0xc0,
+};
+
+unsigned char gc0328_colorfx_skin_whiten[] = {
+};
+
+unsigned char gc0328_colorfx_vivid[] = {
+};
+
+// Brightness
+unsigned char gc0328_brightness_neg4[] = {
+};
+
+unsigned char gc0328_brightness_neg3[] = {
+};
+
+unsigned char gc0328_brightness_neg2[] = {
+};
+
+unsigned char gc0328_brightness_neg1[] = {
+};
+
+unsigned char gc0328_brightness_zero[] = {
+};
+
+unsigned char gc0328_brightness_pos1[] = {
+};
+
+unsigned char gc0328_brightness_pos2[] = {
+};
+
+unsigned char gc0328_brightness_pos3[] = {
+};
+
+unsigned char gc0328_brightness_pos4[] = {
+};
+
+// Contrast
+unsigned char gc0328_contrast_neg4[] = {
+};
+
+unsigned char gc0328_contrast_neg3[] = {
+};
+
+unsigned char gc0328_contrast_neg2[] = {
+};
+
+unsigned char gc0328_contrast_neg1[] = {
+};
+
+unsigned char gc0328_contrast_zero[] = {
+};
+
+unsigned char gc0328_contrast_pos1[] = {
+};
+
+unsigned char gc0328_contrast_pos2[] = {
+};
+
+unsigned char gc0328_contrast_pos3[] = {
+};
+
+unsigned char gc0328_contrast_pos4[] = {
+};
+
+// Saturation
+unsigned char gc0328_saturation_neg4[] = {
+};
+
+unsigned char gc0328_saturation_neg3[] = {
+};
+
+unsigned char gc0328_saturation_neg2[] = {
+};
+
+unsigned char gc0328_saturation_neg1[] = {
+};
+
+unsigned char gc0328_saturation_zero[] = {
+};
+
+unsigned char gc0328_saturation_pos1[] = {
+};
+
+unsigned char gc0328_saturation_pos2[] = {
+};
+
+unsigned char gc0328_saturation_pos3[] = {
+};
+
+unsigned char gc0328_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+unsigned char gc0328_176x144[]={
+};
+
+unsigned char gc0328_320x240[]={
+
+};
+
+unsigned char gc0328_640x480[]={
+};
+
+
+// Initiliztion
+unsigned char gc0328_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfe, 0x80,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+ 0xfc, 0x16,
+
+ //0x42, 0x02,
+// 0xfa, 0x11,
+ 0x4f, 0x00,
+ 0x03, 0x06,
+ 0x04, 0x24,
+ 0x4f, 0x01,
+
+ 0xfe, 0x01,
+ 0x4f, 0x00,
+ 0x4c, 0x01,
+ 0xfe, 0x00,
+ //////////////////////////////
+ //AWB
+ ////////////////////////////////
+0xfe, 0x01,
+ 0x51, 0x80,//20
+ 0x52, 0x12,// 16 //1f
+ 0x53, 0x80,//40
+ 0x54, 0x60,//9f
+ 0x55, 0x04,//01
+ 0x56, 0x0e,//00
+ 0x5b, 0x02,//02
+ 0x61, 0xdc,//R2G_stand0[7:0]
+ 0x62, 0xca,//B2G_stand0[7:0]
+
+ 0x70, 0xf5,
+ 0x71, 0x0a,
+ 0x72, 0x18,//y2c
+ 0x73, 0x30,//28 //20, 0x//AWB_C_inter
+ 0x74, 0x58,//40 //20, 0x// AWB_C_max
+ 0x7c, 0x71,//AWB speed,AWB margin
+ 0x7d, 0x00,//10 //AWB every N
+ 0x76, 0x8f,//move mode en,Move mode TH
+ 0x79, 0x00,//00
+
+
+
+ ////AWB////
+0x4f, 0x00,
+ 0x4d, 0x34,
+ 0x4e, 0x04,
+ 0x4e, 0x02,
+ 0x4e, 0x02,
+ 0x4d, 0x43,
+ 0x4e, 0x04,
+ 0x4e, 0x04,//D50
+ 0x4e, 0x02,// d65 add
+ 0x4e, 0x02,// d65 add
+ 0x4d, 0x53,
+ 0x4e, 0x08,//cwf
+ 0x4e, 0x04,
+ 0x4e, 0x02,//D65
+ 0x4e, 0x02,//D65
+ 0x4d, 0x63,
+ 0x4e, 0x10,//tl84
+ 0x4d, 0x72,
+ 0x4e, 0x20,
+ 0x4e, 0x20,
+ 0x4d, 0x82,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0x92,
+ 0x4e, 0x20,//A
+ 0x4e, 0x20,
+ 0x4d, 0xa0,
+ 0x4e, 0x40,// H
+ 0x4e, 0x40,
+ 0x4e, 0x40,
+ 0x4f, 0x01,
+ 0x50, 0x84,//80//
+ 0xfe, 0x00,//page0
+
+ ////////////////////////////////////////////////
+ //////////// BLK //////////////////////
+ ////////////////////////////////////////////////
+ 0x27, 0xf7,
+ 0x28, 0x7F,
+ 0x29, 0x20,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x32, 0x08,
+
+ 0x47, 0x00,
+ 0x48, 0x00,
+
+ //////////////////////////////////////////////
+ ////////// page 0 ////////////////////////
+ //////////////////////////////////////////////
+ 0xfe, 0x00,
+ //0x05, 0x00,
+ //0x06, 0xde,
+ //0x07, 0x00,
+ //0x08, 0xa7,
+
+ 0x0d, 0x01,
+ 0x0e, 0xe8,
+ 0x0f, 0x02,
+ 0x10, 0x88,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x16, 0x00,
+ 0x17, 0x14,
+ 0x18, 0x0e,
+ 0x19, 0x06,
+
+ 0x1b, 0x48,
+ 0x1f, 0xC8,
+ 0x20, 0x01,
+ 0x21, 0x78,
+ 0x22, 0xb0,
+ 0x23, 0x06,
+ 0x24, 0x16,
+ 0x26, 0x00,
+
+ 0x50, 0x01,
+
+ //global gain for range
+ 0x70, 0x45,
+
+ //////////////////////////////////////
+ //////////// block enable ///
+ //////////////////////////////////////
+ 0x40, 0x7f,
+ 0x41, 0x24,
+
+ 0x42, 0xff,
+
+ 0x45, 0x00,
+ 0x44, 0x02,
+ 0x46, 0x02, //0x03
+
+ 0x4b, 0x01,
+ 0x50, 0x01,
+
+ //DN & EEINTP
+ 0x7e, 0x0a,
+ 0x7f, 0x03,
+ 0x81, 0x15,
+ 0x82, 0x85,
+ 0x83, 0x02,
+ 0x84, 0xe5,
+ 0x90, 0xac,
+ 0x92, 0x02,
+ 0x94, 0x04,//02
+ 0x95, 0x76,//43
+
+
+ ///////YCP
+ 0xd1, 0x30,//38
+ 0xd2, 0x38,//38
+ 0xd3, 0x38,//38
+ 0xdd, 0x54,
+ 0xde, 0x38,
+ 0xe4, 0x88,
+ 0xe5, 0x40,
+ 0xd7, 0x0e,
+
+ //////////////////////////////
+ //////////////// GAMMA //////
+ //////////////////////////////
+ //rgb gamma
+ 0xBF, 0x0E,
+ 0xc0, 0x1C,
+ 0xc1, 0x34,
+ 0xc2, 0x48,
+ 0xc3, 0x5A,
+ 0xc4, 0x6B,
+ 0xc5, 0x7B,
+ 0xc6, 0x95,
+ 0xc7, 0xAB,
+ 0xc8, 0xBF,
+ 0xc9, 0xCE,
+ 0xcA, 0xD9,
+ 0xcB, 0xE4,
+ 0xcC, 0xEC,
+ 0xcD, 0xF7,
+ 0xcE, 0xFD,
+ 0xcF, 0xFF,
+
+ ///Y gamma
+ 0xfe, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x05,
+ 0x65, 0x0b,
+ 0x66, 0x19,
+ 0x67, 0x2e,
+ 0x68, 0x40,
+ 0x69, 0x54,
+ 0x6a, 0x66,
+ 0x6b, 0x86,
+ 0x6c, 0xa7,
+ 0x6d, 0xc6,
+ 0x6e, 0xe4,
+ 0x6f, 0xff,
+
+
+
+ //////ASDE
+ 0xfe, 0x01,
+ 0x18, 0x02,
+
+ 0xfe, 0x00,
+
+ 0x98, 0x00,
+ 0x9b, 0x20,
+ 0x9c, 0x80,
+ 0xa4, 0x10,
+ 0xa8, 0xB0,
+ 0xaa, 0x40,
+ 0xa2, 0x23,
+ 0xad, 0x01,
+
+ ///////////////////////////////////////
+ ////////// AEC /////////////////////
+ ///////////////////////////////////////
+ 0xfe, 0x01,
+ 0x9c, 0x02,
+ 0x08, 0xa0,
+ 0x09, 0xe8,
+
+ 0x10, 0x08,
+
+ 0x11, 0x91,
+ 0x12, 0x10,
+ 0x13, 0x30,// 45
+ 0x15, 0xfc,
+ 0x21, 0xa0,//c0
+ 0x22, 0x40,//60
+ 0x23, 0x30,
+ 0x25, 0x00,
+ 0x24, 0x14,
+
+
+ //0x28, 0x0a,
+#if 0
+ 0xfe,0x00 ,
+ 0x05,0x00 ,
+ 0x06,0x80 , // hb
+ 0x07,0x00 ,
+ 0x08,0x60 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x49 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 20fps
+ 0x2c,0x48,
+ 0x2d,0x02 , //exp level 14 fps
+ 0x2e,0xda ,
+ 0x2f,0x03 , //exp level 2 10.00fps
+ 0x30,0xfe ,
+ 0x31,0x05 , //exp level 3 8fps
+ 0x32,0x6b ,
+ 0xfe,0x00 ,
+ #endif
+ 0xfe,0x00 ,
+ 0x05,0x01 ,
+ 0x06,0x32 , // hb
+ 0x07,0x00 ,
+ 0x08,0x70 ,//vb
+
+ 0xfe,0x01 ,
+ 0x29,0x00 , //anti-flicker step [11:8]
+ 0x2a,0x78 , //anti-flicker step [7:0]
+
+ 0x2b,0x02 , //exp level 0 20fps
+ 0x2c,0x58,
+ 0x2d,0x03 , //exp level 14 fps
+ 0x2e,0x48 ,
+ 0x2f,0x05 , //exp level 2 10.00fps
+ 0x30,0xa0 ,
+ 0x31,0x07 , //exp level 3 8fps
+ 0x32,0x80 ,
+ 0xfe,0x00 ,
+ //////////////////////////////////////
+ ////////////LSC//////////////////////
+ //////////////////////////////////////
+ 0xfe, 0x01,
+ 0xc0, 0x0f,
+ 0xc1, 0x0b,
+ 0xc2, 0x0b,
+ 0xc6, 0x04,
+ 0xc7, 0x00,
+ 0xc8, 0x00,
+ 0xba, 0x1e,
+ 0xbb, 0x1a,
+ 0xbc, 0x1b,
+ 0xb4, 0x1a,
+ 0xb5, 0x12,
+ 0xb6, 0x14,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xbd, 0x0a,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xb7, 0x04,
+ 0xb8, 0x00,
+ 0xb9, 0x00,
+ 0xa8, 0x13,
+ 0xa9, 0x0b,
+ 0xaa, 0x0b,
+ 0xab, 0x20,
+ 0xac, 0x1c,
+ 0xad, 0x22,
+ 0xae, 0x0e,
+ 0xaf, 0x05,
+ 0xb0, 0x06,
+ 0xb1, 0x0d,
+ 0xb2, 0x0a,
+ 0xb3, 0x08,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xa1, 0x3c,
+ 0xa2, 0x50,
+ 0xfe, 0x00,
+
+ ///cct
+ #if 0
+ 0xB1, 0x02,
+ 0xB2, 0x02,
+ 0xB3, 0x07,
+ 0xB4, 0xf0,
+ 0xB5, 0x05,
+ 0xB6, 0xf0,
+
+ 0xf1, 0x07,
+
+ 0xf2, 0x01,
+ #endif
+0xB1,0x08 ,// 40
+ 0xB2,0x02 ,
+ 0xB3,0x03 ,//07
+ 0xB4,0xe0 ,
+ 0xB5,0x00 ,//
+ 0xB6,0xf0 ,
+ 0xB7,0x0a ,
+
+ 0xf1,0x07 ,
+ 0xf1,0x07 ,
+ 0xf2,0x01 ,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod.h
new file mode 100755
index 00000000..148f403c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod.h
@@ -0,0 +1,550 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x56,//6a cyrille
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+
+ 0xfa, 0x11,
+
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+ 0x73, 0x90,
+ 0x74, 0x80,
+ 0x75, 0x80,
+ 0x76, 0x94,
+ 0xfc, 0x16,
+
+ 0x05, 0x01,
+ 0x06, 0x32,
+ 0x07, 0x00,
+ 0x08, 0x70,
+ 0xfe, 0x01,
+ 0x29, 0x00,
+ 0x2a, 0x3c,
+ 0x2b, 0x02,
+ 0x2c, 0x58,
+ 0x2d, 0x02,
+
+ 0x2e, 0xd0,
+ 0x2f, 0x03,
+ 0x30, 0x48,
+ 0x31, 0x04,
+ 0x32, 0x38,
+ 0x33, 0x20,
+ 0xfe, 0x00,
+
+
+
+
+
+ 0x0a, 0x00,
+ 0x0c, 0x00,
+ 0x17, 0x14,
+ 0x19, 0x05,
+ 0x1b, 0x24,
+ 0x1c, 0x04,
+ 0x1e, 0x00,
+ 0x1f, 0xc8,
+ 0x20, 0x00,
+ 0x21, 0x48,
+ 0x23, 0x22,
+ 0x24, 0x16,
+
+
+ 0x26, 0xf7,
+ 0x28, 0x7f,
+ 0x29, 0x00,
+ 0x32, 0x00,
+ 0x33, 0x20,
+ 0x34, 0x20,
+ 0x35, 0x20,
+ 0x36, 0x20,
+ 0x3b, 0x04,
+ 0x3c, 0x04,
+ 0x3d, 0x04,
+ 0x3e, 0x04,
+
+ 0x40, 0xff,
+ 0x41, 0x00,
+ 0x42, 0xfe,
+ 0x46, 0x02,
+ 0x4b, 0xcb,
+ 0x4d, 0x01,
+ 0x4f, 0x01,
+ 0x70, 0x48,
+ 0x80, 0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d, 0x00,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xfe, 0x00,
+
+ 0xfe,0x01,
+ 0x18,0x22,
+ 0x21,0x80,//c0 cyrille
+ 0x06,0x12,
+ 0x08,0x9c,
+ 0x51,0x28,
+ 0x52,0x10,
+ 0x53,0x20,
+ 0x54,0x40,
+ 0x55,0x16,
+ 0x56,0x30,
+ 0x58,0x60,
+ 0x59,0x08,
+ 0x5c,0x35,
+ 0x5d,0x72,
+ 0x67,0x80,
+ 0x68,0x60,
+ 0x69,0x90,
+ 0x6c,0x30,
+ 0x6d,0x60,
+ 0x70,0x10,
+ 0xfe,0x00,
+ 0x9c,0x0a,
+ 0xa0,0xaf,
+ 0xa2,0xff,
+ 0xa4,0x60,
+ 0xa5,0x31,
+ 0xa7,0x35,
+ 0x42,0xfe,
+ 0xd1,0x28, //34 cyrille
+ 0xd2,0x26, //34 cyrille
+ 0xd3,0x40,// 3b cyrille
+ 0xd5,0x00,//0c cyrille
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod_TL070VA5.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod_TL070VA5.h
new file mode 100755
index 00000000..eabe66b7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-3nod_TL070VA5.h
@@ -0,0 +1,560 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x56,//6a cyrille
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+
+ 0xfa, 0x11,
+
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+ 0x73, 0x90,
+ 0x74, 0x80,
+ 0x75, 0x80,
+ 0x76, 0x94,
+ 0xfc, 0x16,
+
+ 0x05, 0x01,
+ 0x06, 0x32,
+ 0x07, 0x00,
+ 0x08, 0x70,
+ 0xfe, 0x01,
+ 0x29, 0x00,
+ 0x2a, 0x3c,
+ /*
+ 0x2b, 0x02,
+ 0x2c, 0x58,
+ 0x2d, 0x02,
+
+ 0x2e, 0xd0,
+ 0x2f, 0x03,
+ 0x30, 0x48,
+ 0x31, 0x04,
+ 0x32, 0x38,*/
+ 0x2b, 0x02,
+ 0x2c, 0xd0,
+ 0x2d, 0x03,
+
+ 0x2e, 0x48,
+ 0x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 0x9c,0x0a,
+ 0xa0,0xaf,
+ 0xa2,0xff,
+ 0xa4,0x60,
+ 0xa5,0x31,
+ 0xa7,0x35,
+ 0x42,0xfe,
+ 0xd1,0x28, //34 cyrille
+ 0xd2,0x26, //34 cyrille
+ 0xd3,0x40,// 3b cyrille
+ 0xd5,0x00,//0c cyrille
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-jmt781.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-jmt781.h
new file mode 100755
index 00000000..0dbf462f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-jmt781.h
@@ -0,0 +1,496 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x60,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x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x19,
+ 0xb6, 0x24,
+ 0xba, 0x3a,
+ 0xbb, 0x24,
+ 0xbc, 0x2a,
+ 0xc0, 0x17,
+ 0xc1, 0x13,
+ 0xc2, 0x17,
+ 0xc6, 0x21,
+ 0xc7, 0x1c,
+ 0xc8, 0x1c,
+ 0xb7, 0x00,
+ 0xb8, 0x00,
+ 0xb9, 0x00,
+ 0xbd, 0x00,
+ 0xbe, 0x00,
+ 0xbf, 0x00,
+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xfe, 0x00,
+
+ 0xfe,0x01,
+ 0x18,0x22,
+ 0x21,0xc0,
+ 0x06,0x12,
+ 0x08,0x9c,
+ 0x51,0x28,
+ 0x52,0x10,
+ 0x53,0x20,
+ 0x54,0x40,
+ 0x55,0x16,
+ 0x56,0x30,
+ 0x58,0x60,
+ 0x59,0x08,
+ 0x5c,0x35,
+ 0x5d,0x72,
+ 0x67,0x80,
+ 0x68,0x60,
+ 0x69,0x90,
+ 0x6c,0x30,
+ 0x6d,0x60,
+ 0x70,0x10,
+ 0xfe,0x00,
+ 0x9c,0x0a,
+ 0xa0,0xaf,
+ 0xa2,0xff,
+ 0xa4,0x60,
+ 0xa5,0x31,
+ 0xa7,0x35,
+ 0x42,0xfe,
+ 0xd1,0x34,
+ 0xd2,0x34,
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-kyt-174-v7.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-kyt-174-v7.h
new file mode 100755
index 00000000..dfa6527f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-kyt-174-v7.h
@@ -0,0 +1,992 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+// 0x77, 0x57,
+// 0x78, 0x4d,
+// 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x75,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00,
+ 0xfe, 0x01,
+ 0x13, 0x96,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x98,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x9c,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+#if 1
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+
+//20131009 50hz anti fliker
+ 0xfa, 0x11, //0x00 clk_div
+ 0x05, 0x01,
+ 0x06, 0x32,
+ 0x07, 0x00,
+ 0x08, 0x70,
+
+ 0xfe, 0x01,
+ 0x29, 0x00, //anti-flicker step [11:8]
+ 0x2a, 0x3c, //anti-flicker step [7:0]
+
+ 0x2b, 0x02, //exp level 0 14.28fps
+ 0x2c, 0x58,
+ 0x2d, 0x02, //exp level 1 12.50fps
+ 0x2e, 0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x2e, 0xd0,
+ 0x2f, 0x03, //exp level 2 10.00fps
+ 0x30, 0x48,
+ 0x31, 0x04, //exp level 3 7.14fps
+ 0x32, 0x38,
+ 0x33, 0x20,
+ 0xfe, 0x00,
+#else //24M clk
+ 0x05, 0x02,
+ 0x06, 0x2c,
+ 0x07, 0x00,
+ 0x08, 0xb8,
+
+ 0xfe, 0x01,
+ 0x29, 0x00, //anti-flicker step [11:8]
+ 0x2a, 0x60, //anti-flicker step [7:0]
+
+ 0x2b, 0x02, //exp level 0 14.28fps
+ 0x2c, 0xa0,
+ 0x2d, 0x03, //exp level 1 12.50fps
+ 0x2e, 0x00,
+ 0x2f, 0x03, //exp level 2 10.00fps
+ 0x30, 0xc0,
+ 0x31, 0x05, //exp level 3 7.14fps
+ 0x32, 0x40,
+ 0x33, 0x20,
+ 0xfe, 0x00,
+#endif
+ ////////////////////analog////////////////////
+ 0x0a, 0x02,
+ 0x0c, 0x02,
+ 0x17, 0x14,
+ 0x19, 0x05,
+ 0x1b, 0x24,
+ 0x1c, 0x04,
+ 0x1e, 0x08,
+ 0x1f, 0xc8, // c0 20120720
+ 0x20, 0x00,
+ 0x21, 0x48,
+ 0x22, 0xba,
+ 0x23, 0x22,
+ 0x24, 0x16,
+
+ ////////////////////blk////////////////////
+ 0x26,0xf7,
+ 0x28,0x7f,// 20130819 lanking
+ 0x29,0x80,
+ 0x32,0x04,
+ 0x33,0x20,
+ 0x34,0x20,
+ 0x35,0x20,
+ 0x36,0x20,
+
+ ////////////////////ISP BLOCK ENABL////////////////////
+ 0x40, 0xff,
+ 0x41, 0x44,
+ 0x42, 0x7e,
+ 0x44, 0xa2, ///yuv order
+ 0x46, 0x03, // vsync
+ 0x4b, 0xca,
+ 0x4d, 0x01,
+ 0x4f, 0x01,
+ 0x70, 0x48,
+
+ //0xb0,0x00,
+ //0xbc,0x00,
+ //0xbd,0x00,
+ //0xbe,0x00,
+ ////////////////////DNDD////////////////////
+ 0x80, 0xe7,
+ 0x82, 0x55,
+ 0x83, 0x03,
+ 0x87, 0x4a,
+
+ ////////////////////INTPEE////////////////////
+ 0x95,0x45,
+
+ ////////////////////ASDE////////////////////
+ //0xfe,0x01,
+ //0x18,0x22,
+ //0xfe,0x00,
+ //0x9c,0x0a,
+ //0xa0,0xaf,
+ //0xa2,0xff,
+ //0xa4,0x50,
+ //0xa5,0x21,
+ //0xa7,0x35,
+
+ ////////////////////RGB gamma////////////////////
+ //RGB gamma m4'
+ 0xbf, 0x06,
+ 0xc0, 0x14,
+ 0xc1, 0x27,
+ 0xc2, 0x3b,
+ 0xc3, 0x4f,
+ 0xc4, 0x62,
+ 0xc5, 0x72,
+ 0xc6, 0x8d,
+ 0xc7, 0xa4,
+ 0xc8, 0xb8,
+ 0xc9, 0xc9,
+ 0xcA, 0xd6,
+ 0xcB, 0xe0,
+ 0xcC, 0xe8,
+ 0xcD, 0xf4,
+ 0xcE, 0xFc,
+ 0xcF, 0xFF,
+#if 0
+ case GC0329_RGB_Gamma_m1: //smallest gamma curve
+ 0xfe, 0x00,
+ 0xbf, 0x06,
+ 0xc0, 0x12,
+ 0xc1, 0x22,
+ 0xc2, 0x35,
+ 0xc3, 0x4b,
+ 0xc4, 0x5f,
+ 0xc5, 0x72,
+ 0xc6, 0x8d,
+ 0xc7, 0xa4,
+ 0xc8, 0xb8,
+ 0xc9, 0xc8,
+ 0xca, 0xd4,
+ 0xcb, 0xde,
+ 0xcc, 0xe6,
+ 0xcd, 0xf1,
+ 0xce, 0xf8,
+ 0xcf, 0xfd,
+
+ case GC0329_RGB_Gamma_m2:
+ 0xBF, 0x08,
+ 0xc0, 0x0F,
+ 0xc1, 0x21,
+ 0xc2, 0x32,
+ 0xc3, 0x43,
+ 0xc4, 0x50,
+ 0xc5, 0x5E,
+ 0xc6, 0x78,
+ 0xc7, 0x90,
+ 0xc8, 0xA6,
+ 0xc9, 0xB9,
+ 0xcA, 0xC9,
+ 0xcB, 0xD6,
+ 0xcC, 0xE0,
+ 0xcD, 0xEE,
+ 0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+ 0xc9, 0xE1,
+ 0xcA, 0xEA,
+ 0xcB, 0xF1,
+ 0xcC, 0xF5,
+ 0xcD, 0xFB,
+ 0xcE, 0xFE,
+ 0xcF, 0xFF,
+
+ case GC0329_RGB_Gamma_night: //Gamma for night mode
+ 0xBF, 0x0B,
+ 0xc0, 0x16,
+ 0xc1, 0x29,
+ 0xc2, 0x3C,
+ 0xc3, 0x4F,
+ 0xc4, 0x5F,
+ 0xc5, 0x6F,
+ 0xc6, 0x8A,
+ 0xc7, 0x9F,
+ 0xc8, 0xB4,
+ 0xc9, 0xC6,
+ 0xcA, 0xD3,
+ 0xcB, 0xDD,
+ 0xcC, 0xE5,
+ 0xcD, 0xF1,
+ 0xcE, 0xFA,
+ 0xcF, 0xFF,
+
+ //GC0329_RGB_Gamma_m1 default
+ 0xfe, 0x00,
+ 0xbf, 0x06,
+ 0xc0, 0x12,
+ 0xc1, 0x22,
+ 0xc2, 0x35,
+ 0xc3, 0x4b,
+ 0xc4, 0x5f,
+ 0xc5, 0x72,
+ 0xc6, 0x8d,
+ 0xc7, 0xa4,
+ 0xc8, 0xb8,
+ 0xc9, 0xc8,
+ 0xca, 0xd4,
+ 0xcb, 0xde,
+ 0xcc, 0xe6,
+ 0xcd, 0xf1,
+ 0xce, 0xf8,
+ 0xcf, 0xfd,
+#endif
+
+ //////////////////CC///////////////////
+ 0xfe,0x00,
+
+ 0xb3,0x44,
+ 0xb4,0xfd,
+ 0xb5,0x02,
+ 0xb6,0xfa,
+ 0xb7,0x48,
+ 0xb8,0xf0,
+
+ // crop
+ 0x50,0x01,
+
+ ////////////////////YCP////////////////////
+ 0xfe,0x00,
+ 0xd1,0x38,
+ 0xd2,0x38,
+ 0xd5, 0x00, /// luma_offset
+ 0xdd,0x54,
+
+ ////////////////////AEC////////////////////
+ 0xfe,0x01,
+ 0x10,0x40,
+ 0x11,0x21,
+ 0x12,0x07,
+ 0x13,0x50,
+ 0x17,0x88,
+ 0x21,0xb0,
+ 0x22,0x48,
+ 0x3c,0x95,
+ 0x3d,0x50,
+ 0x3e,0x48,
+
+ ////////////////////AWB////////////////////
+ 0xfe,0x01,
+ 0x06,0x16,
+ 0x07,0x06,
+ 0x08,0x98,
+ 0x09,0xee,
+ 0x50,0xfc,
+ 0x51,0x20,
+ 0x52,0x0b,
+ 0x53,0x20,
+ 0x54,0x40,
+ 0x55,0x10,
+ 0x56,0x20,
+ //0x57,0x40,
+ 0x58,0xa0,
+ 0x59,0x28,
+ 0x5a,0x02,
+ 0x5b,0x63,
+ 0x5c,0x34,
+ 0x5d,0x73,
+ 0x5e,0x11,
+ 0x5f,0x40,
+ 0x60,0x40,
+ 0x61,0xc8,
+ 0x62,0xa0,
+ 0x63,0x40,
+ 0x64,0x50,
+ 0x65,0x98,
+ 0x66,0xfa,
+ 0x67,0x70,
+ 0x68,0x58,
+ 0x69,0x85,
+ 0x6a,0x40,
+ 0x6b,0x39,
+ 0x6c,0x18,
+ 0x6d,0x28,
+ 0x6e,0x41,
+ 0x70,0x02,
+ 0x71,0x00,
+ 0x72,0x10,
+ 0x73,0x40,
+
+ //0x74,0x32,
+ //0x75,0x40,
+ //0x76,0x30,
+ //0x77,0x48,
+ //0x7a,0x50,
+ //0x7b,0x20,
+
+ 0x80,0x60,
+ 0x81,0x50,
+ 0x82,0x42,
+ 0x83,0x40,
+ 0x84,0x40,
+ 0x85,0x40,
+
+ 0x74,0x40,
+ 0x75,0x58,
+ 0x76,0x24,
+ 0x77,0x40,
+ 0x78,0x20,
+ 0x79,0x60,
+ 0x7a,0x58,
+ 0x7b,0x20,
+ 0x7c,0x30,
+ 0x7d,0x35,
+ 0x7e,0x10,
+ 0x7f,0x08,
+
+ ////////////////////ABS////////////////////
+ 0x9c,0x02,
+ 0x9d,0x20,
+ //0x9f,0x40,
+
+ ////////////////////CC-AWB////////////////////
+ 0xd0,0x00,
+ 0xd2,0x2c,
+ 0xd3,0x80,
+
+ ////////////////////LSC///////////////////
+ 0xfe,0x01,
+ 0xa0,0x00,
+ 0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+#endif
+
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-zh1426.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-zh1426.h
new file mode 100755
index 00000000..37dd3384
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329-zh1426.h
@@ -0,0 +1,530 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x04, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x6a,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+
+ 0xfa, 0x11,
+
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+ 0x73, 0x90,
+ 0x74, 0x80,
+ 0x75, 0x80,
+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
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.c b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.c
new file mode 100755
index 00000000..f0c0ff58
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.c
@@ -0,0 +1,345 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc0329.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+struct sensor_flip{
+ int h_flip;
+ int v_flip;
+}gc0329_flip;
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ //CMOS_WIN_SIZE("QVGA", 320, 240, gc0329_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc0329_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc0329_wb_auto;
+ size = ARRAY_SIZE(gc0329_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc0329_wb_incandescent;
+ size = ARRAY_SIZE(gc0329_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc0329_wb_daylight;
+ size = ARRAY_SIZE(gc0329_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc0329_wb_cloudy;
+ size = ARRAY_SIZE(gc0329_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc0329_wb_fluorescent;
+ size = ARRAY_SIZE(gc0329_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc0329_scene_mode_auto;
+ size = ARRAY_SIZE(gc0329_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc0329_scene_mode_night;
+ size = ARRAY_SIZE(gc0329_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc0329_exposure_neg6;
+ size = ARRAY_SIZE(gc0329_exposure_neg6);
+ break;
+ case -1:
+ regs = gc0329_exposure_neg3;
+ size = ARRAY_SIZE(gc0329_exposure_neg3);
+ break;
+ case 0:
+ regs = gc0329_exposure_zero;
+ size = ARRAY_SIZE(gc0329_exposure_zero);
+ break;
+ case 1:
+ regs = gc0329_exposure_pos3;
+ size = ARRAY_SIZE(gc0329_exposure_pos3);
+ break;
+ case 2:
+ regs = gc0329_exposure_pos6;
+ size = ARRAY_SIZE(gc0329_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ //data = sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ gc0329_flip.h_flip = 0x00;
+ data= (0x14&~0x01);
+ break;
+ case 1:
+ gc0329_flip.h_flip =0x01;
+ data = (0x14|0x01);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ data|=gc0329_flip.v_flip;
+ sensor_write(sd, 0x17, data);
+ msleep(150);
+
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+
+ //data = sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ gc0329_flip.v_flip = 0x00;
+ data = (0x14&~0x02);
+ break;
+ case 1:
+ gc0329_flip.v_flip = 0x02;
+ data = (0x14|0x02);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ data|=gc0329_flip.h_flip;
+ sensor_write(sd, 0x17, data);
+ msleep(150);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ msleep(300);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ sensor_write(sd, 0xfc, 0x16);
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ gc0329_flip.h_flip=0;
+ gc0329_flip.v_flip=0;
+ sensor_write_array(sd, gc0329_default_regs_init,
+ ARRAY_SIZE(gc0329_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc0329_default_regs_exit,
+ ARRAY_SIZE(gc0329_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc0329_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc0329 = {
+ .name = "gc0329",
+ .i2c_addr = 0x31,
+ .id = 0xc0,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &gc0329_ops,
+};
+
+#if 0
+static int __init gc0329_init(void)
+{
+ return cmos_register_sudbdev(&gc0329);
+}
+
+static void __exit gc0329_exit(void)
+{
+ return cmos_unregister_subdev(&gc0329);
+}
+
+module_init(gc0329_init);
+module_exit(gc0329_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.h
new file mode 100755
index 00000000..9cd67ac5
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329.h
@@ -0,0 +1,530 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x04, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x6a,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+
+ 0xfa, 0x00,
+
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+ 0x73, 0x90,
+ 0x74, 0x80,
+ 0x75, 0x80,
+ 0x76, 0x94,
+ 0xfc, 0x16,
+
+ 0x05, 0x01,
+ 0x06, 0xfa,
+ 0x07, 0x00,
+ 0x08, 0x70,
+ 0xfe, 0x01,
+ 0x29, 0x00,
+ 0x2a, 0x64,
+ 0x2b, 0x02,
+ 0x2c, 0x58,
+ 0x2d, 0x04,
+
+ 0x2e, 0xb0,
+ 0x2f, 0x06,
+ 0x30, 0x40,
+ 0x31, 0x09,
+ 0x32, 0xc4,
+ 0x33, 0x20,
+ 0xfe, 0x00,
+
+
+
+
+
+ 0x0a, 0x00,
+ 0x0c, 0x00,
+ 0x17, 0x14,
+ 0x19, 0x05,
+ 0x1b, 0x24,
+ 0x1c, 0x04,
+ 0x1e, 0x00,
+ 0x1f, 0xc8,
+ 0x20, 0x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+ 0xc3, 0x00,
+ 0xc4, 0x00,
+ 0xc5, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x00,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x00,
+ 0xa7, 0x00,
+ 0xfe, 0x00,
+
+ 0xfe,0x01,
+ 0x18,0x22,
+ 0x21,0xc0,
+ 0x06,0x12,
+ 0x08,0x9c,
+ 0x51,0x28,
+ 0x52,0x10,
+ 0x53,0x20,
+ 0x54,0x40,
+ 0x55,0x16,
+ 0x56,0x30,
+ 0x58,0x60,
+ 0x59,0x08,
+ 0x5c,0x35,
+ 0x5d,0x72,
+ 0x67,0x80,
+ 0x68,0x60,
+ 0x69,0x90,
+ 0x6c,0x30,
+ 0x6d,0x60,
+ 0x70,0x10,
+ 0xfe,0x00,
+ 0x9c,0x0a,
+ 0xa0,0xaf,
+ 0xa2,0xff,
+ 0xa4,0x60,
+ 0xa5,0x31,
+ 0xa7,0x35,
+ 0x42,0xfe,
+ 0xd1,0x34,
+ 0xd2,0x34,
+ 0xd3,0x3b,
+ 0xd5,0x0c,
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_shuttle.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_shuttle.h
new file mode 100644
index 00000000..6d847ff1
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_shuttle.h
@@ -0,0 +1,560 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x00, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x56,//6a cyrille
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe, 0x80,
+ 0xfc, 0x12,
+ 0xfc, 0x12,
+ 0xfe, 0x00,
+
+ 0xfa, 0x11,
+
+ 0xf0, 0x07,
+ 0xf1, 0x01,
+ 0x73, 0x90,
+ 0x74, 0x80,
+ 0x75, 0x80,
+ 0x76, 0x94,
+ 0xfc, 0x16,
+
+ 0x05, 0x01,
+ 0x06, 0x32,
+ 0x07, 0x00,
+ 0x08, 0x70,
+ 0xfe, 0x01,
+ 0x29, 0x00,
+ 0x2a, 0x3c,
+ /*
+ 0x2b, 0x02,
+ 0x2c, 0x58,
+ 0x2d, 0x02,
+
+ 0x2e, 0xd0,
+ 0x2f, 0x03,
+ 0x30, 0x48,
+ 0x31, 0x04,
+ 0x32, 0x38,*/
+ 0x2b, 0x02,
+ 0x2c, 0xd0,
+ 0x2d, 0x03,
+
+ 0x2e, 0x48,
+ 0x2f, 0x03,
+ 0x30, 0x84,
+ 0x31, 0x04,
+ 0x32, 0x38,
+ 0x33, 0x20,
+ 0xfe, 0x00,
+
+
+
+
+
+ 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e,
+ 0xd1,0x28, //34 cyrille
+ 0xd2,0x26, //34 cyrille
+ 0xd3,0x40,// 3b cyrille
+ 0xd5,0x00,//0c cyrille
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_style_s729.h b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_style_s729.h
new file mode 100755
index 00000000..06e42a1a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc0329/gc0329_style_s729.h
@@ -0,0 +1,530 @@
+#ifndef GC0329_H
+#define GC0329_H
+
+
+// Scene Mode
+uint8_t gc0329_scene_mode_auto[] = {
+};
+
+uint8_t gc0329_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc0329_wb_auto [] = {
+ 0xfe, 0x00,
+ 0x77, 0x57,
+ 0x78, 0x4d,
+ 0x79, 0x45,
+ 0x42, 0xfe, //AWB on
+};
+
+uint8_t gc0329_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x48,
+ 0x78, 0x40,
+ 0x79, 0x5c,
+
+};
+
+uint8_t gc0329_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x42,
+ 0x79, 0x50,
+
+};
+
+uint8_t gc0329_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x74,
+ 0x78, 0x52,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x8c,
+ 0x78, 0x50,
+ 0x79, 0x40,
+
+};
+
+uint8_t gc0329_wb_tungsten [] = {
+ 0xfe, 0x00,
+ 0x42, 0xfc,
+ 0x77, 0x40,
+ 0x78, 0x54,
+ 0x79, 0x70,
+
+};
+
+
+// Exposure
+uint8_t gc0329_exposure_neg6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xe0,
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_neg3[] = {
+ 0xfe, 0x00,
+ 0xd5, 0xf0,
+ 0xfe, 0x01,
+ 0x13, 0x48,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_zero[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x04, /// 00
+ 0xfe, 0x01,
+ 0x13, 0x6a,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos3[] = {
+
+ 0xfe, 0x00,
+ 0xd5, 0x10,
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc0329_exposure_pos6[] = {
+ 0xfe, 0x00,
+ 0xd5, 0x20,
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x00,
+
+};
+
+
+// Color Effect
+uint8_t gc0329_colorfx_none[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x00,
+};
+
+uint8_t gc0329_colorfx_bw[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x00,
+ 0xdb , 0x00,
+
+};
+
+uint8_t gc0329_colorfx_sepia[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xd0,
+ 0xdb , 0x28,
+
+};
+
+uint8_t gc0329_colorfx_negative[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x01,
+};
+
+uint8_t gc0329_colorfx_emboss[] = {
+};
+
+uint8_t gc0329_colorfx_sketch[] = {
+
+};
+
+uint8_t gc0329_colorfx_sky_blue[] = {
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0x50,
+ 0xdb , 0xe0,
+
+};
+
+uint8_t gc0329_colorfx_grass_green[] = {
+
+ 0xfe, 0x00,
+ 0x43 , 0x02,
+ 0xda , 0xc0,
+ 0xdb , 0xc0,
+
+};
+
+uint8_t gc0329_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc0329_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc0329_brightness_neg4[] = {
+};
+
+uint8_t gc0329_brightness_neg3[] = {
+};
+
+uint8_t gc0329_brightness_neg2[] = {
+};
+
+uint8_t gc0329_brightness_neg1[] = {
+};
+
+uint8_t gc0329_brightness_zero[] = {
+};
+
+uint8_t gc0329_brightness_pos1[] = {
+};
+
+uint8_t gc0329_brightness_pos2[] = {
+};
+
+uint8_t gc0329_brightness_pos3[] = {
+};
+
+uint8_t gc0329_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc0329_contrast_neg4[] = {
+};
+
+uint8_t gc0329_contrast_neg3[] = {
+};
+
+uint8_t gc0329_contrast_neg2[] = {
+};
+
+uint8_t gc0329_contrast_neg1[] = {
+};
+
+uint8_t gc0329_contrast_zero[] = {
+};
+
+uint8_t gc0329_contrast_pos1[] = {
+};
+
+uint8_t gc0329_contrast_pos2[] = {
+};
+
+uint8_t gc0329_contrast_pos3[] = {
+};
+
+uint8_t gc0329_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc0329_saturation_neg4[] = {
+};
+
+uint8_t gc0329_saturation_neg3[] = {
+};
+
+uint8_t gc0329_saturation_neg2[] = {
+};
+
+uint8_t gc0329_saturation_neg1[] = {
+};
+
+uint8_t gc0329_saturation_zero[] = {
+};
+
+uint8_t gc0329_saturation_pos1[] = {
+};
+
+uint8_t gc0329_saturation_pos2[] = {
+};
+
+uint8_t gc0329_saturation_pos3[] = {
+};
+
+uint8_t gc0329_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc0329_176x144[]={
+};
+
+uint8_t gc0329_320x240[]={
+ 0x59, 0x22,
+};
+
+uint8_t gc0329_640x480[]={
+ 0x59, 0x11,
+};
+
+
+// Initiliztion
+uint8_t gc0329_default_regs_init[] = {
+ 0xfe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xa7,0x35,
+ 0x42,0xfe,
+ 0xd1,0x34,
+ 0xd2,0x34,
+ 0xd3,0x3b,
+ 0xd5,0x0c,
+ 0xfe,0x00,
+
+ 0xa0, 0xaf,
+ 0xa2, 0xff,
+ 0x44, 0xa2,
+};
+
+uint8_t gc0329_default_regs_exit[] = {
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.c b/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.c
new file mode 100755
index 00000000..fb0d5351
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.c
@@ -0,0 +1,225 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc2015.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, gc2015_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc2015_640x480),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, gc2015_1600x1200),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ int data;
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x14, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ int data;
+
+ data = sensor_read(sd, 0x14);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x14, data);
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc2015_wb_auto;
+ size = ARRAY_SIZE(gc2015_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc2015_wb_incandescent;
+ size = ARRAY_SIZE(gc2015_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc2015_wb_daylight;
+ size = ARRAY_SIZE(gc2015_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc2015_wb_cloudy;
+ size = ARRAY_SIZE(gc2015_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc2015_wb_fluorescent;
+ size = ARRAY_SIZE(gc2015_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win)
+ return -EINVAL;
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (!sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc2015_default_regs_init,
+ ARRAY_SIZE(gc2015_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops gc2015_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+};
+
+struct cmos_subdev gc2015 = {
+ .name = "gc2015",
+ .i2c_addr = 0x30,
+ .id = 0x2005,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &gc2015_ops,
+};
+
+static int __init gc2015_init(void)
+{
+ return cmos_register_sudbdev(&gc2015);
+}
+
+static void __exit gc2015_exit(void)
+{
+ return cmos_unregister_subdev(&gc2015);
+}
+
+module_init(gc2015_init);
+module_exit(gc2015_exit);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.h b/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.h
new file mode 100755
index 00000000..78016867
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2015/gc2015.h
@@ -0,0 +1,601 @@
+#ifndef GC2015_H
+#define GC2015_H
+
+
+// Scene Mode
+uint8_t gc2015_scene_mode_auto[] = {
+};
+
+uint8_t gc2015_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t gc2015_wb_auto [] = {
+};
+
+uint8_t gc2015_wb_incandescent [] = {
+};
+
+uint8_t gc2015_wb_fluorescent [] = {
+};
+
+uint8_t gc2015_wb_daylight [] = {
+};
+
+uint8_t gc2015_wb_cloudy [] = {
+};
+
+uint8_t gc2015_wb_tungsten [] = {
+};
+
+
+// Exposure
+uint8_t gc2015_exposure_neg6[] = {
+};
+
+uint8_t gc2015_exposure_neg3[] = {
+};
+
+uint8_t gc2015_exposure_zero[] = {
+};
+
+uint8_t gc2015_exposure_pos3[] = {
+};
+
+uint8_t gc2015_exposure_pos6[] = {
+};
+
+
+// Color Effect
+uint8_t gc2015_colorfx_none[] = {
+};
+
+uint8_t gc2015_colorfx_bw[] = {
+};
+
+uint8_t gc2015_colorfx_sepia[] = {
+};
+
+uint8_t gc2015_colorfx_negative[] = {
+};
+
+uint8_t gc2015_colorfx_emboss[] = {
+};
+
+uint8_t gc2015_colorfx_sketch[] = {
+};
+
+uint8_t gc2015_colorfx_sky_blue[] = {
+};
+
+uint8_t gc2015_colorfx_grass_green[] = {
+};
+
+uint8_t gc2015_colorfx_skin_whiten[] = {
+};
+
+uint8_t gc2015_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t gc2015_brightness_neg4[] = {
+};
+
+uint8_t gc2015_brightness_neg3[] = {
+};
+
+uint8_t gc2015_brightness_neg2[] = {
+};
+
+uint8_t gc2015_brightness_neg1[] = {
+};
+
+uint8_t gc2015_brightness_zero[] = {
+};
+
+uint8_t gc2015_brightness_pos1[] = {
+};
+
+uint8_t gc2015_brightness_pos2[] = {
+};
+
+uint8_t gc2015_brightness_pos3[] = {
+};
+
+uint8_t gc2015_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t gc2015_contrast_neg4[] = {
+};
+
+uint8_t gc2015_contrast_neg3[] = {
+};
+
+uint8_t gc2015_contrast_neg2[] = {
+};
+
+uint8_t gc2015_contrast_neg1[] = {
+};
+
+uint8_t gc2015_contrast_zero[] = {
+};
+
+uint8_t gc2015_contrast_pos1[] = {
+};
+
+uint8_t gc2015_contrast_pos2[] = {
+};
+
+uint8_t gc2015_contrast_pos3[] = {
+};
+
+uint8_t gc2015_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t gc2015_saturation_neg4[] = {
+};
+
+uint8_t gc2015_saturation_neg3[] = {
+};
+
+uint8_t gc2015_saturation_neg2[] = {
+};
+
+uint8_t gc2015_saturation_neg1[] = {
+};
+
+uint8_t gc2015_saturation_zero[] = {
+};
+
+uint8_t gc2015_saturation_pos1[] = {
+};
+
+uint8_t gc2015_saturation_pos2[] = {
+};
+
+uint8_t gc2015_saturation_pos3[] = {
+};
+
+uint8_t gc2015_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t gc2015_176x144[]={
+};
+
+// QVGA
+uint8_t gc2015_320x240[]={
+0xfe, 0x80,
+0xfe, 0x80,
+0xfe, 0x80,
+0xfe, 0x00,
+0x45, 0x00,
+0x02, 0x01,
+0x2a, 0xca,
+0x48, 0x40,
+0x59, 0x11,
+0x50, 0x01,
+0x51, 0x00,
+0x52, 0x00,
+0x53, 0x00,
+0x54, 0x00,
+0x55, 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E, 0xFD,
+0xcF, 0xFF,
+0xCF, 0xFF,
+0xd1, 0x38,
+0xd2, 0x38,
+0xde, 0x21,
+0x98, 0x30,
+0x99, 0xf0,
+0x9b, 0x00,
+0xfe, 0x01,
+0x10, 0x45,
+0x11, 0x32,
+0x13, 0x60,
+0x17, 0x00,
+0x1c, 0x96,
+0x1e, 0x11,
+0x21, 0xc0,
+0x22, 0x40,
+0x2d, 0x06,
+0x2e, 0x00,
+0x1e, 0x32,
+0x33, 0x00,
+0x57, 0x40,
+0x5d, 0x44,
+0x5c, 0x35,
+0x5e, 0x29,
+0x5f, 0x50,
+0x60, 0x50,
+0x65, 0xc0,
+0x80, 0x82,
+0x81, 0x00,
+0x83, 0x00,
+0xfe, 0x00,
+0x45, 0x0f,
+0x46, 0x02,
+//0x46, 0x03,
+0x44, 0xa2,
+0xfe, 0x00,
+0xfe, 0x01,
+0x33, 0x20,
+0xfe, 0x00,
+0x43, 0x00,
+0x42, 0x74,
+0x7a, 0x5f,
+0x7b, 0x40,
+0x7c, 0x47,
+0x42, 0x76,
+0xfe, 0x01,
+0x13, 0x60,
+0xfe, 0x00,
+0xd5, 0x00,
+0x05, 0x01,
+0x06, 0xc1,
+0x07, 0x00,
+0x08, 0x40,
+0xfe, 0x01,
+0x29, 0x01,
+0x2a, 0x00,
+0x2b, 0x05,
+0x2c, 0x00,
+0x2d, 0x06,
+0x2e, 0x00,
+0x2f, 0x08,
+0x30, 0x00,
+0x31, 0x09,
+0x32, 0x00,
+0xfe, 0x00,
+0xfe, 0x01,
+0x33, 0x20,
+0xfe, 0x00,
+};
+
+// CIF
+uint8_t gc2015_352x288[]={
+};
+
+// VGA
+uint8_t gc2015_640x480[]={
+ 0xfe,0x00,
+ 0x02,0x01,
+ 0x2a,0xca,
+ 0x59,0x55,
+ 0x5a,0x06,
+ 0x5b,0x00,
+ 0x5c,0x00,
+ 0x5d,0x01,
+ 0x5e,0x23,
+ 0x5f,0x00,
+ 0x60,0x00,
+ 0x61,0x01,
+ 0x62,0x23,
+ 0x50,0x01,
+ 0x51,0x00,
+ 0x52,0x00,
+ 0x53,0x00,
+ 0x54,0x00,
+ 0x55,0x01,
+ 0x56,0xe0,
+ 0x57,0x02,
+ 0x58,0x80,
+ 0x48,0x68,
+ 0x4f,0x01,
+};
+
+// SVGA
+uint8_t gc2015_800x600[]={
+};
+
+// XGA
+uint8_t gc2015_1024x768[]={
+};
+
+// 720p
+uint8_t gc2015_1280x720[]={
+};
+
+// UXGA
+uint8_t gc2015_1600x1200[]={
+0x4f,0x00,
+0x42,0x74,
+0xfe,0x00,
+0x02,0x00,
+0x2a,0x0a,
+0x59,0x11,
+0x5a,0x06,
+0x5b,0x00,
+0x5c,0x00,
+0x5d,0x00,
+0x5e,0x00,
+0x5f,0x00,
+0x60,0x00,
+0x61,0x00,
+0x62,0x00,
+0x50,0x01,
+0x51,0x00,
+0x52,0x00,
+0x53,0x00,
+0x54,0x00,
+0x55,0x04,
+0x56,0xb0,
+0x57,0x06,
+0x58,0x40,
+0x48,0x60,
+0x0,0x0,
+0x12,0x1,
+0x13,0x2a,
+0x6e,0x1b,
+0x6f,0x20,
+0x70,0x1b,
+0x71,0x20,
+};
+
+
+// Initiliztion
+uint8_t gc2015_default_regs_init[] = {
+0xfe, 0x80,
+0xfe, 0x80,
+0xfe, 0x80,
+0xfe, 0x00,
+0x45, 0x00,
+0x02, 0x01,
+0x2a, 0xca,
+0x48, 0x40,
+0x59, 0x11,
+0x50, 0x01,
+0x51, 0x00,
+0x52, 0x00,
+0x53, 0x00,
+0x54, 0x00,
+0x55, 0x02,
+0x56, 0x58,
+0x57, 0x03,
+0x58, 0x20,
+0x59, 0x55,
+0x5b, 0x01,
+0x5c, 0x34,
+0x5d, 0x00,
+0x5e, 0x00,
+0x5f, 0x01,
+0x60, 0x34,
+0x61, 0x00,
+0x62, 0x00,
+0xfe, 0x01,
+0xb0, 0x13,
+0xb1, 0x20,
+0xb2, 0x20,
+0xb3, 0x20,
+0xb4, 0x20,
+0xb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0x06,
+0x2e, 0x00,
+0x1e, 0x32,
+0x33, 0x00,
+0x57, 0x40,
+0x5d, 0x44,
+0x5c, 0x35,
+0x5e, 0x29,
+0x5f, 0x50,
+0x60, 0x50,
+0x65, 0xc0,
+0x80, 0x82,
+0x81, 0x00,
+0x83, 0x00,
+0xfe, 0x00,
+0x45, 0x0f,
+0x46, 0x02,
+//0x46, 0x03,
+0x44, 0xa2,
+0xfe, 0x00,
+0xfe, 0x01,
+0x33, 0x20,
+0xfe, 0x00,
+0x43, 0x00,
+0x42, 0x74,
+0x7a, 0x5f,
+0x7b, 0x40,
+0x7c, 0x47,
+0x42, 0x76,
+0xfe, 0x01,
+0x13, 0x70,//60
+0xfe, 0x00,
+0xd5, 0x00,
+0x05, 0x01,
+0x06, 0xc1,
+0x07, 0x00,
+0x08, 0x40,
+0xfe, 0x01,
+0x29, 0x01,
+0x2a, 0x00,
+0x2b, 0x05,
+0x2c, 0x00,
+0x2d, 0x06,
+0x2e, 0x00,
+0x2f, 0x08,
+0x30, 0x00,
+0x31, 0x09,
+0x32, 0x00,
+0xfe, 0x00,
+0xfe, 0x01,
+0x33, 0x20,
+0xfe, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-3nod.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-3nod.h
new file mode 100755
index 00000000..b8057c96
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-3nod.h
@@ -0,0 +1,1024 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x75,//78 cyrille
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+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00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x75,//y_target 84
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
+ 0xc4,0x21,
+ 0xc8,0x19,
+ 0xc9,0x12,
+ 0xca,0x0e,
+ 0xbc,0x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+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x38,//saturation_cb//34 cyrille
+ 0xd2,0x38,//saturation_Cr//34 cyrille
+ 0xd3,0x40,//contrast ?
+ 0xd4,0x80,//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1f,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x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,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-781a.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-781a.h
new file mode 100755
index 00000000..c6fbc88f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-781a.h
@@ -0,0 +1,1027 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0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+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x05,//level1
+ 0x2a,0xdc,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0x59,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
+ 0xc4,0x21,
+ 0xc8,0x19,
+ 0xc9,0x12,
+ 0xca,0x0e,
+ 0xbc,0x43,
+ 0xbd,0x18,
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00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x34,//saturation_cb
+ 0xd2,0x34,//saturation_Cr
+ 0xd3,0x3e,//contrast ? {{0xd4},{0x80}},//contrast center //40 ary
+ 0xd5,0xf6,//luma_offset //f8 ary
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1f,//dn_b_base//1c ary
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//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ae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-8335c.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-8335c.h
new file mode 100755
index 00000000..8fe749eb
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-8335c.h
@@ -0,0 +1,899 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+#define GC2035_I2C_ADDR 0x3c
+
+#define gc2035_read_reg(r) wmt_vid_i2c_read(GC2035_I2C_ADDR, r)
+
+#define gc2035_write_reg(r, d) wmt_vid_i2c_write(GC2035_I2C_ADDR, r, d)
+
+#define gc2035_write_array(a) \
+do { \
+ cmos_init_8bit_addr(a, ARRAY_SIZE(a), GC2035_I2C_ADDR); \
+} while (0)
+
+
+// Scene Mode
+unsigned char gc2035_scene_mode_auto[] = {
+0xfe,0x01,
+0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+0xfe,0x00,
+};
+
+unsigned char gc2035_scene_mode_night[] = {
+0xfe, 0x01,
+0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+0xfe, 0x00,
+};
+
+
+// White Balance
+unsigned char gc2035_wb_auto [] = {
+0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+0x82, 0xfe,
+};
+
+unsigned char gc2035_wb_incandescent [] = {
+0xfe, 0x00,
+0x82, 0xfc,
+0xb3, 0x50,
+0xb4, 0x40,
+0xb5, 0xa8,
+};
+
+unsigned char gc2035_wb_fluorescent [] = {
+0xfe, 0x00,
+0x82, 0xfc,
+0xb3, 0xa0,
+0xb4, 0x45,
+0xb5, 0x40,
+};
+
+unsigned char gc2035_wb_daylight [] = {
+0xfe, 0x00,
+0x82, 0xfc,
+0xb3, 0x78,
+0xb4, 0x40,
+0xb5, 0x50,
+};
+
+unsigned char gc2035_wb_cloudy [] = {
+0xfe, 0x00,
+0x82, 0xfc,
+0xb3, 0x58,
+0xb4, 0x40,
+0xb5, 0x50,
+};
+
+
+// Exposure
+unsigned char gc2035_exposure_neg6[] = {
+0xfe, 0x01,
+0x13, 0x68,
+0xfe, 0x02,
+0xd5, 0xe0,
+0xfe, 0x00,
+};
+
+unsigned char gc2035_exposure_neg3[] = {
+0xfe, 0x01,
+0x13, 0x70,
+0xfe, 0x02,
+0xd5, 0xf0,
+0xfe, 0x00,
+};
+
+unsigned char gc2035_exposure_zero[] = {
+0xfe, 0x01,
+0x13, 0x78,
+0xfe, 0x02,
+0xd5, 0x00,
+0xfe, 0x00,
+};
+
+unsigned char gc2035_exposure_pos3[] = {
+0xfe, 0x01,
+0x13, 0x80,
+0xfe, 0x02,
+0xd5, 0x10,
+0xfe, 0x00,
+};
+
+unsigned char gc2035_exposure_pos6[] = {
+0xfe, 0x01,
+0x13, 0x88,
+0xfe, 0x02,
+0xd5, 0x20,
+0xfe, 0x00,
+};
+
+
+// Resolution
+unsigned char gc2035_1600x1200_key[]={
+0xfe,0x00,
+0x0c,0x02,
+
+0x0d,0x04,
+0x0e,0xc0,
+0x0f,0x06,
+0x10,0x58,
+
+0x90,0x01,
+0x99,0x11,
+0x95,0x04,
+0x96,0xb0,
+0x97,0x06,
+0x98,0x40,
+0x99,0x11,
+
+0xc8,0x00,
+0xfa,0x11,
+0xfe,0x03,
+0x42,0x80,
+0x43,0x06,
+0x41,0x00,
+0x40,0x00,
+0x17,0x01,
+0xfe,0x00,
+0xc8,0x00,
+};
+
+unsigned char gc2035_640x480_key[]={
+0xfe,0x00,
+0x0c,0x00,
+0x0d,0x04,
+0x0e,0xc0,
+0x0f,0x06,
+0x10,0x58,
+
+0x90,0x01,
+0x99,0x11,
+0x95,0x01,
+0x96,0xe0,
+0x97,0x02,
+0x98,0x80,
+0xc8,0x15,
+0xfa,0x00,
+0xfe,0x03,
+0x42,0x00,
+0x43,0x05,
+0x41,0x02,
+0x40,0x40,
+0x17,0x00,
+0xfe,0x00,
+0xc8,0x55,
+0xb6,0x03,
+};
+
+unsigned char gc2035_640x480[]={
+0xfe,0x80,
+0xfe,0x80,
+0xfe,0x80,
+0xfc,0x06,
+0xf9,0xfe,
+0xfa,0x00,
+0xf6,0x00,
+0xf7,0x17,
+0xf8,0x00,
+0xfe,0x00,
+0x82,0x00,
+0xb3,0x60,
+0xb4,0x40,
+0xb5,0x60,
+0x03,0x05,
+0x04,0x08,
+0xfe,0x00,
+0xec,0x04,
+0xed,0x04,
+0xee,0x60,
+0xef,0x90,
+0x0c,0x00,
+0x0d,0x04,
+0x0e,0xc0,
+0x0f,0x06,
+0x10,0x58,
+0x17,0x14,
+0x18,0x0a,
+0x19,0x0a,
+0x1a,0x01,
+0x1b,0x8b,
+0x1c,0x05,
+0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+0x1f,0x08, //[3] tx-low en//
+0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+0x21,0x0f, //[6:4]rsg
+0x22,0xd0, //[3:0]vref
+0x23,0xc3, //f3//ADC_r
+0x24,0x17, //pad drive 16
+
+ //AEC
+0xfe,0x01,
+0x11,0x20,//AEC_out_slope,0x
+0x1f,0xc0,//max_post_gain
+0x20,0x60,//max_pre_gain
+0x47,0x30,//AEC_outdoor_th
+0x0b,0x10,//
+0x13,0x75,//y_target
+0xfe,0x00,
+
+
+0x05,0x01,//hb
+0x06,0x11,
+0x07,0x00,//vb
+0x08,0x50,
+0xfe,0x01,
+0x27,0x00,//step
+0x28,0xa0,
+0x29,0x05,//level1
+0x2a,0x00,
+0x2b,0x05,//level2
+0x2c,0x00,
+0x2d,0x06,//6e8//level3
+0x2e,0xe0,
+0x2f,0x0b,//level4
+0x30,0x40,
+0x3e,0x40,
+0xfe,0x00,
+0xb6,0x03,
+0xfe,0x00,
+0x3f,0x00,
+0x40,0x77,
+0x42,0x7f,
+0x43,0x30,
+0x5c,0x08,
+0x5e,0x20,
+0x5f,0x20,
+0x60,0x20,
+0x61,0x20,
+0x62,0x20,
+0x63,0x20,
+0x64,0x20,
+0x65,0x20,
+0x66,0x20,
+0x67,0x20,
+0x68,0x20,
+0x69,0x20,
+0x90,0x01,
+0x95,0x04,
+0x96,0xb0,
+0x97,0x06,
+0x98,0x40,
+0xfe,0x03,
+0x42,0x80,
+0x43,0x06,
+0x41,0x00,
+0x40,0x00,
+0x17,0x01,
+0xfe,0x00,
+0x80,0xff,
+0x81,0x26,
+0x03,0x05,
+0x04,0x2e,
+0x84,0x02,
+0x86,0x02,
+0x87,0x80,
+0x8b,0xbc,
+0xa7,0x80,
+0xa8,0x80,
+0xb0,0x80,
+0xc0,0x40,
+//LSC
+0xfe,0x01,
+0xc2,0x38,
+0xc3,0x25,
+0xc4,0x21,
+0xc8,0x19,
+0xc9,0x12,
+0xca,0x0e,
+0xbc,0x43,
+0xbd,0x18,
+0xbe,0x1b,
+0xb6,0x40,
+0xb7,0x2e,
+0xb8,0x26,
+0xc5,0x05,
+0xc6,0x03,
+0xc7,0x04,
+0xcb,0x00,
+0xcc,0x00,
+0xcd,0x00,
+0xbf,0x14,
+0xc0,0x22,
+0xc1,0x1b,
+0xb9,0x00,
+0xba,0x05,
+0xbb,0x05,
+0xaa,0x35,
+0xab,0x33,
+0xac,0x33,
+0xad,0x25,
+0xae,0x22,
+0xaf,0x27,
+0xb0,0x1d,
+0xb1,0x20,
+0xb2,0x22,
+0xb3,0x14,
+0xb4,0x15,
+0xb5,0x16,
+0xd0,0x00,
+0xd2,0x07,
+0xd3,0x08,
+0xd8,0x00,
+0xda,0x13,
+0xdb,0x17,
+0xdc,0x00,
+0xde,0x0a,
+0xdf,0x08,
+0xd4,0x00,
+0xd6,0x00,
+0xd7,0x0c,
+0xa4,0x00,
+0xa5,0x00,
+0xa6,0x00,
+0xa7,0x00,
+0xa8,0x00,
+0xa9,0x00,
+0xa1,0x80,
+0xa2,0x80,
+
+ //=================================cc
+0xfe,0x02,
+0xc0,0x01,
+0xc1,0x40, //Green_cc for d
+0xc2,0xfc,
+0xc3,0x05,
+0xc4,0xec,
+0xc5,0x42,
+0xc6,0xf8,
+0xc7,0x40,//for cwf
+0xc8,0xf8,
+0xc9,0x06,
+0xca,0xfd,
+0xcb,0x3e,
+0xcc,0xf3,
+0xcd,0x36,//for A
+0xce,0xf6,
+0xcf,0x04,
+0xe3,0x0c,
+0xe4,0x44,
+0xe5,0xe5,
+0xfe,0x00,
+
+//==============================awb
+ //AWB clear
+0xfe,0x01,
+0x4f,0x00,
+0x4d,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x10, // 10
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x20, // 20
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x30,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00, // 30
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x40, // 40
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x50, // 50
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x60, // 60
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x70, // 70
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x80, // 80
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0x90, // 90
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0xa0, // a0
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0xb0, // b0
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0xc0, // c0
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4d,0xd0, // d0
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4e,0x00,
+0x4f,0x01,
+ /////// awb value////////
+0xfe,0x01,
+0x4f,0x00,
+0x4d,0x30,
+0x4e,0x00,
+0x4e,0x80,
+0x4e,0x80,
+0x4e,0x02,
+0x4e,0x02,
+0x4d,0x40,
+0x4e,0x00,
+0x4e,0x80,
+0x4e,0x80,
+0x4e,0x02,
+0x4e,0x02,
+0x4e,0x02,
+0x4d,0x53,
+0x4e,0x08,
+0x4e,0x04,
+0x4d,0x62,
+0x4e,0x10,
+0x4d,0x72,
+0x4e,0x20,
+0x4f,0x01,
+
+/////awb////
+0xfe,0x01,
+0x50,0x88,//c0//[6]green mode
+0x52,0x40,
+0x54,0x60,
+0x56,0x06,
+0x57,0x20, //pre adjust
+0x58,0x01,
+0x5b,0x02, //AWB_gain_delta
+0x61,0xaa,//R/G stand
+0x62,0xaa,//R/G stand
+0x71,0x00,
+0x74,0x10,//AWB_C_max
+0x77,0x08, // 0x//AWB_p2_x
+0x78,0xfd, //AWB_p2_y
+0x86,0x30,
+0x87,0x00,
+0x88,0x04,//06,[1]dark mode
+0x8a,0xc0,//awb move mode
+0x89,0x75,
+0x84,0x08,//auto_window
+0x8b,0x00, // 0x//awb compare luma
+0x8d,0x70, //awb gain limit R
+0x8e,0x70,//G
+0x8f,0xf4,//B
+0xfe,0x00,
+0x82,0x02,//awb_en
+
+0xfe,0x01,
+0x21,0xbf,
+0xfe,0x02,
+0xa4,0x00,//
+0xa5,0x40, //lsc_th
+0xa2,0xa0, //lsc_dec_slope
+0xa6,0x80, //dd_th
+0xa7,0x80, //ot_th
+0xab,0x31, //
+0xa9,0x6f, //
+0xb0,0x99, //0x//edge effect slope low
+0xb1,0x34,//edge effect slope low
+0xb3,0x80, //saturation dec slope
+0xde,0xb6, //
+0x38,0x0f, //
+0x39,0x60, //
+0xfe,0x00,
+0x81,0x26,
+0xfe,0x02,
+0x83,0x00,//
+0x84,0x45,//
+ ////////////YCP//////////
+0xd1,0x40,//saturation_cb
+0xd2,0x40,//saturation_Cr
+0xd3,0x40,//contrast ?
+0xd4,0x80,//contrast center
+0xd5,0x00,//luma_offset
+0xdc,0x30,
+0xdd,0xb8,
+0xfe,0x00,
+//gamma
+0xfe,0x02,
+0x88,0x15,//dn_b_base
+0x8c,0xf6, //[2]b_in_dark_inc
+0x89,0x03, //dn_c_weight
+ ////////EE ///////////
+0xfe,0x02,
+0x90,0x6c,// EEINTP mode1
+0x97,0x45,// edge effect
+ ////==============RGB Gamma
+0xfe,0x02,
+0x15,0x0a,
+0x16,0x12,
+0x17,0x19,
+0x18,0x1f,
+0x19,0x2c,
+0x1a,0x38,
+0x1b,0x42,
+0x1c,0x4e,
+0x1d,0x63,
+0x1e,0x76,
+0x1f,0x87,
+0x20,0x96,
+0x21,0xa2,
+0x22,0xb8,
+0x23,0xca,
+0x24,0xd8,
+0x25,0xe3,
+0x26,0xf0,
+0x27,0xf8,
+0x28,0xfd,
+0x29,0xff,
+
+ ///=================y gamma
+0xfe,0x02,
+0x2b,0x00,
+0x2c,0x04,
+0x2d,0x09,
+0x2e,0x18,
+0x2f,0x27,
+0x30,0x37,
+0x31,0x49,
+0x32,0x5c,
+0x33,0x7e,
+0x34,0xa0,
+0x35,0xc0,
+0x36,0xe0,
+0x37,0xff,
+0xfe,0x00,
+
+0xfe,0x00,
+0x82,0xfe,
+0xf2,0x70,
+0xf3,0xff,
+0xf4,0x00,
+0xf5,0x30,
+
+0xfe,0x00,
+0x90,0x01,
+0x95,0x01,
+0x96,0xe0,
+0x97,0x02,
+0x98,0x80,
+0xc8,0x14,
+0xf7,0x11,
+0xf8,0x85,
+0xfa,0x00,
+0x05,0x01,
+0x06,0x0a,
+0x07,0x00,
+0x08,0x58,
+0xfe,0x01,
+0x27,0x00,
+0x28,0xa1,
+0x29,0x05,
+0x2a,0x08,
+0x2b,0x05,
+0x2c,0x08,
+0x2d,0x06,
+0x2e,0xeb,
+0x3e,0x40,
+0xfe,0x03,
+0x42,0x04,
+0x43,0x05,
+0x41,0x02,
+0x40,0x40,
+0x17,0x00,
+0xfe,0x00,
+0xc8,0x55,
+};
+
+unsigned char gc2035_1280x720[]={
+0xfe,0x00,
+0x0a,0xf0,
+0x0c,0xa0,
+0x0d,0x02,
+0x0e,0xd8,
+0x0f,0x05,
+0x10,0x18,
+0xfe,0x00,
+0xec,0x04,
+0xed,0x04,
+0xee,0x50,
+0xef,0x58,
+0x05,0x01,
+0x06,0xaa,
+0x07,0x00,
+0x08,0xf6,
+0xfe,0x01,
+0x27,0x00,
+0x28,0xa1,
+0x29,0x03,
+0x2a,0xc6,
+0x2b,0x04,
+0x2c,0x67,
+0x2d,0x06,
+0x2e,0x4a,
+0x2f,0x07,
+0x30,0x8c,
+0x3e,0x40,
+0xfe,0x00,
+0xb6,0x03,
+0xec,0x04,
+0xed,0x04,
+0xee,0x50,
+0xef,0x58,
+0x99,0x11,
+0x90,0x01,
+0x95,0x02,
+0x96,0xd0,
+0x97,0x05,
+0x98,0x00,
+0xfe,0x03,
+0x42,0x80,
+0x43,0x06,
+0x41,0x00,
+0x40,0x00,
+0x17,0x01,
+0xfe,0x00,
+0xc8,0x00,
+0xfa,0x11,
+};
+
+unsigned char gc2035_320x240[]={
+0xfe,0x00,
+
+
+0x99,0x22,
+0x9b,0x00,
+0x9f,0x00,
+
+
+0x90,0x01,
+
+0x95,0x00,
+0x96,0xf2,//600
+0x97,0x01,
+0x98,0x40,//800
+
+0xc8,0x15,
+0xf7,0x11,
+0xfe,0x03,
+0x42,0x80,
+0x43,0x02,
+0x41,0x02,
+0x40,0x40,
+0x17,0x00,
+0xfe,0x00,
+0xc8,0x54,
+};
+
+unsigned char gc2035_176x144[]={
+0xfe,0x00,
+
+
+0x99,0x33,
+0x9b,0x00,
+0x9f,0x00,
+0x90,0x01,
+
+
+
+0x95,0x00,
+0x96,0x92,//600
+0x97,0x00,
+0x98,0xb0,//800
+
+
+
+
+0xc8,0x15,
+0xf7,0x11,
+
+
+0xfe,0x03,
+0x42,0x60,
+0x43,0x01,
+0x41,0x02,
+0x40,0x40,
+0x17,0x00,
+0xfe,0x00,
+0xc8,0x54,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-forfun-v91.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-forfun-v91.h
new file mode 100755
index 00000000..42e399ad
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-forfun-v91.h
@@ -0,0 +1,1105 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 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96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc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x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x40,//saturation_cb//34 cyrille
+ 0xd2,0x40,//saturation_Cr//34 cyrille
+ 0xd3,0x44,//contrast ? //40 cyrille
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x67,// edge effect//45 cyrille
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-htr_t75v.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-htr_t75v.h
new file mode 100755
index 00000000..0a01437f
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-htr_t75v.h
@@ -0,0 +1,1040 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+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 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+ 0xf7,0x15,
+ 0xf8,0x85,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x85,//84
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+#if 0 // max fr: 10fps
+ 0x03,0x02,
+ 0x04,0x71,
+#endif
+#if 1 // max fr: 12.5fps
+ 0x03,0x02,
+ 0x04,0x80,
+#endif
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 1 // max fr: 12.5fps
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0x40,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+#if 0 // max fr: 10fps
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+#endif
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
+ 0xc4,0x21,
+ 0xc8,0x19,
+ 0xc9,0x12,
+ 0xca,0x0e,
+ 0xbc,0x43,
+ 0xbd,0x18,
+ 0xbe,0x1b,
+ 0xb6,0x40,
+ 0xb7,0x2e,
+ 0xb8,0x26,
+ 0xc5,0x05,
+ 0xc6,0x03,
+ 0xc7,0x04,
+ 0xcb,0x00,
+ 0xcc,0x00,
+ 0xcd,0x00,
+ 0xbf,0x14,
+ 0xc0,0x22,
+ 0xc1,0x1b,
+ 0xb9,0x00,
+ 0xba,0x05,
+ 0xbb,0x05,
+ 0xaa,0x35,
+ 0xab,0x33,
+ 0xac,0x33,
+ 0xad,0x25,
+ 0xae,0x22,
+ 0xaf,0x27,
+ 0xb0,0x1d,
+ 0xb1,0x20,
+ 0xb2,0x22,
+ 0xb3,0x14,
+ 0xb4,0x15,
+ 0xb5,0x16,
+ 0xd0,0x00,
+ 0xd2,0x07,
+ 0xd3,0x08,
+ 0xd8,0x00,
+ 0xda,0x13,
+ 0xdb,0x17,
+ 0xdc,0x00,
+ 0xde,0x0a,
+ 0xdf,0x08,
+ 0xd4,0x00,
+ 0xd6,0x00,
+ 0xd7,0x0c,
+ 0xa4,0x00,
+ 0xa5,0x00,
+ 0xa6,0x00,
+ 0xa7,0x00,
+ 0xa8,0x00,
+ 0xa9,0x00,
+ 0xa1,0x80,
+ 0xa2,0x80,
+
+ ////,/cc////////////
+ 0xfe,0x02,
+ 0xc0,0x01,
+ 0xc1,0x40, //Green_cc for d
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 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x34,//saturation_cb
+ 0xd2,0x34,//saturation_Cr
+ 0xd3,0x40,//contrast ? {{0xd4},{0x80}},//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-jmt781.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-jmt781.h
new file mode 100755
index 00000000..3a513bf1
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-jmt781.h
@@ -0,0 +1,954 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x60,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x8a,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x90,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,
+ 0x0a,0xf0,
+ 0x0c,0xa0,
+ 0x0d,0x02,
+ 0x0e,0xd8,
+ 0x0f,0x05,
+ 0x10,0x18,
+ 0xfe,0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
+ 0x90,0x01,
+ 0x95,0x02,
+ 0x96,0x58,
+ 0x97,0x03,
+ 0x98,0x20,
+};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf9,0xfe,
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x17,
+ 0xf8,0x00,
+ 0xfe,0x00,
+ 0x82,0x00,
+ //0xb3,0x60,//close manual WB 2013.0723
+ //0xb4,0x40,
+ //0xb5,0x60,
+ 0x03,0x05,
+ 0x04,0x08,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x60,
+ 0xef,0x90,
+ 0x0c,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+ 0x17,0x14,
+ 0x18,0x0a,
+ 0x19,0x0a,
+ 0x1a,0x01,
+ 0x1b,0x8b,
+ 0x1c,0x05,
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xd0, //[3:0]vref
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+ //AEC
+ 0xfe,0x01,
+ 0x0c,0x01,
+ 0x11,0x20,//AEC_out_slope,0x
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x88,//y_target
+ 0xfe,0x00,
+
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0x00,
+ 0x2f,0x0b,//level4
+ 0x30,0x40,
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xb6,0x03,
+ 0xfe,0x00,
+ 0x3f,0x00,
+ 0x40,0x77,
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+ 0x66,0x20,
+ 0x67,0x20,
+ 0x68,0x20,
+ 0x69,0x20,
+ 0x90,0x01,
+ 0x95,0x04,
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x06,
+ 0x41,0x00,
+ 0x40,0x00,
+ 0x17,0x01,
+ 0xfe,0x00,
+ 0x80,0xff,
+ 0x81,0x26,
+ 0x03,0x05,
+ 0x04,0x2e,
+ 0x84,0x02,
+ 0x86,0x02,
+ 0x87,0x80,
+ 0x8b,0xbc,
+ 0xa7,0x80,
+ 0xa8,0x80,
+ 0xb0,0x80,
+ 0xc0,0x40,
+ //LSC
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
+ 0xc4,0x21,
+ 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
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ /////// awb value////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ /////awb////
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10,//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06,[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08,//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+
+ 0xfe,0x01,
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x24,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////////////YCP//////////
+ 0xd1,0x40,// 40 saturation_cb
+ 0xd2,0x40,//40 saturation_Cr
+
+ 0xaf,0x7e,
+
+
+ 0xd3,0x40,//3ccontrast ? 40 2013-7-22 dustin
+ 0xd4,0x80,//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,
+ 0xfe,0x00,
+ //gamma
+ 0xfe,0x02,
+ 0x88,0x1f,//dn_b_base 15 2013-7-22 dustin
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x02, //dn_c_weight 03 2013-7-22 dustin
+ ////////EE ///////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x9a,//78 edge effect
+ ////==============RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ ///=================y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+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
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-kyt110_v7.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-kyt110_v7.h
new file mode 100755
index 00000000..522ad251
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-kyt110_v7.h
@@ -0,0 +1,1042 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0xa0,
+ 0xb4, 0x45,
+ 0xb5, 0x40,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
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analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xd0, //[3:0]vref
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+ //AEC
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope,0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x60,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x80,//y_target//75
+ 0xfe,0x00,
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0x00,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb 15c
+ 0x06,0x58,
+ 0x07,0x00,//vb
+ 0x08,0x22,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x04,//level2
+ 0x2c,0xe2,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xb6,0x03,
+ 0xfe,0x00,
+ 0x3f,0x00,
+ 0x40,0x77,
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+ 0x66,0x20,
+ 0x67,0x20,
+ 0x68,0x20,
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
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06,[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08,//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+
+ 0xfe,0x01,
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////////////YCP//////////
+ 0xd1,0x38,//saturation_cb//40
+ 0xd2,0x38,//40 saturation_Cr//46
+
+ 0xaf,0x7e,
+
+
+ 0xd3,0x42,//contrast ?
+ 0xd4,0x80,//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,
+ 0xfe,0x00,
+ //gamma
+ 0xfe,0x02,
+ 0x88,0x15,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////////EE ///////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x56,// edge effect//78
+ ////==============RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42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xa6,0xf0,
+0xae,0x9f,
+0xa2,0x90,
+0xa5,0x40,
+0xa7,0x30,
+0xb0,0x88,
+0x38,0x0b,
+0x39,0x30,
+
+0xfe,0x00,
+0x87,0xb0,
+
+0xfe,0x02,
+0x40,0x06,
+0x41,0x23,
+0x42,0x3f,
+0x43,0x06,
+0x44,0x00,
+0x45,0x00,
+0x46,0x14,
+0x47,0x09,
+
+
+0xfe,0x00,
+0x18,0x0a,
+0x40,0x73,///use ndark
+0x41,0x0b,///BLK row select
+0x5e,0x14,
+0x5f,0x14,
+0x60,0x14,
+0x61,0x14,
+
+0x62,0x14,
+0x63,0x14,
+0x64,0x14,
+0x65,0x14,
+
+0x66,0x1d,
+0x67,0x1d,
+0x68,0x1d,
+0x69,0x1d,
+#endif
+
+#if 0
+///////////////20130628//////////
+0xfe,0x00,
+0x18,0x0a,
+0x40,0x73,///use ndark
+0x41,0x0b,///BLK row select
+0x5e,0x14,
+0x5f,0x14,
+0x60,0x14,
+0x61,0x14,
+
+0x62,0x14,
+0x63,0x14,
+0x64,0x14,
+0x65,0x14,
+
+0x66,0x1d,
+0x67,0x1d,
+0x68,0x1d,
+0x69,0x1d,
+
+
+/////////RGB gamma/////////
+0xfe,0x02,
+0x15,0x0b,
+0x16,0x0e,
+0x17,0x10,
+0x18,0x12,
+0x19,0x19,
+0x1a,0x21,
+0x1b,0x29,
+0x1c,0x31,
+0x1d,0x41,
+0x1e,0x50,
+0x1f,0x5f,
+0x20,0x6d,
+0x21,0x79,
+0x22,0x91,
+0x23,0xa5,
+0x24,0xb9,
+0x25,0xc9,
+0x26,0xe1,
+0x27,0xee,
+0x28,0xf7,
+0x29,0xff,
+0xfe,0x00,
+#endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-mid8-wms8368.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-mid8-wms8368.h
new file mode 100755
index 00000000..e75394ac
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-mid8-wms8368.h
@@ -0,0 +1,1025 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,// 78 cyrille
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,///80 cyrille
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x90,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,
+ 0x0a,0xf0,
+ 0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0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+ 0x90,0x01,
+ 0x95,0x02,
+ 0x96,0x58,
+ 0x97,0x03,
+ 0x98,0x20,
+};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x0c,0x21,// cyrille
+ 0x13,0x78,//y_target 84//78 cyrille
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#else
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0x59,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+#endif
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+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
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x00,//04 cyrille
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x39,//saturation_cb
+ 0xd2,0x39,//saturation_Cr
+ 0xd3,0x42,//contrast ?
+ 0xd4,0x80,//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x15,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x56,// edge effect//45 cyrille
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0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c2035/gc2035-rb352a_v7.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb352a_v7.h
new file mode 100755
index 00000000..f338be3c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb352a_v7.h
@@ -0,0 +1,914 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0xa0,
+ 0xb4, 0x45,
+ 0xb5, 0x40,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,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 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+ 0x90,0x01,
+ 0x95,0x02,
+ 0x96,0x58,
+ 0x97,0x03,
+ 0x98,0x20,
+};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf9,0xfe,
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x17,
+ 0xf8,0x00,
+ 0xfe,0x00,
+ 0x82,0x00,
+ //0xb3,0x60,//close manual wb 2013.07.23
+ //0xb4,0x40,
+ //0xb5,0x60,
+ 0x03,0x05,
+ 0x04,0x08,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x60,
+ 0xef,0x90,
+ 0x0c,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+ 0x17,0x14,
+ 0x18,0x0a,
+ 0x19,0x0a,
+ 0x1a,0x01,
+ 0x1b,0x8b,
+ 0x1c,0x05,
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xd0, //[3:0]vref
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+ //AEC
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope,0x
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x75,//y_target
+ 0xfe,0x00,
+
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0x00,
+ 0x2f,0x0b,//level4
+ 0x30,0x40,
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xb6,0x03,
+ 0xfe,0x00,
+ 0x3f,0x00,
+ 0x40,0x77,
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+ 0x66,0x20,
+ 0x67,0x20,
+ 0x68,0x20,
+ 0x69,0x20,
+ 0x90,0x01,
+ 0x95,0x04,
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x06,
+ 0x41,0x00,
+ 0x40,0x00,
+ 0x17,0x01,
+ 0xfe,0x00,
+ 0x80,0xff,
+ 0x81,0x26,
+ 0x03,0x05,
+ 0x04,0x2e,
+ 0x84,0x02,
+ 0x86,0x02,
+ 0x87,0x80,
+ 0x8b,0xbc,
+ 0xa7,0x80,
+ 0xa8,0x80,
+ 0xb0,0x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
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ /////// awb value////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ /////awb////
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10,//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06,[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08,//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+
+ 0xfe,0x01,
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////////////YCP//////////
+ 0xd1,0x40,//saturation_cb
+ 0xd2,0x46,//40 saturation_Cr
+
+ 0xaf,0x7e,
+
+
+ 0xd3,0x48,//contrast ? 40 2013-7-22 dustin
+ 0xd4,0x80,//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,
+ 0xfe,0x00,
+ //gamma
+ 0xfe,0x02,
+ 0x88,0x1f,//dn_b_base 15 2013-7-22 dustin
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x02, //dn_c_weight 03 2013-7-22 dustin
+ ////////EE ///////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x78,// edge effect
+ ////==============RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ ///=================y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ 0xfe,0x00,
+
+ 0xfe,0x00,
+ 0x82,0xfe,
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ 0xfe,0x00,
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ 0xc8,0x14,
+ 0xf7,0x11,
+ 0xf8,0x85,
+ 0xfa,0x00,
+ 0x05,0x01,
+ 0x06,0x0a,
+ 0x07,0x00,
+ 0x08,0x58,
+ 0xfe,0x01,
+ 0x27,0x00,
+ 0x28,0xa1,
+ 0x29,0x05,
+ 0x2a,0x08,
+ 0x2b,0x05,
+ 0x2c,0x08,
+ 0x2d,0x05,
+ 0x2e,0x08,
+
+ 0x2f,0x05,
+ 0x30,0x08,
+
+ 0x3e,0x40,
+ 0xfe,0x03,
+ 0x42,0x04,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb357a_v7.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb357a_v7.h
new file mode 100755
index 00000000..eb5759f7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-rb357a_v7.h
@@ -0,0 +1,914 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0xa0,
+ 0xb4, 0x45,
+ 0xb5, 0x40,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0x00,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,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0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf9,0xfe,
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x17,
+ 0xf8,0x00,
+ 0xfe,0x00,
+ 0x82,0x00,
+ //0xb3,0x60,////close manual wb 2013.07.23
+ //0xb4,0x40,
+ //0xb5,0x60,
+ 0x03,0x05,
+ 0x04,0x08,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x60,
+ 0xef,0x90,
+ 0x0c,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+ 0x17,0x14,
+ 0x18,0x0a,
+ 0x19,0x0a,
+ 0x1a,0x01,
+ 0x1b,0x8b,
+ 0x1c,0x05,
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xd0, //[3:0]vref
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+ //AEC
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope,0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x60,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x75,//y_target
+ 0xfe,0x00,
+
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
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
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ /////awb////
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10,//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06,[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08,//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+
+ 0xfe,0x01,
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////////////YCP//////////
+ 0xd1,0x40,//saturation_cb
+ 0xd2,0x46,//40 saturation_Cr
+
+ 0xaf,0x7e,
+
+
+ 0xd3,0x40,//contrast ?
+ 0xd4,0x80,//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,
+ 0xfe,0x00,
+ //gamma
+ 0xfe,0x02,
+ 0x88,0x15,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////////EE ///////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x78,// edge effect
+ ////==============RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ ///=================y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ 0xfe,0x00,
+
+ 0xfe,0x00,
+ 0x82,0xfe,
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ 0xfe,0x00,
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ 0xc8,0x14,
+ 0xf7,0x11,
+ 0xf8,0x85,
+ 0xfa,0x00,
+ 0x05,0x01,
+ 0x06,0x0a,
+ 0x07,0x00,
+ 0x08,0x58,
+ 0xfe,0x01,
+ 0x27,0x00,
+ 0x28,0xa1,
+ 0x29,0x05,
+ 0x2a,0x08,
+ 0x2b,0x05,
+ 0x2c,0x08,
+ 0x2d,0x05,
+ 0x2e,0x08,
+
+ 0x2f,0x05,
+ 0x30,0x08,
+
+ 0x3e,0x40,
+ 0xfe,0x03,
+ 0x42,0x04,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-shutter.c b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-shutter.c
new file mode 100755
index 00000000..c3c11719
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-shutter.c
@@ -0,0 +1,441 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc2035.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x14
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+static uint32_t Preview_Shutter = 0;
+static uint32_t Capture_Shutter = 0;
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ //CMOS_WIN_SIZE("QVGA", 320, 240, gc2035_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc2035_640_480_regs),
+ //CMOS_WIN_SIZE("SVGA", 800, 600, gc2035_800_600_regs),
+ //CMOS_WIN_SIZE("720p", 1280, 720, gc2035_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, gc2035_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc2035_wb_auto;
+ size = ARRAY_SIZE(gc2035_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc2035_wb_incandescent;
+ size = ARRAY_SIZE(gc2035_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc2035_wb_daylight;
+ size = ARRAY_SIZE(gc2035_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc2035_wb_cloudy;
+ size = ARRAY_SIZE(gc2035_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc2035_wb_fluorescent;
+ size = ARRAY_SIZE(gc2035_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc2035_scene_mode_auto;
+ size = ARRAY_SIZE(gc2035_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc2035_scene_mode_night;
+ size = ARRAY_SIZE(gc2035_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc2035_exposure_neg6;
+ size = ARRAY_SIZE(gc2035_exposure_neg6);
+ break;
+ case -1:
+ regs = gc2035_exposure_neg3;
+ size = ARRAY_SIZE(gc2035_exposure_neg3);
+ break;
+ case 0:
+ regs = gc2035_exposure_zero;
+ size = ARRAY_SIZE(gc2035_exposure_zero);
+ break;
+ case 1:
+ regs = gc2035_exposure_pos3;
+ size = ARRAY_SIZE(gc2035_exposure_pos3);
+ break;
+ case 2:
+ regs = gc2035_exposure_pos6;
+ size = ARRAY_SIZE(gc2035_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_antibanding(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case 0:
+ regs = gc2035_antibanding_auto;
+ size = ARRAY_SIZE(gc2035_antibanding_auto);
+ break;
+ case 1:
+ regs = gc2035_antibanding_50hz;
+ size = ARRAY_SIZE(gc2035_antibanding_50hz);
+ break;
+ case 2:
+ regs = gc2035_antibanding_60hz;
+ size = ARRAY_SIZE(gc2035_antibanding_60hz);
+ break;
+ case 3:
+ regs = gc2035_antibanding_off;
+ size = ARRAY_SIZE(gc2035_antibanding_off);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0 ;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+ data=sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_CAMERA_ANTI_BANDING:
+ return sensor_s_antibanding(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+uint32_t sensor_read_shutter(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd,0x03) << 8)|sensor_read(sd,0x04) ;
+}
+
+
+static void sensor_write_shutter(struct cmos_subdev *sd,uint32_t shutter)
+{
+
+ if(shutter < 1)
+ return;
+
+ sensor_write(sd,0x03, (shutter >> 8) & 0xff);
+ sensor_write(sd,0x04, shutter & 0xff);
+}
+
+
+static void sensor_set_ae_mode(struct cmos_subdev *sd,bool AE_enable)
+{
+ sensor_write(sd,0xfe, 0x00);
+ if (AE_enable == true)
+ {
+ // turn on AEC/AGC
+ sensor_write(sd,0xb6, 0x03);
+ }
+ else
+ {
+ // turn off AEC/AGC
+ sensor_write(sd,0xb6, 0x00);
+ }
+}
+
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+ uint32_t shutter = 0;
+
+ printk(KERN_DEBUG "%s, s_mbus_fmt width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ if(mf->width == 640 && mf->height ==480){
+ sensor_write_shutter(sd,Preview_Shutter);
+ sensor_set_ae_mode(sd,true);
+ }else if(mf->width == 1600 && mf->height ==1200){
+ sensor_set_ae_mode(sd,false);
+ shutter = sensor_read_shutter(sd);
+ Preview_Shutter = shutter;
+ shutter = shutter /2;
+ Capture_Shutter = shutter;
+ sensor_write_shutter(sd,Capture_Shutter);
+
+
+ }
+
+ msleep(400);
+ //msleep(500);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xf0) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xf1) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc2035_default_regs_init,
+ ARRAY_SIZE(gc2035_default_regs_init));
+
+ msleep(100);
+ Preview_Shutter =sensor_read_shutter(sd);
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc2035_default_regs_exit,
+ ARRAY_SIZE(gc2035_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc2035_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc2035 = {
+ .name = "gc2035",
+ .i2c_addr = 0x3c,
+ .id = 0x2035,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &gc2035_ops,
+};
+
+#if 0
+static int __init gc2035_init(void)
+{
+ return cmos_register_sudbdev(&gc2035);
+}
+
+static void __exit gc2035_exit(void)
+{
+ return cmos_unregister_subdev(&gc2035);
+}
+
+module_init(gc2035_init);
+module_exit(gc2035_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-tvboxh2-ori.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-tvboxh2-ori.h
new file mode 100755
index 00000000..39bd4d4e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-tvboxh2-ori.h
@@ -0,0 +1,1064 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x05,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x06,// level 1 10
+ 0x2c , 0xa4,
+ 0x2d , 0x08,// level 2 7.5
+ 0x2e , 0xa2,
+ 0x2f , 0x0b,// level 3
+ 0x30 , 0x4a,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x06,// level 1 10
+ 0x2c , 0xa4,
+ 0x2d , 0x08,// level 2 7.5
+ 0x2e , 0xa2,
+ 0x2f , 0x0b,// level 3
+ 0x30 , 0x4a,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00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 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+ 0x90,0x01,
+ 0x95,0x02,
+ 0x96,0x58,
+ 0x97,0x03,
+ 0x98,0x20,
+};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xb0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2 5dc
+ 0x2c,0xdc,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xd6,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x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0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x20,//saturation_cb
+ 0xd2,0x20,//saturation_Cr
+ 0xd3,0x42,//contrast ? {{0xd4},{0x80}},//contrast center
+ 0xd5,0x00,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x75,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+ 0xad,0x7d,////////////////////////////////////////////////////////R-ratio
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+
+ /* //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-v7_maz7z233.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-v7_maz7z233.h
new file mode 100755
index 00000000..7d7d4f27
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-v7_maz7z233.h
@@ -0,0 +1,1105 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x07,// level 1 13.75 // 4a6
+ 0x2c , 0xf8,
+ 0x2d , 0x07,// level 2 10 // 6a4
+ 0x2e , 0xf8,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.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+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xb8,//max_post_gain
+ 0x20,0x50,//max_pre_gain // 48
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 1
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
+ 0xc4,0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
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x34,//saturation_cb
+ 0xd2,0x34,//saturation_Cr
+ 0xd3,0x45,//contrast ? {{0xd4},{0x80}},//contrast center // 40
+ 0xd5,0xfa,//luma_offset // f8
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x08,//dn_b_base // 1c
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x78,// edge effect // 45
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,*/
+
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-xhb_gbeffz2743l.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-xhb_gbeffz2743l.h
new file mode 100755
index 00000000..afb142a6
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-xhb_gbeffz2743l.h
@@ -0,0 +1,1023 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x60,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x84,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x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02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x84,//y_target
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x05,//level1
+ 0x2a,0xdc,
+ 0x2b,0x06,//level2
+ 0x2c,0x59,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xd6,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gamma
+ 0x84,0x02, //output put foramat
+ 0x86,0x02, //02 //sync plority
+ 0x8b,0xbc,
+ 0xb0,0x80, //globle gain
+ 0xc0,0x40,//Yuv bypass
+
+ ////lsc///////////
+ 0xfe,0x01,
+ 0xc2,0x38,
+ 0xc3,0x25,
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0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x34,//saturation_cb
+ 0xd2,0x34,//saturation_Cr
+ 0xd3,0x40,//contrast ? {{0xd4},{0x80}},//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1426.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1426.h
new file mode 100755
index 00000000..63ac5b1a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1426.h
@@ -0,0 +1,954 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x60,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xfd, /// 00
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8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+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf9,0xfe,
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x17,
+ 0xf8,0x00,
+ 0xfe,0x00,
+ 0x82,0x00,
+ //0xb3,0x60,//close manual WB 2013.0723
+ //0xb4,0x40,
+ //0xb5,0x60,
+ 0x03,0x05,
+ 0x04,0x08,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x60,
+ 0xef,0x90,
+ 0x0c,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+ 0x17,0x14,
+ 0x18,0x0a,
+ 0x19,0x0a,
+ 0x1a,0x01,
+ 0x1b,0x8b,
+ 0x1c,0x05,
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode,0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xd0, //[3:0]vref
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+ //AEC
+ 0xfe,0x01,
+ 0x0c,0x01,
+ 0x11,0x20,//AEC_out_slope,0x
+ 0x1f,0xb0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x60,//max_pre_gain 60 2013-7-22 dustin
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x7a,//y_target
+ 0xfe,0x00,
+
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,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80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ /////awb////
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10,//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06,[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08,//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+
+ 0xfe,0x01,
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x60, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x24,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////////////YCP//////////
+ 0xd1,0x40,// 40 saturation_cb
+ 0xd2,0x40,//40 saturation_Cr
+
+ 0xaf,0x7e,
+
+
+ 0xd3,0x40,//
+ 0xd4,0x80,//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,
+ 0xfe,0x00,
+ //gamma
+ 0xfe,0x02,
+ 0x88,0x1f,//dn_b_base 15 2013-7-22 dustin
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x02, //dn_c_weight 03 2013-7-22 dustin
+ ////////EE ///////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x9a,//78 edge effect
+ ////==============RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ ///=================y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x06, /// 04
+ 0x2d,0x0a, // 09
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ 0xfe,0x00,
+
+ 0xfe,0x00,
+ 0x82,0xfe,
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ 0xfe,0x00,
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ 0xc8,0x14,
+ 0xf7,0x11,
+ 0xf8,0x85,
+ 0xfa,0x00,
+ 0x05,0x01,
+ 0x06,0x0a,
+ 0x07,0x00,
+ 0x08,0x58,
+ 0xfe,0x01,
+ 0x27,0x00,
+ 0x28,0xa1,
+ 0x29,0x05,
+ 0x2a,0x08,
+ 0x2b,0x05,
+ 0x2c,0x08,
+ 0x2d,0x06,
+ 0x2e,0x4a,
+
+ 0x2f,0x05,
+ 0x30,0x08,
+
+ 0x3e,0x40,
+ 0xfe,0x03,
+ 0x42,0x04,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+
+
+#if 0
+ //////// re zao///
+ 0xfe,0x00,
+ 0x22,0xd0,
+ 0xfe,0x01,
+ 0x21,0xff,
+ 0xfe,0x02,
+ 0x8a,0x33,
+ 0x8c,0x76,
+ 0x8d,0x85,
+ 0xa6,0xf0,
+ 0xae,0x9f,
+ 0xa2,0x90,
+ 0xa5,0x40,
+ 0xa7,0x30,
+ 0xb0,0x88,
+ 0x38,0x0b,
+ 0x39,0x30,
+ 0xfe,0x00,
+ 0x87,0xb0,
+
+ /// small RGB gamma////
+
+
+ ///dark sun/////
+ 0xfe , 0x02,
+ 0x40 , 0x06,
+ 0x41 , 0x23,
+ 0x42 , 0x3f,
+ 0x43 , 0x06,
+ 0x44 , 0x00,
+ 0x45 , 0x00,
+ 0x46 , 0x14,
+ 0x47 , 0x09,
+ 0xfe,0x00,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1547a-tp785.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1547a-tp785.h
new file mode 100755
index 00000000..875dec12
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035-zh1547a-tp785.h
@@ -0,0 +1,1030 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,
+ 0x0a,0xf0,
+ 0x0c,0xa0,
+ 0x0d,0x02,
+ 0x0e,0xd8,
+ 0x0f,0x05,
+ 0x10,0x18,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x50,
+ 0xef,0x58,
+ 0x05,0x01,
+ 0x06,0xaa,
+ 0x07,0x00,
+ 0x08,0xf6,
+ 0xfe,0x01,
+ 0x27,0x00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04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x04,//level2
+ 0x2c,0xe2,
+ 0x2d,0x04,//6e8//level3
+ 0x2e,0xe2,
+ 0x2f,0x07,//level4
+ 0x30,0x53,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ 0xad,0x7d,
+ 0xae,0x81,
+ 0xaf,0x7e,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c_debug
+ 0x87,0x90, //[7]middle gam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4e,0x00,
+ 0x4e,0x00,
+ 0x4d,0xd0, // d0
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x52,
+ 0x4e,0x08,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x38,//saturation_cb
+ 0xd2,0x38,//saturation_Cr
+ 0xd3,0x40,//contrast ? {{0xd4},{0x80}},//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.c b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.c
new file mode 100755
index 00000000..b655582c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.c
@@ -0,0 +1,390 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc2035.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x14
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ //CMOS_WIN_SIZE("QVGA", 320, 240, gc2035_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc2035_640_480_regs),
+ //CMOS_WIN_SIZE("SVGA", 800, 600, gc2035_800_600_regs),
+ //CMOS_WIN_SIZE("720p", 1280, 720, gc2035_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, gc2035_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc2035_wb_auto;
+ size = ARRAY_SIZE(gc2035_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc2035_wb_incandescent;
+ size = ARRAY_SIZE(gc2035_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc2035_wb_daylight;
+ size = ARRAY_SIZE(gc2035_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc2035_wb_cloudy;
+ size = ARRAY_SIZE(gc2035_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc2035_wb_fluorescent;
+ size = ARRAY_SIZE(gc2035_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc2035_scene_mode_auto;
+ size = ARRAY_SIZE(gc2035_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc2035_scene_mode_night;
+ size = ARRAY_SIZE(gc2035_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc2035_exposure_neg6;
+ size = ARRAY_SIZE(gc2035_exposure_neg6);
+ break;
+ case -1:
+ regs = gc2035_exposure_neg3;
+ size = ARRAY_SIZE(gc2035_exposure_neg3);
+ break;
+ case 0:
+ regs = gc2035_exposure_zero;
+ size = ARRAY_SIZE(gc2035_exposure_zero);
+ break;
+ case 1:
+ regs = gc2035_exposure_pos3;
+ size = ARRAY_SIZE(gc2035_exposure_pos3);
+ break;
+ case 2:
+ regs = gc2035_exposure_pos6;
+ size = ARRAY_SIZE(gc2035_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_antibanding(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case 0:
+ regs = gc2035_antibanding_auto;
+ size = ARRAY_SIZE(gc2035_antibanding_auto);
+ break;
+ case 1:
+ regs = gc2035_antibanding_50hz;
+ size = ARRAY_SIZE(gc2035_antibanding_50hz);
+ break;
+ case 2:
+ regs = gc2035_antibanding_60hz;
+ size = ARRAY_SIZE(gc2035_antibanding_60hz);
+ break;
+ case 3:
+ regs = gc2035_antibanding_off;
+ size = ARRAY_SIZE(gc2035_antibanding_off);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0 ;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+ data=sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_CAMERA_ANTI_BANDING:
+ return sensor_s_antibanding(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ printk(KERN_DEBUG "%s, s_mbus_fmt width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ msleep(150);
+ //msleep(500);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xf0) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xf1) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc2035_default_regs_init,
+ ARRAY_SIZE(gc2035_default_regs_init));
+
+ msleep(100);
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc2035_default_regs_exit,
+ ARRAY_SIZE(gc2035_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc2035_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc2035 = {
+ .name = "gc2035",
+ .i2c_addr = 0x3c,
+ .id = 0x2035,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &gc2035_ops,
+};
+
+#if 0
+static int __init gc2035_init(void)
+{
+ return cmos_register_sudbdev(&gc2035);
+}
+
+static void __exit gc2035_exit(void)
+{
+ return cmos_unregister_subdev(&gc2035);
+}
+
+module_init(gc2035_init);
+module_exit(gc2035_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.h
new file mode 100755
index 00000000..99ee760d
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035.h
@@ -0,0 +1,1105 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,
+ 0xfe, 0x02,
+ 0xd5, 0xf8,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+
+
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,
+ 0x0a,0xf0,
+ 0x0c,0xa0,
+ 0x0d,0x02,
+ 0x0e,0xd8,
+ 0x0f,0x05,
+ 0x10,0x18,
+ 0xfe,0x00,
+ 0xec,0x04,
+ 0xed,0x04,
+ 0xee,0x50,
+ 0xef,0x58,
+ 0x05,0x01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};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfe,0x80,
+ 0xfc,0x06,
+ 0xf2,0x00,
+ 0xf3,0x00,
+ 0xf4,0x00,
+ 0xf5,0x00,
+ 0xf9,0xfe, //[0] pll enable
+ 0xfa,0x00,
+ 0xf6,0x00,
+ 0xf7,0x15, //pll enable
+
+ 0xf8,0x84,//85
+ 0xfe,0x00,
+ 0x82,0x00,
+ 0xb3,0x60,
+ 0xb4,0x40,
+ 0xb5,0x60,
+
+ 0x03,0x02,
+ 0x04,0x71,
+
+ ////,/meare window ///////////
+ 0xfe,0x00,
+ 0xec,0x06,//04
+ 0xed,0x06,//04
+ 0xee,0x62,//60
+ 0xef,0x92,//90
+
+ ////,//anog/////////////
+ 0x0a,0x00, //row start
+ 0x0c,0x00, //col start
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06, //Window setting
+ 0x10,0x58,
+ 0x17,0x14, //[0]mirror [1]flip
+ 0x18,0x0a, //0a 2012.10.26
+ 0x19,0x0a, //AD pipe number
+ 0x1a,0x01, //CISCTL mode4
+ 0x1b,0x8b,
+ 0x1c,0x05,//add by lanking 20130403
+ 0x1e,0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f,0x08, //[3] tx-low en//
+ 0x20,0x05, //[0]adclk mode},{0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21,0x0f, //[6:4]rsg
+ 0x22,0xf0, //[3:0]vref 20130403
+ 0x23,0xc3, //f3//ADC_r
+ 0x24,0x17, //pad drive 16
+
+
+ 0xfe,0x01,
+ 0x11,0x20,//AEC_out_slope},{0x
+ 0x1f,0xc0,//max_post_gain
+ 0x20,0x48,//max_pre_gain
+ 0x47,0x30,//AEC_outdoor_th
+ 0x0b,0x10,//
+ 0x13,0x78,//y_target 84
+ 0xfe,0x00,
+
+#if 0
+ 0x05,0x01,//hb
+ 0x06,0x11,
+ 0x07,0x00,//vb
+ 0x08,0x50,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0xa0,
+ 0x29,0x05,//level1
+ 0x2a,0x00,
+ 0x2b,0x05,//level2
+ 0x2c,0x00,
+ 0x2d,0x06,//6e8//level3
+ 0x2e,0xe0,
+ 0x2f,0x0a,//level4
+ 0x30,0x00,
+#endif
+ 0x05,0x01,//hb
+ 0x06,0x5c,
+ 0x07,0x00,//vb
+ 0x08,0x32,
+ 0xfe,0x01,
+ 0x27,0x00,//step
+ 0x28,0x7d,
+ 0x29,0x04,//level1
+ 0x2a,0xe2,
+ 0x2b,0x05,//level2
+ 0x2c,0xdc,
+ 0x2d,0x05,//6e8//level3
+ 0x2e,0xdc,
+ 0x2f,0x09,//level4
+ 0x30,0xc4,
+
+ 0x3e,0x40,
+ 0xfe,0x00,
+ 0xfe,0x00, //0x},{0x},{0x},{0x},{0x
+ 0xb6,0x03, //AEC enable
+ 0xfe,0x00,
+
+ ////,BLK////
+ 0x3f,0x00, //prc close
+ 0x40,0x77,//
+ 0x42,0x7f,
+ 0x43,0x30,
+ 0x5c,0x08,
+ 0x5e,0x20,
+ 0x5f,0x20,
+ 0x60,0x20,
+ 0x61,0x20,
+ 0x62,0x20,
+ 0x63,0x20,
+ 0x64,0x20,
+ 0x65,0x20,
+
+ //blo,/////////
+ 0x80,0xff,
+ 0x81,0x26,//38},{0x//skin_Y 8c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0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4d,0xd0, // d0
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4e,0x00,
+ 0x4f,0x01,
+ ////,wb vue////////
+ 0xfe,0x01,
+ 0x4f,0x00,
+ 0x4d,0x30,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x40,
+ 0x4e,0x00,
+ 0x4e,0x80,
+ 0x4e,0x80,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4e,0x02,
+ 0x4d,0x53,
+ 0x4e,0x08,
+ 0x4e,0x04,
+ 0x4d,0x62,
+ 0x4e,0x10,
+ 0x4d,0x72,
+ 0x4e,0x20,
+ 0x4f,0x01,
+
+ ///a,///
+ 0xfe,0x01,
+ 0x50,0x88,//c0//[6]green mode
+ 0x52,0x40,
+ 0x54,0x60,
+ 0x56,0x06,
+ 0x57,0x20, //pre adjust
+ 0x58,0x01,
+ 0x5b,0x02, //AWB_gain_delta
+ 0x61,0xaa,//R/G stand
+ 0x62,0xaa,//R/G stand
+ 0x71,0x00,
+ 0x74,0x10, //0x//AWB_C_max
+ 0x77,0x08, // 0x//AWB_p2_x
+ 0x78,0xfd, //AWB_p2_y
+ 0x86,0x30,
+ 0x87,0x00,
+ 0x88,0x04,//06},{0x//[1]dark mode
+ 0x8a,0xc0,//awb move mode
+ 0x89,0x75,
+ 0x84,0x08, //0x//auto_window
+ 0x8b,0x00, // 0x//awb compare luma
+ 0x8d,0x70, //awb gain limit R
+ 0x8e,0x70,//G
+ 0x8f,0xf4,//B
+ 0xfe,0x00,
+ 0x82,0x02,//awb_en
+ ////wb end /////////////
+
+ //===,====de
+ 0xfe,0x01,
+
+ 0x9c,0x04,//00
+
+ 0x21,0xbf,
+ 0xfe,0x02,
+ 0xa4,0x00,//
+ 0xa5,0x40, //lsc_th
+ 0xa2,0xa0, //lsc_dec_slope
+ 0xa6,0x80, //dd_th
+ 0xa7,0x80, //ot_th
+ 0xab,0x31, //
+ 0xa9,0x6f, //
+ 0xb0,0x99, //0x//edge effect slope low
+ 0xb1,0x34,//edge effect slope low
+ 0xb3,0x80, //saturation dec slope
+ 0xde,0xb6, //
+ 0x38,0x0f, //
+ 0x39,0x60, //
+ 0xfe,0x00,
+ 0x81,0x26,
+ 0xfe,0x02,
+ 0x83,0x00,//
+ 0x84,0x45,//
+ ////,///Y//////////
+ 0xd1,0x34,//saturation_cb
+ 0xd2,0x34,//saturation_Cr
+ 0xd3,0x40,//contrast ? {{0xd4},{0x80}},//contrast center
+ 0xd5,0xf8,//luma_offset
+ 0xdc,0x30,
+ 0xdd,0xb8,//edge_sa_g,b
+ 0xfe,0x00,
+ ////,dd/////////
+ 0xfe,0x02,
+ 0x88,0x1c,//dn_b_base
+ 0x8c,0xf6, //[2]b_in_dark_inc
+ 0x89,0x03, //dn_c_weight
+ ////,E /////////
+ 0xfe,0x02,
+ 0x90,0x6c,// EEINTP mode1
+ 0x97,0x45,// edge effect
+ //==,=======RGB Gamma
+ 0xfe,0x02,
+ 0x15,0x0a,
+ 0x16,0x12,
+ 0x17,0x19,
+ 0x18,0x1f,
+ 0x19,0x2c,
+ 0x1a,0x38,
+ 0x1b,0x42,
+ 0x1c,0x4e,
+ 0x1d,0x63,
+ 0x1e,0x76,
+ 0x1f,0x87,
+ 0x20,0x96,
+ 0x21,0xa2,
+ 0x22,0xb8,
+ 0x23,0xca,
+ 0x24,0xd8,
+ 0x25,0xe3,
+ 0x26,0xf0,
+ 0x27,0xf8,
+ 0x28,0xfd,
+ 0x29,0xff,
+
+ //===,=========y gamma
+ 0xfe,0x02,
+ 0x2b,0x00,
+ 0x2c,0x04,
+ 0x2d,0x09,
+ 0x2e,0x18,
+ 0x2f,0x27,
+ 0x30,0x37,
+ 0x31,0x49,
+ 0x32,0x5c,
+ 0x33,0x7e,
+ 0x34,0xa0,
+ 0x35,0xc0,
+ 0x36,0xe0,
+ 0x37,0xff,
+ ///1,x120ize//
+ 0xfe,0x00,//
+ 0x90,0x01, //0x//crop enable
+ 0x95,0x04, //0x//1600x1200
+ 0x96,0xb0,
+ 0x97,0x06,
+ 0x98,0x40,
+
+ 0xfe,0x03,
+ 0x42,0x40,
+ 0x43,0x06, //output buf width
+ 0x41,0x02, // Pclk_polarity
+ 0x40,0x40, //00
+ 0x17,0x00, //widv
+ 0xfe,0x00,
+ //ou,t DV////
+
+ 0xfe,0x00,
+ 0x82,0xfe, // fe
+ 0xf2,0x70,
+ 0xf3,0xff,
+ 0xf4,0x00,
+ 0xf5,0x30,
+
+ #if 0
+ //,///ssumple 640X4800//////
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+
+ 0x90,0x01,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+ #endif
+
+
+ 0xfe,0x00,
+ 0x0c,0x00,
+
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+
+#if 1
+ //// re zao///
+ 0xfe ,0x00,
+ 0x22 ,0xf0,
+ 0xfe ,0x01,
+ 0x21 ,0xff,
+ 0xfe ,0x02,
+ 0x8a ,0x33,
+ 0x8c ,0x76,
+ 0x8d ,0x85,
+ 0xa6 ,0xf0,
+ 0xae ,0x9f,
+ 0xa2 ,0x90,
+ 0xa5 ,0x40,
+ 0xa7 ,0x30,
+ 0xb0 ,0x88,
+ 0x38 ,0x0b,
+ 0x39 ,0x30,
+ 0xfe ,0x00,
+ 0x87 ,0xb0,
+
+
+ /*
+ //, sma RGB gamma////
+ 0xfe,0x02,
+ 0x15,0x0b,
+ 0x16,0x0e,
+ 0x17,0x10,
+ 0x18,0x12,
+ 0x19,0x19,
+ 0x1a,0x21,
+ 0x1b,0x29,
+ 0x1c,0x31,
+ 0x1d,0x41,
+ 0x1e,0x50,
+ 0x1f,0x5f,
+ 0x20,0x6d,
+ 0x21,0x79,
+ 0x22,0x91,
+ 0x23,0xa5,
+ 0x24,0xb9,
+ 0x25,0xc9,
+ 0x26,0xe1,
+ 0x27,0xee,
+ 0x28,0xf7,
+ 0x29,0xff,
+ */
+ //da,sun///
+ 0xfe,0x02,
+ 0x40,0x06,
+ 0x41,0x23,
+ 0x42,0x3f,
+ 0x43,0x06,
+ 0x44,0x00,
+ 0x45,0x00,
+ 0x46,0x14,
+ 0x47,0x09,
+
+ #endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid10_hl_pc1089.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid10_hl_pc1089.h
new file mode 100755
index 00000000..45a63cdf
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid10_hl_pc1089.h
@@ -0,0 +1,1158 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xd0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x78,//78
+ 0xfe, 0x02,
+ 0xd5, 0xf8,//00
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x80,//80
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,//88
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_320_240_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x22,
+ 0x9b,0x00,
+ 0x9f,0x00,
+
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0xf2,//600
+ 0x97,0x01,
+ 0x98,0x40,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+ 0xfe,0x03,
+ 0x42,0x80,
+ 0x43,0x02,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x54,
+};
+
+uint8_t gc2035_1280_720_regs[]={
+ 0xfe,0x00,
+ 0x0a,0xf0,
+ 0x0c,0xa0,
+ 0x0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00,
+ 0xfa,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+
+ 0xfe , 0x80,
+ 0xfe , 0x80,
+ 0xfe , 0x80,
+ 0xfc , 0x06,
+ 0xf2 , 0x00,
+ 0xf3 , 0x00,
+ 0xf4 , 0x00,
+ 0xf5 , 0x00,
+ 0xf9 , 0xfe, //[0] pll enable
+ 0xfa , 0x00,
+ 0xf6 , 0x00,
+ 0xf7 , 0x15, //pll enable
+ 0xf8 , 0x85,
+ 0xfe , 0x00,
+ 0x82 , 0x00,
+ 0xb3 , 0x60,
+ 0xb4 , 0x40,
+ 0xb5 , 0x60,
+
+ 0x03 , 0x02,
+ 0x04 , 0xa8,
+
+ //////////measure window ///////////
+ 0xfe , 0x00,
+ 0xec , 0x06,//04
+ 0xed , 0x06,//04
+ 0xee , 0x62,//60
+ 0xef , 0x92,//90
+
+ ///////////analog/////////////
+ 0x0a , 0x00, //row start
+ 0x0c , 0x00, //col start
+ 0x0d , 0x04,
+ 0x0e , 0xc0,
+ 0x0f , 0x06, //Window setting
+ 0x10 , 0x58,
+ 0x17 , 0x14, //[0]mirror [1]flip
+ 0x18 , 0x0e, //0a 2012.10.26
+ 0x19 , 0x0c, //AD pipe number
+ 0x1a , 0x01, //CISCTL mode4
+ 0x1b , 0x8b,
+ 0x1c , 0x05,//add by lanking 20130403
+ 0x1e , 0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f , 0x08, //[3] tx-low en//
+ 0x20 , 0x05, //[0]adclk mode , 0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21 , 0x0f, //[6:4]rsg
+ 0x22 , 0xf0, //[3:0]vref d0 20130628
+ 0x23 , 0xc3, //f3//ADC_r
+ 0x24 , 0x17, //pad drive 16
+
+ //AWB_gray
+ 0xfe , 0x01,
+ 0x4f , 0x00,
+ 0x4d , 0x32, // 30
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x42, // 40
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x52, // 50
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x62, // 60
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x72, // 70
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x82, // 80
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x92, // 90
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4f , 0x01,
+ 0x50 , 0x88,
+ 0xfe , 0x00,
+ 0x82 , 0xfe,
+
+ ///////awb start ////////////////
+ 0xfe , 0x01,
+ 0x50 , 0x88,//c0//[6]green mode
+ 0x52 , 0x40,
+ 0x54 , 0x60,
+ 0x56 , 0x06,
+ 0x57 , 0x20,//pre adjust
+ 0x58 , 0x01,
+ 0x5b , 0x02,//AWB_gain_delta
+ 0x61 , 0xaa,//R/G stand
+ 0x62 , 0xaa,//R/G stand
+ 0x71 , 0x00,
+ 0x74 , 0x10,//AWB_C_max
+ 0x77 , 0x08,//AWB_p2_x
+ 0x78 , 0xfd,//AWB_p2_y
+ 0x86 , 0x30,
+ 0x87 , 0x00,
+ 0x88 , 0x04,//[1]dark mode
+ 0x8a , 0xc0,//awb move mode
+ 0x89 , 0x75,
+ 0x84 , 0x08,//auto_window
+ 0x8b , 0x00,//awb compare luma
+ 0x8d , 0x70,//awb gain limit R
+ 0x8e , 0x70,//G
+ 0x8f , 0xf4,//B
+ /////////awb end /////////////
+
+ //AEC
+ 0xfe , 0x01,
+ 0x11 , 0x20,//AEC_out_slope , 0x
+ 0x1f , 0xc0,//max_post_gain
+ 0x20 , 0x60,//max_pre_gain
+ 0x47 , 0x30,//AEC_outdoor_th
+ 0x0b , 0x10,//
+ 0x13 , 0x78,//y_target 75
+
+
+ 0xfe , 0x00,
+ 0x05 , 0x01,
+ 0x06 , 0x23,
+ 0x07 , 0x00,
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,//
+ 0xb6 , 0x03,//AEC enable
+ 0xfe , 0x00,
+
+ /////////BLK//////
+ 0x3f , 0x00,//prc close
+ 0x40 , 0x77,//
+ 0x42 , 0x7f,
+ 0x43 , 0x30,
+ 0x5c , 0x08,
+ 0x5e , 0x20,
+ 0x5f , 0x20,
+ 0x60 , 0x20,
+ 0x61 , 0x20,
+ 0x62 , 0x20,
+ 0x63 , 0x20,
+ 0x64 , 0x20,
+ 0x65 , 0x20,
+
+ ///block////////////
+ 0x80 , 0xff,
+ 0x81 , 0x26,//38 //skin_Y 8c_debug
+ 0x87 , 0x90,//[7]middle gamma
+ 0x84 , 0x02,//output put foramat
+ 0x86 , 0x06,//02 //sync plority lanking
+ 0x8b , 0xbc,
+ 0xb0 , 0x80,//globle gain
+ 0xc0 , 0x40,//Yuv bypass
+
+ //////lsc/////////////
+#if 0
+ 0xfe , 0x01,
+ 0xc2 , 0x38,
+ 0xc3 , 0x25,
+ 0xc4 , 0x21,
+ 0xc8 , 0x19,
+ 0xc9 , 0x12,
+ 0xca , 0x0e,
+ 0xbc , 0x43,
+ 0xbd , 0x18,
+ 0xbe , 0x1b,
+ 0xb6 , 0x40,
+ 0xb7 , 0x2e,
+ 0xb8 , 0x26,
+ 0xc5 , 0x05,
+ 0xc6 , 0x03,
+ 0xc7 , 0x04,
+ 0xcb , 0x00,
+ 0xcc , 0x00,
+ 0xcd , 0x00,
+ 0xbf , 0x14,
+ 0xc0 , 0x22,
+ 0xc1 , 0x1b,
+ 0xb9 , 0x00,
+ 0xba , 0x05,
+ 0xbb , 0x05,
+ 0xaa , 0x35,
+ 0xab , 0x33,
+ 0xac , 0x33,
+ 0xad , 0x25,
+ 0xae , 0x22,
+ 0xaf , 0x27,
+ 0xb0 , 0x1d,
+ 0xb1 , 0x20,
+ 0xb2 , 0x22,
+ 0xb3 , 0x14,
+ 0xb4 , 0x15,
+ 0xb5 , 0x16,
+ 0xd0 , 0x00,
+ 0xd2 , 0x07,
+ 0xd3 , 0x08,
+ 0xd8 , 0x00,
+ 0xda , 0x13,
+ 0xdb , 0x17,
+ 0xdc , 0x00,
+ 0xde , 0x0a,
+ 0xdf , 0x08,
+ 0xd4 , 0x00,
+ 0xd6 , 0x00,
+ 0xd7 , 0x0c,
+ 0xa4 , 0x00,
+ 0xa5 , 0x00,
+ 0xa6 , 0x00,
+ 0xa7 , 0x00,
+ 0xa8 , 0x00,
+ 0xa9 , 0x00,
+ 0xa1 , 0x80,
+ 0xa2 , 0x80,
+#endif
+ 0xfe,0x01,
+ 0xa1,0x80, // center_row
+ 0xa2,0x80, // center_col
+ 0xa4,0x07, // sign of b1
+ 0xa5,0x00, // sign of b1
+ 0xa6,0x00, // sign of b4
+ 0xa7,0x00, // sign of b4
+ 0xa8,0x00, // sign of b22
+ 0xa9,0x07, // sign of b22
+ 0xaa,0x1e, // Q1_b1 of R
+ 0xab,0x49, // Q1_b1 of G
+ 0xac,0x1e, // Q1_b1 of B
+ 0xad,0x30, // Q2_b1 of R
+ 0xae,0x1c, // Q2_b1 of G
+ 0xaf,0x1b, // Q2_b1 of B
+ 0xb0,0x56, // Q3_b1 of R
+ 0xb1,0x88, // Q3_b1 of G
+ 0xb2,0x53, // Q3_b1 of B
+ 0xb3,0xff, // Q4_b1 of R
+ 0xb4,0xf8, // Q4_b1 of G
+ 0xb5,0xcb, // Q4_b1 of B
+ 0xb6,0x62, // right_b2 of R
+ 0xb7,0x19, // right_b2 of G
+ 0xb8,0x00, // right_b2 of B
+ 0xb9,0xff, // right_b4 of R
+ 0xba,0xff, // right_b4 of G
+ 0xbb,0xff, // right_b4 of B
+ 0xbc,0x67, // left_b2 of R
+ 0xbd,0x3a, // left_b2 of G
+ 0xbe,0x25, // left_b2 of B
+ 0xbf,0x65, // left_b4 of R
+ 0xc0,0x49, // left_b4 of G
+ 0xc1,0x60, // left_b4 of B
+ 0xc2,0x3f, // up_b2 of R
+ 0xc3,0x1b, // up_b2 of G
+ 0xc4,0x19, // up_b2 of B
+ 0xc5,0x45, // up_b4 of R
+ 0xc6,0x39, // up_b4 of G
+ 0xc7,0x19, // up_b4 of B
+ 0xc8,0x12, // down_b2 of R
+ 0xc9,0x02, // down_b2 of G
+ 0xca,0x00, // down_b2 of B
+ 0xcb,0xff, // down_b4 of R
+ 0xcc,0xff, // down_b4 of G
+ 0xcd,0xf3, // down_b4 of B
+ 0xd0,0xff, // right_up_b22 of R
+ 0xd2,0x3b, // right_up_b22 of G
+ 0xd3,0x7d, // right_up_b22 of B
+ 0xd4,0xff, // right_down_b22 of R
+ 0xd6,0xff, // right_down_b22 of G
+ 0xd7,0xff, // right_down_b22 of B
+ 0xd8,0xff, // left_up_b22 of R
+ 0xda,0x89, // left_up_b22 of G
+ 0xdb,0xa3, // left_up_b22 of B
+ 0xdc,0x1c, // left_down_b22 of R
+ 0xde,0x99, // left_down_b22 of G
+ 0xdf,0x27, // left_down_b22 of B
+ 0xfe,0x00,
+
+ //////////cc//////////////
+ 0xfe , 0x02,
+ 0xc0 , 0x01,
+ 0xc1 , 0x38,//Green_cc for d 40
+ 0xc2 , 0xfc,
+ 0xc3 , 0x05,
+ 0xc4 , 0xec,
+ 0xc5 , 0x42,
+ 0xc6 , 0xf8,
+ 0xc7 , 0x40,//for cwf
+ 0xc8 , 0xf8,
+ 0xc9 , 0x06,
+ 0xca , 0xfd,
+ 0xcb , 0x3e,
+ 0xcc , 0xf3,
+ 0xcd , 0x36,//for A
+ 0xce , 0xf6,
+ 0xcf , 0x04,
+ 0xe3 , 0x0c,
+ 0xe4 , 0x44,
+ 0xe5 , 0xe5,
+ 0xfe , 0x00,
+
+ ///==========asde
+ 0xfe , 0x01,
+ 0x21 , 0xbf,
+ 0xfe , 0x02,
+ 0xa4 , 0x00,
+ 0xa5 , 0x40,//lsc_th
+ 0xa2 , 0xa0,//lsc_dec_slope
+ 0xa6 , 0x80,//dd_th
+ 0xa7 , 0x80,//ot_th
+ 0xab , 0x31,
+ 0xa9 , 0x6f,
+ 0xb0 , 0x99,//edge effect slope low
+ 0xb1 , 0x34,//edge effect slope low
+ 0xb3 , 0x80,//saturation dec slope
+ 0xde , 0xb6,
+ 0x38 , 0x0f,
+ 0x39 , 0x60,
+ 0xfe , 0x00,
+ 0x81 , 0x26,
+ 0xfe , 0x02,
+ 0x83 , 0x00,
+ 0x84 , 0x45,
+ ////////////YCP//////////
+ 0xd1 , 0x38,//saturation_cb
+ 0xd2 , 0x34,//saturation_Cr 38
+ 0xd3 , 0x40,//contrast
+ 0xd4 , 0x80,//contrast center
+ 0xd5 , 0xf8,//luma_offset
+ 0xdc , 0x30,
+ 0xdd , 0xb8,//edge_sa_g,b
+ 0xfe , 0x00,
+ //////////dndd///////////
+ 0xfe , 0x02,
+ 0x88 , 0x15,//dn_b_base
+ 0x8c , 0xf6,//[2]b_in_dark_inc
+ 0x89 , 0x03,//dn_c_weight
+ //////////EE ///////////
+ 0xfe , 0x02,
+ 0x90 , 0x6c,// EEINTP mode1
+ 0x97 , 0x45,// edge effect
+ ////==============RGB Gamma ////
+ 0xfe , 0x02,
+ 0x15 , 0x0a,
+ 0x16 , 0x12,
+ 0x17 , 0x19,
+ 0x18 , 0x1f,
+ 0x19 , 0x2c,
+ 0x1a , 0x38,
+ 0x1b , 0x42,
+ 0x1c , 0x4e,
+ 0x1d , 0x63,
+ 0x1e , 0x76,
+ 0x1f , 0x87,
+ 0x20 , 0x96,
+ 0x21 , 0xa2,
+ 0x22 , 0xb8,
+ 0x23 , 0xca,
+ 0x24 , 0xd8,
+ 0x25 , 0xe3,
+ 0x26 , 0xf0,
+ 0x27 , 0xf8,
+ 0x28 , 0xfd,
+ 0x29 , 0xff,
+ //// small RGB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+ 0xd3 , 0x40 ,
+ 0xd5 , 0x00 ,
+ 0xdd , 0x00 ,
+ 0xfe , 0x00 ,
+#endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid13_hl_pc1388.h b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid13_hl_pc1388.h
new file mode 100755
index 00000000..a7f149f7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2035/gc2035_pid13_hl_pc1388.h
@@ -0,0 +1,1152 @@
+#ifndef GC2035_H
+#define GC2035_H
+
+
+// Scene Mode
+uint8_t gc2035_scene_mode_auto[] = {
+ 0xfe,0x01,
+ 0x3e,0x40,
+ 0x1f,0xa0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x50,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe,0x00,
+};
+
+uint8_t gc2035_scene_mode_night[] = {
+ 0xfe, 0x01,
+ 0x3e, 0x60,
+ 0x1f,0xe0,//max_post_gain c0 2013-7-22 dustin
+ 0x20,0x80,//max_pre_gain 60 2013-7-22 dustin
+ 0xfe, 0x00,
+};
+
+
+// White Balance
+uint8_t gc2035_wb_auto [] = {
+ 0xfe, 0x00,
+// 0xb3, 0x61, //2013-8-16 dustin
+// 0xb4, 0x40,
+// 0xb5, 0x61,
+ 0x82, 0xfe,
+};
+
+uint8_t gc2035_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+};
+
+uint8_t gc2035_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0x78,
+};
+
+uint8_t gc2035_wb_daylight [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x78,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+uint8_t gc2035_wb_cloudy [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x58,
+ 0xb4, 0x40,
+ 0xb5, 0x50,
+};
+
+
+// Exposure
+uint8_t gc2035_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x68,
+ 0xfe, 0x02,
+ 0xd5, 0xe0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x70,
+ 0xfe, 0x02,
+ 0xd5, 0xf0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x88,//78
+ 0xfe, 0x02,
+ 0xd5, 0x04,//00
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x98,//80
+ 0xfe, 0x02,
+ 0xd5, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0xa8,//88
+ 0xfe, 0x02,
+ 0xd5, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_auto[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_50hz[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+
+
+};
+
+uint8_t gc2035_antibanding_60hz[] = {
+ 0xfe, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x39,
+ 0x07, 0x00,
+ 0x08, 0x14,
+ 0xfe, 0x01,
+ 0x27, 0x00,
+ 0x28, 0x8b,
+ 0x29, 0x04,
+ 0x2a, 0x58,
+ 0x2b, 0x04,
+ 0x2c, 0x58,
+ 0x2d, 0x06,
+ 0x2e, 0x84,
+ 0x2f, 0x08,
+ 0x30, 0xb0,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2035_antibanding_off[] = {
+ 0xfe , 0x00,
+ 0x05 , 0x01,// HB
+ 0x06 , 0x23,
+ 0x07 , 0x00,// VB
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,// step
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2035_176_144_regs[]={
+ 0xfe,0x00,
+
+ 0x99,0x33,
+ 0x9b,0x00,
+ 0x9f,0x00,
+ 0x90,0x01,
+
+ 0x95,0x00,
+ 0x96,0x92,//600
+ 0x97,0x00,
+ 0x98,0xb0,//800
+
+ 0xc8,0x15,
+ 0xf7,0x11,
+
+ 0xfe,0x03,
+ 0x42,0x60,
+ 0x43,0x01,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,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x04,
+ 0x96 , 0xb0,
+ 0x97 , 0x06,
+ 0x98 , 0x40,
+};
+
+uint8_t gc2035_800_600_regs[]={
+ 0xfe,0x00,
+ 0xfa,0x00,
+ 0xc8,0x00,
+
+ 0x99,0x22,
+ 0x9a,0x07,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+ 0x90,0x01,
+ 0x95,0x02,
+ 0x96,0x58,
+ 0x97,0x03,
+ 0x98,0x20,
+};
+
+uint8_t gc2035_640_480_regs[]={
+ 0xfe,0x00,
+ 0x0c,0x00,
+ 0xfa,0x00,
+ 0x0d,0x04,
+ 0x0e,0xc0,
+ 0x0f,0x06,
+ 0x10,0x58,
+
+ 0x90,0x01,
+ 0x99,0x11,
+ 0x95,0x01,
+ 0x96,0xe0,
+ 0x97,0x02,
+ 0x98,0x80,
+
+ 0xc8,0x15,
+ 0xf7,0x15,
+ 0xfe,0x03,
+ 0x42,0x00,
+ 0x43,0x05,
+ 0x41,0x02,
+ 0x40,0x40,
+ 0x17,0x00,
+ 0xfe,0x00,
+ 0xc8,0x55,
+ 0xb6,0x03,
+};
+
+uint8_t gc2035_default_regs_init[]={
+
+ 0xfe , 0x80,
+ 0xfe , 0x80,
+ 0xfe , 0x80,
+ 0xfc , 0x06,
+ 0xf2 , 0x00,
+ 0xf3 , 0x00,
+ 0xf4 , 0x00,
+ 0xf5 , 0x00,
+ 0xf9 , 0xfe, //[0] pll enable
+ 0xfa , 0x00,
+ 0xf6 , 0x00,
+ 0xf7 , 0x15, //pll enable
+ 0xf8 , 0x85,
+ 0xfe , 0x00,
+ 0x82 , 0x00,
+ 0xb3 , 0x60,
+ 0xb4 , 0x40,
+ 0xb5 , 0x60,
+
+ 0x03 , 0x02,
+ 0x04 , 0xa8,
+
+ //////////measure window ///////////
+ 0xfe , 0x00,
+ 0xec , 0x06,//04
+ 0xed , 0x06,//04
+ 0xee , 0x62,//60
+ 0xef , 0x92,//90
+
+ ///////////analog/////////////
+ 0x0a , 0x00, //row start
+ 0x0c , 0x00, //col start
+ 0x0d , 0x04,
+ 0x0e , 0xc0,
+ 0x0f , 0x06, //Window setting
+ 0x10 , 0x58,
+ 0x17 , 0x14, //[0]mirror [1]flip
+ 0x18 , 0x0e, //0a 2012.10.26
+ 0x19 , 0x0c, //AD pipe number
+ 0x1a , 0x01, //CISCTL mode4
+ 0x1b , 0x8b,
+ 0x1c , 0x05,//add by lanking 20130403
+ 0x1e , 0x88, //analog mode1 [7] tx-high en [5:3]COL_bias
+ 0x1f , 0x08, //[3] tx-low en//
+ 0x20 , 0x05, //[0]adclk mode , 0x[1]rowclk_MODE [2]rsthigh_en
+ 0x21 , 0x0f, //[6:4]rsg
+ 0x22 , 0xf0, //[3:0]vref d0 20130628
+ 0x23 , 0xc3, //f3//ADC_r
+ 0x24 , 0x17, //pad drive 16
+
+ //AWB_gray
+ 0xfe , 0x01,
+ 0x4f , 0x00,
+ 0x4d , 0x32, // 30
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x42, // 40
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x52, // 50
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x62, // 60
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x72, // 70
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x82, // 80
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4d , 0x92, // 90
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4e , 0x04,
+ 0x4f , 0x01,
+ 0x50 , 0x88,
+ 0xfe , 0x00,
+ 0x82 , 0xfe,
+
+ ///////awb start ////////////////
+ 0xfe , 0x01,
+ 0x50 , 0x88,//c0//[6]green mode
+ 0x52 , 0x40,
+ 0x54 , 0x60,
+ 0x56 , 0x06,
+ 0x57 , 0x20,//pre adjust
+ 0x58 , 0x01,
+ 0x5b , 0x02,//AWB_gain_delta
+ 0x61 , 0xaa,//R/G stand
+ 0x62 , 0xaa,//R/G stand
+ 0x71 , 0x00,
+ 0x74 , 0x10,//AWB_C_max
+ 0x77 , 0x08,//AWB_p2_x
+ 0x78 , 0xfd,//AWB_p2_y
+ 0x86 , 0x30,
+ 0x87 , 0x00,
+ 0x88 , 0x04,//[1]dark mode
+ 0x8a , 0xc0,//awb move mode
+ 0x89 , 0x75,
+ 0x84 , 0x08,//auto_window
+ 0x8b , 0x00,//awb compare luma
+ 0x8d , 0x70,//awb gain limit R
+ 0x8e , 0x70,//G
+ 0x8f , 0xf4,//B
+ /////////awb end /////////////
+
+ //AEC
+ 0xfe , 0x01,
+ 0x11 , 0x20,//AEC_out_slope , 0x
+ 0x1f , 0xc0,//max_post_gain
+ 0x20 , 0x60,//max_pre_gain
+ 0x47 , 0x30,//AEC_outdoor_th
+ 0x0b , 0x10,//
+ 0x13 , 0x88,//y_target 75
+
+
+ 0xfe , 0x00,
+ 0x05 , 0x01,
+ 0x06 , 0x23,
+ 0x07 , 0x00,
+ 0x08 , 0x14,
+ 0xfe , 0x01,
+ 0x27 , 0x00,
+ 0x28 , 0xaa,
+ 0x29 , 0x04,// level 0 13.75
+ 0x2a , 0xa6,
+ 0x2b , 0x04,// level 1 13.75
+ 0x2c , 0xa6,
+ 0x2d , 0x06,// level 2 10
+ 0x2e , 0xa4,
+ 0x2f , 0x08,// level 3 7.5
+ 0x30 , 0xa2,
+ 0xfe , 0x00,//
+ 0xb6 , 0x03,//AEC enable
+ 0xfe , 0x00,
+
+ /////////BLK//////
+ 0x3f , 0x00,//prc close
+ 0x40 , 0x77,//
+ 0x42 , 0x7f,
+ 0x43 , 0x30,
+ 0x5c , 0x08,
+ 0x5e , 0x20,
+ 0x5f , 0x20,
+ 0x60 , 0x20,
+ 0x61 , 0x20,
+ 0x62 , 0x20,
+ 0x63 , 0x20,
+ 0x64 , 0x20,
+ 0x65 , 0x20,
+
+ ///block////////////
+ 0x80 , 0xff,
+ 0x81 , 0x26,//38 //skin_Y 8c_debug
+ 0x87 , 0x90,//[7]middle gamma
+ 0x84 , 0x02,//output put foramat
+ 0x86 , 0x06,//02 //sync plority lanking
+ 0x8b , 0xbc,
+ 0xb0 , 0x80,//globle gain
+ 0xc0 , 0x40,//Yuv bypass
+
+ //////lsc/////////////
+#if 0
+ 0xfe , 0x01,
+ 0xc2 , 0x38,
+ 0xc3 , 0x25,
+ 0xc4 , 0x21,
+ 0xc8 , 0x19,
+ 0xc9 , 0x12,
+ 0xca , 0x0e,
+ 0xbc , 0x43,
+ 0xbd , 0x18,
+ 0xbe , 0x1b,
+ 0xb6 , 0x40,
+ 0xb7 , 0x2e,
+ 0xb8 , 0x26,
+ 0xc5 , 0x05,
+ 0xc6 , 0x03,
+ 0xc7 , 0x04,
+ 0xcb , 0x00,
+ 0xcc , 0x00,
+ 0xcd , 0x00,
+ 0xbf , 0x14,
+ 0xc0 , 0x22,
+ 0xc1 , 0x1b,
+ 0xb9 , 0x00,
+ 0xba , 0x05,
+ 0xbb , 0x05,
+ 0xaa , 0x35,
+ 0xab , 0x33,
+ 0xac , 0x33,
+ 0xad , 0x25,
+ 0xae , 0x22,
+ 0xaf , 0x27,
+ 0xb0 , 0x1d,
+ 0xb1 , 0x20,
+ 0xb2 , 0x22,
+ 0xb3 , 0x14,
+ 0xb4 , 0x15,
+ 0xb5 , 0x16,
+ 0xd0 , 0x00,
+ 0xd2 , 0x07,
+ 0xd3 , 0x08,
+ 0xd8 , 0x00,
+ 0xda , 0x13,
+ 0xdb , 0x17,
+ 0xdc , 0x00,
+ 0xde , 0x0a,
+ 0xdf , 0x08,
+ 0xd4 , 0x00,
+ 0xd6 , 0x00,
+ 0xd7 , 0x0c,
+ 0xa4 , 0x00,
+ 0xa5 , 0x00,
+ 0xa6 , 0x00,
+ 0xa7 , 0x00,
+ 0xa8 , 0x00,
+ 0xa9 , 0x00,
+ 0xa1 , 0x80,
+ 0xa2 , 0x80,
+#endif
+ 0xfe,0x01,
+ 0xa1,0x80, // center_row
+ 0xa2,0x80, // center_col
+ 0xa4,0x07, // sign of b1
+ 0xa5,0x00, // sign of b1
+ 0xa6,0x00, // sign of b4
+ 0xa7,0x00, // sign of b4
+ 0xa8,0x00, // sign of b22
+ 0xa9,0x07, // sign of b22
+ 0xaa,0x1e, // Q1_b1 of R
+ 0xab,0x49, // Q1_b1 of G
+ 0xac,0x1e, // Q1_b1 of B
+ 0xad,0x30, // Q2_b1 of R
+ 0xae,0x1c, // Q2_b1 of G
+ 0xaf,0x1b, // Q2_b1 of B
+ 0xb0,0x56, // Q3_b1 of R
+ 0xb1,0x88, // Q3_b1 of G
+ 0xb2,0x53, // Q3_b1 of B
+ 0xb3,0xff, // Q4_b1 of R
+ 0xb4,0xf8, // Q4_b1 of G
+ 0xb5,0xcb, // Q4_b1 of B
+ 0xb6,0x62, // right_b2 of R
+ 0xb7,0x19, // right_b2 of G
+ 0xb8,0x00, // right_b2 of B
+ 0xb9,0xff, // right_b4 of R
+ 0xba,0xff, // right_b4 of G
+ 0xbb,0xff, // right_b4 of B
+ 0xbc,0x67, // left_b2 of R
+ 0xbd,0x3a, // left_b2 of G
+ 0xbe,0x25, // left_b2 of B
+ 0xbf,0x65, // left_b4 of R
+ 0xc0,0x49, // left_b4 of G
+ 0xc1,0x60, // left_b4 of B
+ 0xc2,0x3f, // up_b2 of R
+ 0xc3,0x1b, // up_b2 of G
+ 0xc4,0x19, // up_b2 of B
+ 0xc5,0x45, // up_b4 of R
+ 0xc6,0x39, // up_b4 of G
+ 0xc7,0x19, // up_b4 of B
+ 0xc8,0x12, // down_b2 of R
+ 0xc9,0x02, // down_b2 of G
+ 0xca,0x00, // down_b2 of B
+ 0xcb,0xff, // down_b4 of R
+ 0xcc,0xff, // down_b4 of G
+ 0xcd,0xf3, // down_b4 of B
+ 0xd0,0xff, // right_up_b22 of R
+ 0xd2,0x3b, // right_up_b22 of G
+ 0xd3,0x7d, // right_up_b22 of B
+ 0xd4,0xff, // right_down_b22 of R
+ 0xd6,0xff, // right_down_b22 of G
+ 0xd7,0xff, // right_down_b22 of B
+ 0xd8,0xff, // left_up_b22 of R
+ 0xda,0x89, // left_up_b22 of G
+ 0xdb,0xa3, // left_up_b22 of B
+ 0xdc,0x1c, // left_down_b22 of R
+ 0xde,0x99, // left_down_b22 of G
+ 0xdf,0x27, // left_down_b22 of B
+ 0xfe,0x00,
+
+ //////////cc//////////////
+ 0xfe , 0x02,
+ 0xc0 , 0x01,
+ 0xc1 , 0x40,//Green_cc for d
+ 0xc2 , 0xfc,
+ 0xc3 , 0x05,
+ 0xc4 , 0xec,
+ 0xc5 , 0x42,
+ 0xc6 , 0xf8,
+ 0xc7 , 0x40,//for cwf
+ 0xc8 , 0xf8,
+ 0xc9 , 0x06,
+ 0xca , 0xfd,
+ 0xcb , 0x3e,
+ 0xcc , 0xf3,
+ 0xcd , 0x36,//for A
+ 0xce , 0xf6,
+ 0xcf , 0x04,
+ 0xe3 , 0x0c,
+ 0xe4 , 0x44,
+ 0xe5 , 0xe5,
+ 0xfe , 0x00,
+
+ ///==========asde
+ 0xfe , 0x01,
+ 0x21 , 0xbf,
+ 0xfe , 0x02,
+ 0xa4 , 0x00,
+ 0xa5 , 0x40,//lsc_th
+ 0xa2 , 0xa0,//lsc_dec_slope
+ 0xa6 , 0x80,//dd_th
+ 0xa7 , 0x80,//ot_th
+ 0xab , 0x31,
+ 0xa9 , 0x6f,
+ 0xb0 , 0x99,//edge effect slope low
+ 0xb1 , 0x34,//edge effect slope low
+ 0xb3 , 0x80,//saturation dec slope
+ 0xde , 0xb6,
+ 0x38 , 0x0f,
+ 0x39 , 0x60,
+ 0xfe , 0x00,
+ 0x81 , 0x26,
+ 0xfe , 0x02,
+ 0x83 , 0x00,
+ 0x84 , 0x45,
+ ////////////YCP//////////
+ 0xd1 , 0x38,//saturation_cb
+ 0xd2 , 0x38,//saturation_Cr
+ 0xd3 , 0x40,//contrast
+ 0xd4 , 0x80,//contrast center
+ 0xd5 , 0x00,//luma_offset
+ 0xdc , 0x30,
+ 0xdd , 0xb8,//edge_sa_g,b
+ 0xfe , 0x00,
+ //////////dndd///////////
+ 0xfe , 0x02,
+ 0x88 , 0x15,//dn_b_base
+ 0x8c , 0xf6,//[2]b_in_dark_inc
+ 0x89 , 0x03,//dn_c_weight
+ //////////EE ///////////
+ 0xfe , 0x02,
+ 0x90 , 0x6c,// EEINTP mode1
+ 0x97 , 0x45,// edge effect
+ ////==============RGB Gamma ////
+ 0xfe , 0x02,
+ 0x15 , 0x0a,
+ 0x16 , 0x12,
+ 0x17 , 0x19,
+ 0x18 , 0x1f,
+ 0x19 , 0x2c,
+ 0x1a , 0x38,
+ 0x1b , 0x42,
+ 0x1c , 0x4e,
+ 0x1d , 0x63,
+ 0x1e , 0x76,
+ 0x1f , 0x87,
+ 0x20 , 0x96,
+ 0x21 , 0xa2,
+ 0x22 , 0xb8,
+ 0x23 , 0xca,
+ 0x24 , 0xd8,
+ 0x25 , 0xe3,
+ 0x26 , 0xf0,
+ 0x27 , 0xf8,
+ 0x28 , 0xfd,
+ 0x29 , 0xff,
+ //// small RGB gamma////
+ /*
+ 0xfe , 0x02,
+ 0x15 , 0x0b,
+ 0x16 , 0x0e,
+ 0x17 , 0x10,
+ 0x18 , 0x12,
+ 0x19 , 0x19,
+ 0x1a , 0x21,
+ 0x1b , 0x29,
+ 0x1c , 0x31,
+ 0x1d , 0x41,
+ 0x1e , 0x50,
+ 0x1f , 0x5f,
+ 0x20 , 0x6d,
+ 0x21 , 0x79,
+ 0x22 , 0x91,
+ 0x23 , 0xa5,
+ 0x24 , 0xb9,
+ 0x25 , 0xc9,
+ 0x26 , 0xe1,
+ 0x27 , 0xee,
+ 0x28 , 0xf7,
+ 0x29 , 0xff,
+ */
+
+ ///=================y gamma
+ 0xfe , 0x02,
+ 0x2b , 0x00,
+ 0x2c , 0x04,
+ 0x2d , 0x09,
+ 0x2e , 0x18,
+ 0x2f , 0x27,
+ 0x30 , 0x37,
+ 0x31 , 0x49,
+ 0x32 , 0x5c,
+ 0x33 , 0x7e,
+ 0x34 , 0xa0,
+ 0x35 , 0xc0,
+ 0x36 , 0xe0,
+ 0x37 , 0xff,
+
+
+ //AWB clear
+ 0xfe , 0x01,
+ 0x4f , 0x00,
+ 0x4d , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x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x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4e , 0x00,
+ 0x4f , 0x01,
+ /////// awb value////////
+ 0xfe , 0x01,
+ 0x4f , 0x00,
+ 0x4d , 0x30,
+ 0x4e , 0x00,
+ 0x4e , 0x80,
+ 0x4e , 0x80,
+ 0x4e , 0x02,
+ 0x4e , 0x02,
+ 0x4d , 0x40,
+ 0x4e , 0x00,
+ 0x4e , 0x80,
+ 0x4e , 0x80,
+ 0x4e , 0x02,
+ 0x4e , 0x02,
+ 0x4e , 0x02,
+ 0x4d , 0x53,
+ 0x4e , 0x08,
+ 0x4e , 0x04,
+ 0x4d , 0x62,
+ 0x4e , 0x10,
+ 0x4d , 0x72,
+ 0x4e , 0x20,
+ 0x4f , 0x01,
+
+ /////1600x1200size//
+ 0xfe , 0x00,//
+ 0x90 , 0x01, ////crop enable
+ 0x95 , 0x04, ////1600x1200
+ 0x96 , 0xb0,
+ 0x97 , 0x06,
+ 0x98 , 0x40,
+
+ 0xfe , 0x03,
+ 0x17 , 0x00, //widv
+ 0x40 , 0x40, //00
+ 0x41 , 0x02, // Pclk_polarity
+ 0x42 , 0x40,
+ 0x43 , 0x06, //output buf width
+
+ ////output DVP/////
+ 0xfe , 0x00,
+ 0x82 , 0xfe,
+ 0xf2 , 0x70,
+ 0xf3 , 0xff,
+ 0xf4 , 0x00,
+ 0xf5 , 0x30,
+#if 0
+ 0xfe , 0x00 ,
+ 0x80 , 0x08 ,
+ 0x81 , 0x00 ,
+ 0x82 , 0x00 ,
+ 0xa3 , 0x80 ,
+ 0xa4 , 0x80 ,
+ 0xa5 , 0x80 ,
+ 0xa6 , 0x80 ,
+ 0xa7 , 0x80 ,
+ 0xa8 , 0x80 ,
+ 0xa9 , 0x80 ,
+ 0xaa , 0x80 ,
+ 0xad , 0x80 ,
+ 0xae , 0x80 ,
+ 0xaf , 0x80 ,
+ 0xb3 , 0x40 ,
+ 0xb4 , 0x40 ,
+ 0xb5 , 0x40 ,
+ 0xfe , 0x01 ,
+ 0x0a , 0x40 ,
+ 0x13 , 0x48 ,
+ 0x9f , 0x40 ,
+ 0xfe , 0x02 ,
+ 0xd0 , 0x40 ,
+ 0xd1 , 0x20 ,
+ 0xd2 , 0x20 ,
+ 0xd3 , 0x40 ,
+ 0xd5 , 0x00 ,
+ 0xdd , 0x00 ,
+ 0xfe , 0x00 ,
+#endif
+};
+
+uint8_t gc2035_default_regs_exit[]={
+ 0xfe, 0x00,
+ 0xf1, 0x00,
+ 0xf2, 0x00,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.c b/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.c
new file mode 100755
index 00000000..5369dd18
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.c
@@ -0,0 +1,388 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "gc2155.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x14
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ //CMOS_WIN_SIZE("QVGA", 320, 240, gc2155_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, gc2155_640_480_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, gc2155_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = gc2155_wb_auto;
+ size = ARRAY_SIZE(gc2155_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = gc2155_wb_incandescent;
+ size = ARRAY_SIZE(gc2155_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = gc2155_wb_daylight;
+ size = ARRAY_SIZE(gc2155_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = gc2155_wb_cloudy;
+ size = ARRAY_SIZE(gc2155_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = gc2155_wb_fluorescent;
+ size = ARRAY_SIZE(gc2155_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = gc2155_scene_mode_auto;
+ size = ARRAY_SIZE(gc2155_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = gc2155_scene_mode_night;
+ size = ARRAY_SIZE(gc2155_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = gc2155_exposure_neg6;
+ size = ARRAY_SIZE(gc2155_exposure_neg6);
+ break;
+ case -1:
+ regs = gc2155_exposure_neg3;
+ size = ARRAY_SIZE(gc2155_exposure_neg3);
+ break;
+ case 0:
+ regs = gc2155_exposure_zero;
+ size = ARRAY_SIZE(gc2155_exposure_zero);
+ break;
+ case 1:
+ regs = gc2155_exposure_pos3;
+ size = ARRAY_SIZE(gc2155_exposure_pos3);
+ break;
+ case 2:
+ regs = gc2155_exposure_pos6;
+ size = ARRAY_SIZE(gc2155_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_antibanding(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case 0:
+ regs = gc2155_antibanding_auto;
+ size = ARRAY_SIZE(gc2155_antibanding_auto);
+ break;
+ case 1:
+ regs = gc2155_antibanding_50hz;
+ size = ARRAY_SIZE(gc2155_antibanding_50hz);
+ break;
+ case 2:
+ regs = gc2155_antibanding_60hz;
+ size = ARRAY_SIZE(gc2155_antibanding_60hz);
+ break;
+ case 3:
+ regs = gc2155_antibanding_off;
+ size = ARRAY_SIZE(gc2155_antibanding_off);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0 ;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfe, 0x00); // set page0
+ data=sensor_read(sd, 0x17);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_CAMERA_ANTI_BANDING:
+ return sensor_s_antibanding(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ printk(KERN_DEBUG "%s, s_mbus_fmt width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ msleep(150);
+ //msleep(500);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0xf0) & 0xff) << 8;
+ data |= (sensor_read(sd, 0xf1) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, gc2155_default_regs_init,
+ ARRAY_SIZE(gc2155_default_regs_init));
+
+ msleep(100);
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, gc2155_default_regs_exit,
+ ARRAY_SIZE(gc2155_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops gc2155_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev gc2155 = {
+ .name = "gc2155",
+ .i2c_addr = 0x3c,
+ .id = 0x2155,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &gc2155_ops,
+};
+
+#if 0
+static int __init gc2155_init(void)
+{
+ return cmos_register_sudbdev(&gc2155);
+}
+
+static void __exit gc2155_exit(void)
+{
+ return cmos_unregister_subdev(&gc2155);
+}
+
+module_init(gc2155_init);
+module_exit(gc2155_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.h b/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.h
new file mode 100755
index 00000000..74d11e72
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/gc2155/gc2155.h
@@ -0,0 +1,1074 @@
+#ifndef GC2155_H
+#define GC2155_H
+
+
+// Scene Mode
+uint8_t gc2155_scene_mode_auto[] = {
+ 0xfe,0x01,
+
+ 0x3c,0x40,
+ 0xfe,0x00,
+};
+
+uint8_t gc2155_scene_mode_night[] = {
+ 0xfe,0x01,
+
+ 0x3c,0x60,
+ 0xfe,0x00,
+};
+
+uint8_t gc2155_wb_auto [] = {
+ 0xfe , 0x00,
+ 0x82 , 0xfe,
+};
+
+uint8_t gc2155_wb_incandescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xa8,
+
+};
+
+uint8_t gc2155_wb_fluorescent [] = {
+ 0xfe, 0x00,
+ 0x82, 0xfc,
+ 0xb3, 0x50,
+ 0xb4, 0x40,
+ 0xb5, 0xb8,
+};
+
+uint8_t gc2155_wb_daylight [] = {
+ 0xfe , 0x00,
+ 0x82 , 0xfc,
+ 0xb3 , 0x70,
+ 0xb4 , 0x40,
+ 0xb5 , 0x50,
+
+};
+
+uint8_t gc2155_wb_cloudy [] = {
+ 0xfe , 0x00,
+ 0x82 , 0xfc,
+ 0xb3 , 0x58,
+ 0xb4 , 0x40,
+ 0xb5 , 0x50,
+};
+
+
+// Exposure
+uint8_t gc2155_exposure_neg6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x10,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_exposure_neg3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x20,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_exposure_zero[] = {
+ 0xfe, 0x01,
+ 0x13, 0x30,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_exposure_pos3[] = {
+ 0xfe, 0x01,
+ 0x13, 0x40,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_exposure_pos6[] = {
+ 0xfe, 0x01,
+ 0x13, 0x50,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_antibanding_auto[] = {
+
+};
+
+uint8_t gc2155_antibanding_50hz[] = {
+
+};
+
+uint8_t gc2155_antibanding_60hz[] = {
+
+};
+
+uint8_t gc2155_antibanding_off[] = {
+
+};
+
+uint8_t gc2155_176_144_regs[]={
+
+};
+
+uint8_t gc2155_320_240_regs[]={
+
+};
+
+uint8_t gc2155_1280_720_regs[]= {
+#if defined(GC2155_SUBSAMPLE) //subsample for 720P
+ 0xfe , 0x00,
+ //0xfa , 0x11,
+ 0xb6 , 0x01,
+ 0xfd , 0x00,
+ //// crop window
+ 0xfe , 0x00,
+ 0x99 , 0x55,
+ 0x9a , 0x06,
+ 0x9b , 0x00,
+ 0x9c , 0x00,
+ 0x9d , 0x01,
+ 0x9e , 0x23,
+ 0x9f , 0x00,
+ 0xa0 , 0x00,
+ 0xa1 , 0x01,
+ 0xa2 , 0x23,
+
+ 0x90 , 0x01,
+ 0x91 , 0x00,
+ 0x92 , 0x78,
+ 0x93 , 0x00,
+ 0x94 , 0x00,
+ 0x95 , 0x02,
+ 0x96 , 0xd0,
+ 0x97 , 0x05,
+ 0x98 , 0x00,
+
+ //// AWB
+ 0xfe , 0x00,
+ 0xec , 0x02,
+ 0xed , 0x04,
+ 0xee , 0x60,
+ 0xef , 0x90,
+ 0xfe , 0x01,
+ 0x74 , 0x01,
+ //// AEC
+ 0xfe , 0x01,
+ 0x01 , 0x08,
+ 0x02 , 0xc0,
+ 0x03 , 0x04,
+ 0x04 , 0x90,
+ 0x05 , 0x30,
+ 0x06 , 0x98,
+ 0x07 , 0x28,
+ 0x08 , 0x6c,
+ 0x0a , 0xc2,
+ 0x21 , 0x15,
+ 0xfe , 0x00,
+ ///////banding setting 20fps fixed///
+ 0xfe , 0x00,
+ 0x03 , 0x03,
+ 0x04 , 0xe8,
+ 0x05 , 0x01,
+ 0x06 , 0x56,
+ 0x07 , 0x00,
+ 0x08 , 0x32,
+ 0xfe , 0x01,
+ 0x25 , 0x00,
+ 0x26 , 0xfa,
+ 0x27 , 0x04,
+ 0x28 , 0xe2, //20fps
+ 0x29 , 0x04,
+ 0x2a , 0xe2, //16fps 5dc
+ 0x2b , 0x04,
+ 0x2c , 0xe2, //16fps 6d6 5dc
+ 0x2d , 0x04,
+ 0x2e , 0xe2, //8fps bb8
+ 0x3c , 0x00, //8fps
+
+ 0xfe , 0x00,
+#else
+ ////////windowing 1280X720///////
+ 0xfe,0x00,
+ 0xb6,0x01,
+ 0xfd,0x00,//close scaler
+
+ //windowing setting
+ 0xfe,0x00,
+ 0x09,0x00,
+ 0x0a,0xf0, //row start (1280-720)/2
+ 0x0b,0x00,
+ 0x0c,0xa0, //col start (1600-1280)/2
+ 0x0d,0x02,
+ 0x0e,0xe0,//D8
+ 0x0f,0x05, //Window setting
+ 0x10,0x10, //18
+
+ 0x99,0x11,
+ 0x9a,0x06,
+ 0x9b,0x00,
+ 0x9c,0x00,
+ 0x9d,0x00,
+ 0x9e,0x00,
+ 0x9f,0x00,
+ 0xa0,0x00,
+ 0xa1,0x00,
+ 0xa2,0x00,
+
+ 0x90,0x01, //crop enable
+ 0x95,0x02,
+ 0x96,0xd0,
+ 0x97,0x05,
+ 0x98,0x00,
+
+ //// AWB
+ 0xfe , 0x00,
+ 0xec , 0x04,
+ 0xed , 0x02,
+ 0xee , 0x50,
+ 0xef , 0x5a,
+ 0xfe , 0x01,
+ 0x74 , 0x01,
+ //// AEC
+ 0xfe , 0x01,
+ 0x01,0x04,
+ 0x02,0x50,
+ 0x03,0x02,
+ 0x04,0x58,
+ 0x05,0x20,
+ 0x06,0x30,
+ 0x07,0x20,
+ 0x08,0x40,
+ 0x09,0x80,
+ 0x0a,0xc2,
+ 0x21,0x15,
+ 0xfe,0x00,
+
+ //banding setting
+#if 0 ///just fixed 20fps frame rate
+ 0xfe,0x00,
+ 0x03,0x04,
+ 0x04,0xe7,//N*STEP
+
+ 0x05,0x01,
+ 0x06,0xf1,//HB
+ 0x07,0x00,
+ 0x08,0x80,//VB
+ 0xfe,0x01,
+ 0x25,0x00,
+ 0x26,0xfb,//STEP
+ 0x27,0x04,
+ 0x28,0xe7,
+ 0x29,0x04,
+ 0x2a,0xe7,
+ 0x2b,0x04,
+ 0x2c,0xe7,
+ 0x2d,0x04,
+ 0x2e,0xe7,
+ 0x3c,0x00,
+ 0xfe,0x00,
+
+#endif
+
+/******720P high Frame Rate 16fps~32fps,start set***********************/
+ //banding setting
+ 0xfe,0x00,
+ 0x03,0x02,
+ 0x04,0x34,//N*STEP
+ 0x05,0x01,
+ 0x06,0x6e,//HB
+ 0x07,0x00,
+ 0x08,0x80,//VB
+ 0xfe,0x01,
+ 0x25,0x01,
+ 0x26,0x1a,//STEP
+
+ 0x27,0x03,
+ 0x28,0x4e,//lev 1 32fps
+
+ 0x29,0x04,
+ 0x2a,0x68,//lev 2 24fps
+
+ 0x2b,0x05,
+ 0x2c,0x82,//lev 3 20fps
+
+ 0x2d,0x06,
+ 0x2e,0x9c,//lev 4 16fps
+ 0x3c,0x00,
+ 0xfe,0x00,
+/////////if you set highest Frame Rate,please write 0x00 to 0x3c register//
+/******720P high Frame Rate 16fps~32fps,end set*************************/
+#endif
+};
+
+uint8_t gc2155_1600_1200_regs[]={
+ //SENSORDB("GC2155_Sensor_2M",
+ 0xfe , 0x00,
+ 0xb6 , 0x00,
+ 0xfa , 0x11,
+ 0xfd , 0x00,
+ //// crop window
+ 0xfe , 0x00,
+ 0x90 , 0x01,
+ 0x91 , 0x00,
+ 0x92 , 0x00,
+ 0x93 , 0x00,
+ 0x94 , 0x00,
+ 0x95 , 0x04,
+ 0x96 , 0xb0,
+ 0x97 , 0x06,
+ 0x98 , 0x40,
+ 0x99 , 0x11,
+ 0x9a , 0x06,
+
+ 0x9b , 0x00,
+ 0x9c , 0x00,
+ 0x9d , 0x00,
+ 0x9e , 0x00,
+ 0x9f , 0x00,
+ 0xa0 , 0x00,
+ 0xa1 , 0x00,
+ 0xa2 ,0x00,
+
+ //// AWB
+ 0xfe , 0x00,
+ 0xec , 0x02,
+ 0xed , 0x04,
+ 0xee , 0x60,
+ 0xef , 0x90,
+ 0xfe , 0x01,
+ 0x74 , 0x01,
+ //// AEC
+ 0xfe , 0x01,
+ 0x01 , 0x08,
+ 0x02 , 0xc0,
+ 0x03 , 0x04,
+ 0x04 , 0x90,
+ 0x05 , 0x30,
+ 0x06 , 0x98,
+ 0x07 , 0x28,
+ 0x08 , 0x6c,
+ 0x0a , 0xc2,
+ 0x21 , 0x15, //if 0xfa=11,then 0x21=15;else if 0xfa=00,then 0x21=14
+ 0xfe , 0x00,
+ //// gamma
+ 0xfe , 0x00,
+ 0xc3 , 0x00, //if shutter/2 when capture,then exp_gamma_th/2
+ 0xc4 , 0x90,
+ 0xc5 , 0x98,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2155_800_600_regs[]= {
+ //SENSORDB("GC2155_Sensor_SVGA",
+ 0xfe , 0x00,
+ 0xb6 , 0x01,
+ 0xfa , 0x00,
+ 0xfd , 0x01,
+
+////window setting/////
+ 0x09 , 0x00,
+ 0x0a , 0x00,
+ 0x0b , 0x00,
+ 0x0c , 0x00,
+ 0x0d , 0x04,
+ 0x0e , 0xc0,
+ 0x0f , 0x06,
+ 0x10 , 0x50,
+
+ //// crop window
+ 0xfe , 0x00,
+ 0x90 , 0x01,
+ 0x91 , 0x00,
+ 0x92 , 0x00,
+ 0x93 , 0x00,
+ 0x94 , 0x00,
+ 0x95 , 0x02,
+ 0x96 , 0x58,
+ 0x97 , 0x03,
+ 0x98 , 0x20,
+ 0x99 , 0x11,
+ 0x9a , 0x06,
+ 0x9b , 0x00,
+ 0x9c , 0x00,
+ 0x9d , 0x00,
+ 0x9e , 0x00,
+ 0x9f , 0x00,
+ 0xa0 , 0x00,
+ 0xa1 , 0x00,
+ 0xa2 ,0x00,
+
+ //// AWB
+ 0xfe , 0x00,
+ 0xec , 0x01,
+ 0xed , 0x02,
+ 0xee , 0x30,
+ 0xef , 0x48,
+ 0xfe , 0x01,
+ 0x74 , 0x00,
+ //// AEC
+ 0xfe , 0x01,
+ 0x01 , 0x04,
+ 0x02 , 0x60,
+ 0x03 , 0x02,
+ 0x04 , 0x48,
+ 0x05 , 0x18,
+ 0x06 , 0x4c,
+ 0x07 , 0x14,
+ 0x08 , 0x36,
+ 0x0a , 0xc0,
+ 0x21 , 0x14,
+ 0xfe , 0x00,
+ //// gamma
+ 0xfe , 0x00,
+ 0xc3 , 0x11,
+ 0xc4 , 0x20,
+ 0xc5 , 0x30,
+ 0xfe , 0x00,
+
+//////////////frame rate 50Hz/////////
+#if 1
+ 0xfe , 0x00,
+ 0x05 , 0x01,
+ 0x06 , 0x56,
+ 0x07 , 0x00,
+ 0x08 , 0x32,
+ 0xfe , 0x01,
+ 0x25 , 0x00,
+ 0x26 , 0xfa,
+ 0x27 , 0x04,
+ 0x28 , 0xe2, //20fps
+ 0x29 , 0x06,
+ 0x2a , 0xd6, //16fps
+ 0x2b , 0x07,
+ 0x2c , 0xd0, //12fps
+ 0x2d , 0x0b,
+ 0x2e , 0xb8, //8fps
+ 0xfe , 0x00,
+#else
+ //////////////frame rate 50Hz
+ 0xfe, 0x00,
+ 0x05, 0x02,
+ 0x06, 0x2d,
+ 0x07, 0x00,
+ 0x08, 0xa0,
+ 0xfe, 0x01,
+ 0x25, 0x00,
+ 0x26, 0xd4,
+ 0x27, 0x04,
+ 0x28, 0xf8,
+ 0x29, 0x08,
+ 0x2a, 0x48,
+ 0x2b, 0x0a,
+ 0x2c, 0xc4,
+ 0x2d, 0x0f,
+ 0x2e, 0xbc,
+ 0xfe, 0x00,
+#endif
+
+};
+
+uint8_t gc2155_640_480_regs[]= {
+ 0xfe , 0x00,
+ 0xfa , 0x00,
+ 0xfd , 0x01,
+ 0xb6 , 0x01,
+ //// crop window
+ 0xfe , 0x00,
+ 0x99 , 0x55,
+ 0x9a , 0x06,
+ 0x9b , 0x01,
+ 0x9c , 0x34,
+ 0x9d , 0x00,
+ 0x9e , 0x00,
+ 0x9f , 0x01,
+ 0xa0 , 0x34,
+ 0xa1 , 0x00,
+ 0xa2 ,0x00,
+ 0x90 , 0x01, //crop enable
+ 0x91 , 0x00,
+ 0x92 , 0x00,
+ 0x93 , 0x00,
+ 0x94 , 0x00,
+ 0x95 , 0x01,
+ 0x96 , 0xe0,
+ 0x97 , 0x02,
+ 0x98 , 0x80,
+
+ //// AWB
+ 0xfe , 0x00,
+ 0xec , 0x01,
+ 0xed , 0x02,
+ 0xee , 0x30,
+ 0xef , 0x48,
+ 0xfe , 0x01,
+ 0x74 , 0x00,
+ //// AEC
+ 0xfe , 0x01,
+ 0x01 , 0x04,
+ 0x02 , 0x60,
+ 0x03 , 0x02,
+ 0x04 , 0x48,
+ 0x05 , 0x18,
+ 0x06 , 0x4c,
+ 0x07 , 0x14,
+ 0x08 , 0x36,
+ 0x0a , 0xc0,
+ 0x21 , 0x14,
+ 0xfe , 0x00,
+};
+
+uint8_t gc2155_default_regs_init[] = {
+ 0xfe, 0xf0,
+ 0xfe, 0xf0,
+ 0xfe, 0xf0,
+ 0xfc, 0x06,
+ 0xf6, 0x00,
+ 0xf7, 0x1d,
+ 0xf8, 0x84,
+ 0xfa, 0x00,
+ 0xf9, 0xfe,
+ 0xf2, 0x0f,
+ ////////////////////////////////////////////////////
+ ////////////////// Analog & Cisctl ////////////////
+ ////////////////////////////////////////////////////
+ 0xfe, 0x00,
+ 0x03, 0x04,
+ 0x04, 0x00,
+ 0x05, 0x01,
+ 0x06, 0x68,
+ 0x09, 0x00,
+ 0x0a, 0x00,
+ 0x0b, 0x00,
+ 0x0c, 0x00,
+ 0x0d, 0x04,
+ 0x0e, 0xc0,
+ 0x0f, 0x06,
+ 0x10, 0x52,
+ 0x12, 0x2e,
+ 0x17, 0x14,
+ 0x18, 0x02,
+ 0x19, 0x0f,
+ 0x1a, 0x01,
+ 0x1b, 0x4b,
+ 0x1c, 0x07,
+ 0x1d, 0x10,
+ 0x1e, 0x98,
+ 0x1f, 0x78,
+ 0x20, 0x03,
+ 0x21, 0x40,
+ 0x22, 0xB0,
+ 0x24, 0x16,
+ 0x25, 0x01,
+ 0x26, 0x10,
+ 0x2d, 0x40,
+ 0x30, 0x01,
+ 0x33, 0x01,
+ 0x34, 0x01,
+ /////////////////////////////////////////////////
+ ////////////////// ISP reg //////////////////////
+ ////////////////////////////////////////////////////
+ 0x80, 0xff,
+ 0x81, 0x24,
+ 0x82, 0xfE,
+ 0x83, 0x00,
+ 0x84, 0x02,
+ 0x86, 0x02,
+ 0x88, 0x03,
+ 0x89, 0x03,
+ 0x85, 0x30,
+ 0x8a, 0x00,
+ 0x8b, 0x00,
+ 0xb0, 0x50,
+ 0xc3, 0x00,
+ 0xc4, 0x18,
+ 0xc5, 0x20,
+ 0xc6, 0x38,
+ 0xc7, 0x40,
+ 0xec, 0x06,
+ 0xed, 0x04,
+ 0xee, 0x60,
+ 0xef, 0x90,
+ 0xb6, 0x01,
+ 0x90, 0x01,
+ 0x91, 0x00,
+ 0x92, 0x00,
+ 0x93, 0x00,
+ 0x94, 0x00,
+ 0x95, 0x04,
+ 0x96, 0xb0,
+ 0x97, 0x06,
+ 0x98, 0x40,
+
+ ///////////////////////////////////////////////
+ /////////// BLK ////////////////////////
+ ///////////////////////////////////////////////
+ 0x18, 0x02,
+ 0x40, 0x42,
+ 0x41, 0x00,
+ 0x43, 0x54,
+ 0x5e, 0x00,
+ 0x5f, 0x00,
+ 0x60, 0x00,
+ 0x61, 0x00,
+ 0x62, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x00,
+ 0x65, 0x00,
+ 0x66, 0x20,
+ 0x67, 0x20,
+ 0x68, 0x20,
+ 0x69, 0x20,
+ 0x6a, 0x00,
+ 0x6b, 0x00,
+ 0x6c, 0x00,
+ 0x6d, 0x00,
+ 0x6e, 0x00,
+ 0x6f, 0x00,
+ 0x70, 0x00,
+ 0x71, 0x00,
+ 0x72, 0xf0,
+ 0x7e, 0x3c,
+ 0x7f, 0x00,
+ 0xfe, 0x02,
+ 0x49, 0x04,
+ 0xfe, 0x00,
+ ///////////////////////////////////////////////
+ /////////// AEC ////////////////////////
+ ///////////////////////////////////////////////
+ 0xfe, 0x01,
+ 0x01, 0x04,
+ 0x02, 0xc0,
+ 0x03, 0x04,
+ 0x04, 0x90,
+ 0x05, 0x30,
+ 0x06, 0x90,
+ 0x07, 0x20,
+ 0x08, 0x70,
+ 0x09, 0x00,
+ 0x0a, 0xc2,
+ 0x0b, 0x11,
+ 0x0c, 0x00,
+ 0x13, 0x30,
+ 0x17, 0x00,
+ 0x1c, 0x11,
+ 0x1e, 0x61,
+ 0x1f, 0x30,
+ 0x20, 0x40,
+ 0x22, 0x80,
+ 0x23, 0x20,
+ 0x12, 0x35,
+ 0x15, 0x50,
+ 0x10, 0x31,
+ 0x3e, 0x28,
+ 0x3f, 0xe0,
+ 0x40, 0xe0,
+ 0x41, 0x0f,
+
+ /////////////////////////////
+ //////// INTPEE /////////////
+ /////////////////////////////
+ 0xfe, 0x02,
+ 0x90, 0x6c,
+ 0x91, 0x02,
+ 0x92, 0x44,
+ 0x97, 0x36,
+ 0xa2, 0x11,
+ 0xfe, 0x00,
+
+ /////////////////////////////
+ //////// DNDD///////////////
+ /////////////////////////////
+ 0xfe, 0x02,
+ 0x80, 0xe1,
+ 0x81, 0x08,
+ 0x82, 0x05,
+ 0x83, 0x1f,
+ 0x84, 0x0a,
+ 0x86, 0x50,
+ 0x87, 0x30,
+ 0x88, 0x15,
+ 0x89, 0x60,
+ 0x8a, 0x40,
+ 0x8b, 0x20,
+
+ ///////////////////////////////////////////////
+ /////////// ASDE ////////////////////////
+ ///////////////////////////////////////////////
+ 0xfe, 0x01,
+ 0x21, 0x14,
+ 0xfe, 0x02,
+ 0x4b, 0x00,
+ 0xa3, 0x40,
+ 0xa4, 0x20,
+ 0xa5, 0x10,
+ 0xa6, 0x20,
+ 0xab, 0x40,
+ 0xae, 0x0c,
+ 0xb3, 0x42,
+ 0xb4, 0x24,
+ 0xb6, 0x40,
+ 0xb7, 0x01,
+ 0xb9, 0x32,
+ 0xfe, 0x00,
+
+ ///////////////////gamma1////////////////////
+ ////Gamma
+ 0xfe, 0x02,
+ 0x10, 0x06,
+ 0x11, 0x0d,
+ 0x12, 0x15,
+ 0x13, 0x1b,
+ 0x14, 0x2a,
+ 0x15, 0x38,
+ 0x16, 0x48,
+ 0x17, 0x55,
+ 0x18, 0x6b,
+ 0x19, 0x7e,
+ 0x1a, 0x92,
+ 0x1b, 0xa3,
+ 0x1c, 0xaf,
+ 0x1d, 0xc5,
+ 0x1e, 0xd5,
+ 0x1f, 0xe0,
+ 0x20, 0xe7,
+ 0x21, 0xee,
+ 0x22, 0xf1,
+ 0x23, 0xf8,
+ 0x24, 0xfd,
+ 0x25, 0xff,
+
+ ///////////////////gamma2////////////////////
+ ////Gamma
+ 0xfe, 0x02,
+ 0x26, 0x06,
+ 0x27, 0x10,
+ 0x28, 0x18,
+ 0x29, 0x1d,
+ 0x2a, 0x26,
+ 0x2b, 0x2d,
+ 0x2c, 0x33,
+ 0x2d, 0x3a,
+ 0x2e, 0x45,
+ 0x2f, 0x50,
+ 0x30, 0x5a,
+ 0x31, 0x62,
+ 0x32, 0x6b,
+ 0x33, 0x7b,
+ 0x34, 0x8a,
+ 0x35, 0x99,
+ 0x36, 0xa7,
+ 0x37, 0xb4,
+ 0x38, 0xbf,
+ 0x39, 0xd7,
+ 0x3a, 0xec,
+ 0x3b, 0xff,
+
+ ///////////////////////////////////////////////
+ /////////// YCP ///////////////////////
+ ///////////////////////////////////////////////
+ 0xfe, 0x02,
+ 0xd1, 0x28,
+ 0xd2, 0x28,
+ 0xdd, 0x14,
+ 0xde, 0x84,
+
+ ////////////////////////////
+ //////// LSC ///////////////
+ ////////////////////////////
+ 0xfe, 0x01,
+ 0xc2, 0x13,
+ 0xc3, 0x05,
+ 0xc4, 0x01,
+ 0xc8, 0x10,
+ 0xc9, 0x0b,
+ 0xca, 0x06,
+ 0xbc, 0x34,
+ 0xbd, 0x21,
+ 0xbe, 0x16,
+ 0xb6, 0x2d,
+ 0xb7, 0x20,
+ 0xb8, 0x19,
+ 0xc5, 0x0b,
+ 0xc6, 0x29,
+ 0xc7, 0x1d,
+ 0xcb, 0x0b,
+ 0xcc, 0x15,
+ 0xcd, 0x16,
+ 0xbf, 0x11,
+ 0xc0, 0x03,
+ 0xc1, 0x04,
+ 0xb9, 0x0f,
+ 0xba, 0x00,
+ 0xbb, 0x06,
+ 0xaa, 0x00,
+ 0xab, 0x00,
+ 0xac, 0x00,
+ 0xad, 0x00,
+ 0xae, 0x00,
+ 0xaf, 0x00,
+ 0xb0, 0x1b,
+ 0xb1, 0x1e,
+ 0xb2, 0x16,
+ 0xb3, 0x00,
+ 0xb4, 0x00,
+ 0xb5, 0x00,
+ 0xd0, 0x2c,
+ 0xd1, 0x24,
+ 0xd2, 0x18,
+ 0xd6, 0x24,
+ 0xd7, 0x1d,
+ 0xd8, 0x08,
+ 0xd9, 0x62,
+ 0xda, 0x63,
+ 0xdb, 0x48,
+ 0xd3, 0x1f,
+ 0xd4, 0x21,
+ 0xd5, 0x11,
+ 0xa4, 0x00,
+ 0xa5, 0x00,
+ 0xa6, 0x56,
+ 0xa7, 0x00,
+ 0xa8, 0x77,
+ 0xa9, 0x77,
+ 0xa1, 0x80,
+ 0xa2, 0x80,
+
+ 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
+ 0xfe, 0x01,
+ 0x50, 0x80,
+ 0x51, 0x9c,
+ 0x52, 0x63,
+ 0x53, 0x38,
+ 0x54, 0xc7,
+ 0x56, 0x06,
+ 0x58, 0x08,
+ 0x5b, 0x00,
+ 0x5c, 0x74,
+ 0x5d, 0x8b,
+ 0x63, 0xa4,
+ 0x65, 0x04,
+ 0x67, 0xb2,
+ 0x68, 0xac,
+ 0x69, 0x00,
+ 0x6a, 0xb2,
+ 0x6b, 0xac,
+ 0x6c, 0xb2,
+ 0x6d, 0xac,
+ 0x6e, 0x40,
+ 0x6f, 0x50,
+ 0x73, 0xe0,
+ 0x70, 0x10,
+ 0x71, 0xe0,
+ 0x74, 0x01,
+ 0x75, 0x01,
+ 0x7f, 0x08,
+ 0x76, 0x70,
+ 0x77, 0x58,
+ 0x78, 0xd8,
+ 0xfe, 0x00,
+
+ //////////////////////////////////////////
+ /////////// CC ////////////////////////
+ //////////////////////////////////////////
+ 0xfe, 0x02,
+ 0xc0, 0x01,
+ 0xc1, 0x50,
+ 0xc2, 0x00,
+ 0xc3, 0x00,
+ 0xc4, 0xf0,
+ 0xc5, 0x45,
+ 0xc6, 0xf0,
+ 0xc7, 0x40,
+ 0xc8, 0x00,
+ 0xc9, 0x00,
+ 0xca, 0x00,
+ 0xcb, 0x40,
+ 0xcc, 0x00,
+ 0xcd, 0x40,
+ 0xce, 0x00,
+ 0xcf, 0x00,
+ 0xe3, 0x00,
+ 0xe4, 0x40,
+ 0xe5, 0x00,
+ 0xfe, 0x00,
+ 0xf2, 0x0f,
+
+ //////////////////////////////////////////
+ /////////// BUF ////////////////////////
+ //////////////////////////////////////////
+ 0xfe, 0x03,
+ 0x40, 0x00,
+ 0x41, 0x00,
+ 0x42, 0x40,
+ 0x43, 0x06,
+ 0x04, 0x20,
+ 0x06, 0x00,
+ 0x17, 0xe0,
+ 0xfe, 0x00,
+
+ //////////////frame rate 50Hz
+ 0xfe, 0x00,
+ 0x05, 0x02,
+ 0x06, 0x2d,
+ 0x07, 0x00,
+ 0x08, 0xa0,
+ 0xfe, 0x01,
+ 0x25, 0x00,
+ 0x26, 0xd4,
+ 0x27, 0x04,
+ 0x28, 0xf8,
+ 0x29, 0x08,
+ 0x2a, 0x48,
+ 0x2b, 0x0b,
+ 0x2c, 0x98,
+ 0x2d, 0x0f,
+ 0x2e, 0xbc,
+ 0xfe, 0x00,
+};
+
+uint8_t gc2155_default_regs_exit[]={
+
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-bk-wave7.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-bk-wave7.h
new file mode 100755
index 00000000..27f406c0
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-bk-wave7.h
@@ -0,0 +1,2147 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ //0x11,0x2e,
+ 0x83,0x52, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x23, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x26,
+ 0x82,0x44,
+ 0x83,0x2f,
+ 0x84,0x24,
+ 0x85,0x4a,
+ 0x86,0x40,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x85,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00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0x55, // CSUM2
+ 0x43, 0xf0,
+ 0x44, 0x66,
+ 0x45, 0x33,
+ 0x46, 0x01, // WHTPXLTH1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0e, //BLC_TIME_TH_ON
+0x91, 0x0e, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x00,
+0xa2, 0x00,
+0xa4, 0x00,
+0xa6, 0x00,
+//Normal BLC
+0xa8, 0x42,
+0xaa, 0x42,
+0xac, 0x42,
+0xae, 0x42,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x11,
+0x2f, 0xa1,
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0x74, 0x89,
+0x75, 0x96,
+0x76, 0x89,
+0x77, 0x96,
+0x7c, 0x85,
+0x7d, 0xaf,
+0x80, 0x01,
+0x81, 0x7f,
+0x82, 0x13,
+0x83, 0x24,
+0x84, 0x7d,
+0x85, 0x81,
+0x86, 0x7d,
+0x87, 0x81,
+0x88, 0xab,
+0x89, 0xbc,
+0x8a, 0xac,
+0x8b, 0xba,
+0x8c, 0xad,
+0x8d, 0xb8,
+0x8e, 0xae,
+0x8f, 0xb2,
+0x90, 0xb3,
+0x91, 0xb7,
+0x92, 0x48,
+0x93, 0x54,
+0x94, 0x7d,
+0x95, 0x81,
+0x96, 0x7d,
+0x97, 0x81,
+0xa0, 0x02,
+0xa1, 0x7b,
+0xa2, 0x02,
+0xa3, 0x7b,
+0xa4, 0x7b,
+0xa5, 0x02,
+0xa6, 0x7b,
+0xa7, 0x02,
+0xa8, 0x85,
+0xa9, 0x8c,
+0xaa, 0x85,
+0xab, 0x8c,
+0xac, 0x10,
+0xad, 0x16,
+0xae, 0x10,
+0xaf, 0x16,
+0xb0, 0x99,
+0xb1, 0xa3,
+0xb2, 0xa4,
+0xb3, 0xae,
+0xb4, 0x9b,
+0xb5, 0xa2,
+0xb6, 0xa6,
+0xb7, 0xac,
+0xb8, 0x9b,
+0xb9, 0x9f,
+0xba, 0xa6,
+0xbb, 0xaa,
+0xbc, 0x9b,
+0xbd, 0x9f,
+0xbe, 0xa6,
+0xbf, 0xaa,
+0xc4, 0x2c,
+0xc5, 0x43,
+0xc6, 0x63,
+0xc7, 0x79,
+0xc8, 0x2d,
+0xc9, 0x42,
+0xca, 0x2d,
+0xcb, 0x42,
+0xcc, 0x64,
+0xcd, 0x78,
+0xce, 0x64,
+0xcf, 0x78,
+0xd0, 0x0a,
+0xd1, 0x09,
+0xd2, 0x20,
+0xd3, 0x00,
+0xd4, 0x0e, //DCDC_TIME_TH_ON don't touch
+0xd5, 0x0e, //DCDC_TIME_TH_OFF don't touch
+0xd6, 0x78, //DCDC_AG_TH_ON 78
+0xd7, 0x70, //DCDC_AG_TH_OFF 70
+0xe0, 0xc4,
+0xe1, 0xc4,
+0xe2, 0xc4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x85, // YOFS
+0x41, 0x00, // DYOFS
+0x48, 0x95,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x75, //7e //8e //88 //70
+0x62, 0x7e, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x31, // Double_AG 31->20
+0x27, 0x34, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+0x3e, 0x80,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+
+0x42, 0x80,
+0x43, 0x18,
+0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x20,
+0x58, 0x20,
+0x59, 0x30,
+0x5a, 0x18,
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x50,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xe6,
+0x51, 0x80,
+//Dark1 th
+0x52, 0xb0,
+0x53, 0x60,
+0x54, 0xc0,
+0x55, 0xc0,
+0x56, 0xc0,
+0x57, 0xa0,
+//Dark2 th
+0x58, 0x90,
+0x59, 0x40,
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xe0,
+0x5d, 0xa0,
+
+//Dark3 th
+0x5e, 0x88,
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe6,
+0x62, 0xe6,
+0x63, 0xb0,
+
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x14,
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x04,
+0x24, 0x09,
+0x25, 0x08,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+
+//Low clip th
+0x2b, 0x06,
+0x2c, 0x06,
+0x25, 0x08,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+
+//Out2 Edge
+0x50, 0x10,
+0x51, 0x14,
+0x52, 0x10,
+0x53, 0x0c,
+0x54, 0x0f,
+0x55, 0x0c,
+
+//Out1 Edge
+0x56, 0x10,
+0x57, 0x13,
+0x58, 0x10,
+0x59, 0x0c,
+0x5a, 0x0f,
+0x5b, 0x0c,
+
+//Indoor Edge
+0x5c, 0x0a,
+0x5d, 0x0b,
+0x5e, 0x0a,
+0x5f, 0x08,
+0x60, 0x09,
+0x61, 0x08,
+
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x08,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x06,
+0x67, 0x06,
+
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x01,
+0x90, 0x15,
+0x91, 0x15,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x30,
+0x99, 0x30,
+
+0xa0, 0x04,
+0xa1, 0x05,
+0xa2, 0x04,
+0xa3, 0x05,
+0xa4, 0x07,
+0xa5, 0x08,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+
+//Out2
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+
+//Out1
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+
+//Indoor
+0xbc, 0x17,
+0xbd, 0x17,
+0xbe, 0x17,
+0xbf, 0x07,
+0xc0, 0x07,
+0xc1, 0x07,
+
+//Dark1
+0xc2, 0x0e,
+0xc3, 0x02,
+0xc4, 0x00,
+0xc5, 0x0e,
+0xc6, 0x02,
+0xc7, 0x00,
+
+//Dark2
+0xc8, 0x18,
+0xc9, 0x05,
+0xca, 0x05,
+0xcb, 0x18,
+0xcc, 0x05,
+0xcd, 0x05,
+
+//Dark3
+0xce, 0x18,
+0xcf, 0x05,
+0xd0, 0x05,
+0xd1, 0x18,
+0xd2, 0x05,
+0xd3, 0x05,
+
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x78,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x37,//AG_ON
+0x19, 0x36,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+//GMA
+0x30, 0x00,
+0x31, 0x08,
+0x32, 0x1f,
+0x33, 0x35,
+0x34, 0x55,
+0x35, 0x73,
+0x36, 0x86,
+0x37, 0x96,
+0x38, 0xa6,
+0x39, 0xb6,
+0x3a, 0xc5,
+0x3b, 0xd0,
+0x3c, 0xd8,
+0x3d, 0xe0,
+0x3e, 0xe8,
+0x3f, 0xf0,
+0x40, 0xf7,
+0x41, 0xfd,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x05,
+0x52, 0x1b,
+0x53, 0x36,
+0x54, 0x5a,
+0x55, 0x75,
+0x56, 0x89,
+0x57, 0x9c,
+0x58, 0xac,
+0x59, 0xb8,
+0x5a, 0xc7,
+0x5b, 0xd2,
+0x5c, 0xdc,
+0x5d, 0xe5,
+0x5e, 0xed,
+0x5f, 0xf2,
+0x60, 0xf7,
+0x61, 0xf9,
+0x62, 0xfa,
+//BGMA
+0x70, 0x00,
+0x71, 0x0a,
+0x72, 0x19,
+0x73, 0x31,
+0x74, 0x55,
+0x75, 0x6e,
+0x76, 0x83,
+0x77, 0x96,
+0x78, 0xa6,
+0x79, 0xb5,
+0x7a, 0xc2,
+0x7b, 0xcd,
+0x7c, 0xd7,
+0x7d, 0xe0,
+0x7e, 0xe8,
+0x7f, 0xf0,
+0x80, 0xf6,
+0x81, 0xfc,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+/*
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xe8,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+*/
+
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6a,
+0x65, 0xa9,
+0x66, 0x6b,//eb
+0x67, 0xe9,//eb
+0x68, 0x6b,//eb
+0x69, 0xe9,//eb
+0x6a, 0x6a,
+0x6b, 0xa9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+
+0x70, 0x70, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x01, //EXP Normal 33.33 fps
+0x84, 0x5f,
+0x85, 0x90,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x06, //EXP Max 8.33 fps
+0x89, 0x68,
+0x8a, 0xa0,
+0x8B, 0x75, //EXP100
+0x8C, 0x30,
+0x8D, 0x61, //EXP120
+0x8E, 0xa8,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xa3, 0x00, //Outdoor Int
+0xa4, 0x61,
+
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x52,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x23,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x7f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-jfs0672-clw-gt7305.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-jfs0672-clw-gt7305.h
new file mode 100755
index 00000000..a53d3783
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-jfs0672-clw-gt7305.h
@@ -0,0 +1,2159 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x08,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ 0x11,0x2e,
+ 0x83,0x53, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x25, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x4d,
+ 0x83,0x25,
+ 0x84,0x1b,
+ 0x85,0x55,
+ 0x86,0x48,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x80,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_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 0xb5, 0x44,
+ 0xb6, 0x2f,
+ 0xb7, 0x28,
+ 0xb8, 0x25,
+ 0xb9, 0x22,
+ 0xba, 0x21,
+ 0xbb, 0x20,
+ 0xbc, 0x1f,
+ 0xbd, 0x1f,
+ 0xc0, 0x30,
+ 0xc1, 0x20,
+ 0xc2, 0x20,
+ 0xc3, 0x20,
+ 0xc4, 0x08,
+ 0xc8, 0x60,
+ 0xc9, 0x40,
+
+ //Page 22
+ 0x03, 0x22, // Page 22
+ 0x10, 0xfd, // AWBCTL1
+ 0x11, 0x2e, // AWBCTL2
+ 0x19, 0x01,
+ 0x20, 0x30,
+ 0x21, 0x80,
+ 0x23, 0x08,
+ 0x24, 0x01,
+
+ 0x30, 0x80, // ULVL
+ 0x31, 0x80, // VLVL
+ 0x38, 0x11, // UVTH1
+ 0x39, 0x34, // UVTH2
+ 0x40, 0xf7, // YRANGE
+
+ 0x41, 0x77, // CDIFF
+ 0x42, 0x55, // CSUM2
+ 0x43, 0xf0,
+ 0x44, 0x66,
+ 0x45, 0x33,
+ 0x46, 0x01, // WHTPXLTH1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x04, //PLL On
+0x0e, 0x74, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0c, //BLC_TIME_TH_ON
+0x91, 0x0c, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x08,
+0xa2, 0x08,
+0xa4, 0x08,
+0xa6, 0x08,
+//Normal BLC
+0xa8, 0x40,
+0xaa, 0x40,
+0xac, 0x40,
+0xae, 0x40,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x00, //11
+0x2f, 0x00, //a1
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97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0x42,
+0xcc, 0x64,
+0xcd, 0x78,
+0xce, 0x64,
+0xcf, 0x78,
+0xd0, 0x0a,
+0xd1, 0x09,
+0xd2, 0x20,
+0xd3, 0x00,
+0xd4, 0x0c, //DCDC_TIME_TH_ON don't touch
+0xd5, 0x0c, //DCDC_TIME_TH_OFF don't touch
+0xd6, 0x78, //DCDC_AG_TH_ON 78
+0xd7, 0x70, //DCDC_AG_TH_OFF 70
+0xe0, 0xc4,
+0xe1, 0xc4,
+0xe2, 0xc4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x80, // YOFS
+0x41, 0x08, // DYOFS
+0x48, 0x7b,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x64, //7e //8e //88 //70
+0x62, 0x70, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x51, // Double_AG 31->20
+0x27, 0x54, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+ 0x3e, 0x90,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+0x42, 0x80,
+0x43, 0x18,
+ 0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x01,
+0x58, 0x00,
+0x59, 0x00,
+0x5a, 0x1f, //18
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x60,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xa0,
+0x51, 0x80,
+//Dark1 th
+0x52, 0x00, //b0
+0x53, 0x50, //60
+0x54, 0xd4, //c0
+0x55, 0xc0, //c0
+0x56, 0x70, //b0
+0x57, 0xec, //70
+//Dark2 th
+0x58, 0x60, //90
+0x59, 0x40, //
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xc0,
+0x5d, 0x9b, //70
+//Dark3 th
+0x5e, 0x70,//88
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe0,
+0x62, 0xe0,
+0x63, 0xb4,//80
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x00, //14
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x05,
+0x24, 0x09,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+//Low clip th
+0x2b, 0x01, //Out2 02
+0x2c, 0x01, //Out1 02
+0x25, 0x06,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+//Out2 Edge
+0x50, 0x18,
+0x51, 0x1c,
+0x52, 0x1b,
+0x53, 0x15,
+0x54, 0x18,
+0x55, 0x15,
+//Out1 Edge
+0x56, 0x18,
+0x57, 0x1c,
+0x58, 0x1b,
+0x59, 0x15,
+0x5a, 0x18,
+0x5b, 0x15,
+//Indoor Edge
+0x5c, 0x0f,//0b
+0x5d, 0x21,//21
+0x5e, 0x1c,//0a
+0x5f, 0x0c,//08
+0x60, 0x2f,//19
+0x61, 0x1c,//08
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x28,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x26,
+0x67, 0x06,
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x31,
+0x90, 0x05,
+0x91, 0x05,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x20,
+0x99, 0x20,
+0xa0, 0x01,
+0xa1, 0x02,
+0xa2, 0x01,
+0xa3, 0x02,
+0xa4, 0x05,
+0xa5, 0x05,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+0xbc, 0x25,
+0xbd, 0x2a,
+0xbe, 0x27,
+0xbf, 0x25,
+0xc0, 0x2a,
+0xc1, 0x27,
+0xc2, 0x1e,
+0xc3, 0x24,
+0xc4, 0x20,
+0xc5, 0x1e,
+0xc6, 0x24,
+0xc7, 0x20,
+0xc8, 0x18,
+0xc9, 0x20,
+0xca, 0x1e,
+0xcb, 0x18,
+0xcc, 0x20,
+0xcd, 0x1e,
+0xce, 0x18,
+0xcf, 0x20,
+0xd0, 0x1e,
+0xd1, 0x18,
+0xd2, 0x20,
+0xd3, 0x1e,
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x80,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x5e,//AG_ON
+0x19, 0x5d,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+
+//GMA
+0x30, 0x00,
+0x31, 0x06,
+0x32, 0x0e,
+0x33, 0x23,
+0x34, 0x55,
+0x35, 0x7f,
+0x36, 0x99,
+0x37, 0xac,
+0x38, 0xba,
+0x39, 0xc5,
+0x3a, 0xcd,
+0x3b, 0xd4,
+0x3c, 0xdb,
+0x3d, 0xe2,
+0x3e, 0xe7,
+0x3f, 0xec,
+0x40, 0xf3,
+0x41, 0xfa,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x07,
+0x52, 0x12,
+0x53, 0x27,
+0x54, 0x57,
+0x55, 0x7f,
+0x56, 0x99,
+0x57, 0xac,
+0x58, 0xba,
+0x59, 0xc5,
+0x5a, 0xcd,
+0x5b, 0xd4,
+0x5c, 0xdb,
+0x5d, 0xe2,
+0x5e, 0xe7,
+0x5f, 0xec,
+0x60, 0xf3,
+0x61, 0xfa,
+0x62, 0xff,
+//BGMA
+0x70, 0x00,
+0x71, 0x09,
+0x72, 0x16,
+0x73, 0x2c,
+0x74, 0x59,
+0x75, 0x7f,
+0x76, 0x99,
+0x77, 0xac,
+0x78, 0xba,
+0x79, 0xc5,
+0x7a, 0xcd,
+0x7b, 0xd4,
+0x7c, 0xdb,
+0x7d, 0xe2,
+0x7e, 0xe7,
+0x7f, 0xec,
+0x80, 0xf3,
+0x81, 0xfa,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x45,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+
+/*
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xea,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+*/
+
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6a,
+0x65, 0xa9,
+0x66, 0x6b,//eb
+0x67, 0xe9,//eb
+0x68, 0x6b,//eb
+0x69, 0xe9,//eb
+0x6a, 0x6a,
+0x6b, 0xa9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+
+0x70, 0x6e, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x03, //EXP Normal 33.33 fps
+0x84, 0x6e,
+0x85, 0xe8,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x06, //EXP Max 8.33 fps
+0x89, 0xdd,
+0x8a, 0xd0,
+0x8B, 0x92, //EXP100
+0x8C, 0x7c,
+0x8D, 0x7a, //EXP120
+0x8E, 0x12,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x53,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x25,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x6f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x04, //PLL On
+0x0e, 0x74, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-gt7305_v1.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-gt7305_v1.h
new file mode 100755
index 00000000..72c8da76
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-gt7305_v1.h
@@ -0,0 +1,2133 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xb0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ 0x11,0x2e,
+ 0x83,0x60, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x60, // BMAX
+ 0x86, 0x20, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x4d,
+ 0x83,0x25,
+ 0x84,0x1b,
+ 0x85,0x55,
+ 0x86,0x48,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x84,//85
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0x2a, 0x03,
+ 0x2b, 0x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+ 0x38, 0x11, // UVTH1
+ 0x39, 0x34, // UVTH2
+ 0x40, 0xf7, // YRANGE
+
+ 0x41, 0x77, // CDIFF
+ 0x42, 0x55, // CSUM2
+ 0x43, 0xf0,
+ 0x44, 0x66,
+ 0x45, 0x33,
+ 0x46, 0x01, // WHTPXLTH1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0c, //BLC_TIME_TH_ON
+0x91, 0x0c, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x00,
+0xa2, 0x00,
+0xa4, 0x00,
+0xa6, 0x00,
+//Normal BLC
+0xa8, 0x41,
+0xaa, 0x41,
+0xac, 0x41,
+0xae, 0x41,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x00, //11
+0x2f, 0x00, //a1
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0x74, 0x89,
+0x75, 0x96,
+0x76, 0x89,
+0x77, 0x96,
+0x7c, 0x85,
+0x7d, 0xaf,
+0x80, 0x01,
+0x81, 0x7f,
+0x82, 0x13,
+0x83, 0x24,
+0x84, 0x7d,
+0x85, 0x81,
+0x86, 0x7d,
+0x87, 0x81,
+0x88, 0xab,
+0x89, 0xbc,
+0x8a, 0xac,
+0x8b, 0xba,
+0x8c, 0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0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x84, // YOFS-85
+0x41, 0x00, // DYOFS
+0x48, 0x80,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x70, //7e //8e //88 //70
+0x62, 0x68, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x51, // Double_AG 31->20
+0x27, 0x54, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+ 0x3e, 0x90,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+0x42, 0x80,
+0x43, 0x18,
+ 0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x01,
+0x58, 0x00,
+0x59, 0x00,
+0x5a, 0x1f, //18
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x60,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xa0,
+0x51, 0x80,
+//Dark1 th
+0x52, 0x00, //b0
+0x53, 0x50, //60
+0x54, 0xd4, //c0
+0x55, 0xc0, //c0
+0x56, 0x70, //b0
+0x57, 0xec, //70
+//Dark2 th
+0x58, 0x60, //90
+0x59, 0x40, //
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xc0,
+0x5d, 0x9b, //70
+//Dark3 th
+0x5e, 0x70,//88
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe0,
+0x62, 0xe0,
+0x63, 0xb4,//80
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x00, //14
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x05,
+0x24, 0x09,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+//Low clip th
+0x2b, 0x01, //Out2 02
+0x2c, 0x01, //Out1 02
+0x25, 0x06,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+//Out2 Edge
+0x50, 0x18,
+0x51, 0x1c,
+0x52, 0x1b,
+0x53, 0x15,
+0x54, 0x18,
+0x55, 0x15,
+//Out1 Edge
+0x56, 0x18,
+0x57, 0x1c,
+0x58, 0x1b,
+0x59, 0x15,
+0x5a, 0x18,
+0x5b, 0x15,
+//Indoor Edge
+0x5c, 0x1f,//0b
+0x5d, 0x21,//21
+0x5e, 0x1c,//0a
+0x5f, 0x1c,//08
+0x60, 0x2f,//19
+0x61, 0x1c,//08
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x28,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x26,
+0x67, 0x06,
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x31,
+0x90, 0x05,
+0x91, 0x05,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x20,
+0x99, 0x20,
+0xa0, 0x01,
+0xa1, 0x02,
+0xa2, 0x01,
+0xa3, 0x02,
+0xa4, 0x05,
+0xa5, 0x05,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+0xbc, 0x25,
+0xbd, 0x2a,
+0xbe, 0x27,
+0xbf, 0x25,
+0xc0, 0x2a,
+0xc1, 0x27,
+0xc2, 0x1e,
+0xc3, 0x24,
+0xc4, 0x20,
+0xc5, 0x1e,
+0xc6, 0x24,
+0xc7, 0x20,
+0xc8, 0x18,
+0xc9, 0x20,
+0xca, 0x1e,
+0xcb, 0x18,
+0xcc, 0x20,
+0xcd, 0x1e,
+0xce, 0x18,
+0xcf, 0x20,
+0xd0, 0x1e,
+0xd1, 0x18,
+0xd2, 0x20,
+0xd3, 0x1e,
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x78,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x5e,//AG_ON
+0x19, 0x5d,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+
+//GMA
+0x30, 0x00,
+0x31, 0x06,
+0x32, 0x0e,
+0x33, 0x23,
+0x34, 0x55,
+0x35, 0x7f,
+0x36, 0x99,
+0x37, 0xac,
+0x38, 0xba,
+0x39, 0xc5,
+0x3a, 0xcd,
+0x3b, 0xd4,
+0x3c, 0xdb,
+0x3d, 0xe2,
+0x3e, 0xe7,
+0x3f, 0xec,
+0x40, 0xf3,
+0x41, 0xfa,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x07,
+0x52, 0x12,
+0x53, 0x27,
+0x54, 0x57,
+0x55, 0x7f,
+0x56, 0x99,
+0x57, 0xac,
+0x58, 0xba,
+0x59, 0xc5,
+0x5a, 0xcd,
+0x5b, 0xd4,
+0x5c, 0xdb,
+0x5d, 0xe2,
+0x5e, 0xe7,
+0x5f, 0xec,
+0x60, 0xf3,
+0x61, 0xfa,
+0x62, 0xff,
+//BGMA
+0x70, 0x00,
+0x71, 0x09,
+0x72, 0x16,
+0x73, 0x2c,
+0x74, 0x59,
+0x75, 0x7f,
+0x76, 0x99,
+0x77, 0xac,
+0x78, 0xba,
+0x79, 0xc5,
+0x7a, 0xcd,
+0x7b, 0xd4,
+0x7c, 0xdb,
+0x7d, 0xe2,
+0x7e, 0xe7,
+0x7f, 0xec,
+0x80, 0xf3,
+0x81, 0xfa,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xe8,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+
+/*
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6f,
+0x65, 0xf9,
+0x66, 0x6f,//eb
+0x67, 0xf9,//eb
+0x68, 0x6f,//eb
+0x69, 0xf9,//eb
+0x6a, 0x6f,
+0x6b, 0xf9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+*/
+
+0x70, 0x76, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x01, //EXP Normal 33.33 fps
+0x84, 0x5f,
+0x85, 0x90,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x05, //EXP Max 8.33 fps
+0x89, 0x7e,
+0x8a, 0x40,
+0x8B, 0x75, //EXP100
+0x8C, 0x30,
+0x8D, 0x61, //EXP120
+0x8E, 0xa8,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x60,
+0x84, 0x16,//1E
+0x85, 0x60,//52
+0x86, 0x20,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x6f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-wave7.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-wave7.h
new file mode 100755
index 00000000..feadda2c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-mrs-wave7.h
@@ -0,0 +1,2147 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ //0x11,0x2e,
+ 0x83,0x52, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x23, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x26,
+ 0x82,0x44,
+ 0x83,0x2f,
+ 0x84,0x24,
+ 0x85,0x4a,
+ 0x86,0x40,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x88,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x45,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_320_240_regs[]= {
+ 0x01, 0xf9,
+ 0x08, 0x0f,
+ 0x01, 0xf8,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x0e, 0x00,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x0e, 0x00,
+ 0x01, 0xf1,
+ 0x08, 0x00,
+ 0x01, 0xf3,
+ 0x01, 0xf1,
+
+ 0x03, 0x20,
+ 0x10, 0x0c,
+ 0x03, 0x22,
+ 0x10, 0x69,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x10, 0x11, //lxh
+ 0x11, 0x90,
+ 0x12, 0x04,
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+ 0xc4, 0x08,
+ 0xc8, 0x60,
+ 0xc9, 0x40,
+
+ //Page 22
+ 0x03, 0x22, // Page 22
+ 0x10, 0xfd, // AWBCTL1
+ 0x11, 0x2e, // AWBCTL2
+ 0x19, 0x01,
+ 0x20, 0x30,
+ 0x21, 0x80,
+ 0x23, 0x08,
+ 0x24, 0x01,
+
+ 0x30, 0x80, // ULVL
+ 0x31, 0x80, // VLVL
+ 0x38, 0x11, // UVTH1
+ 0x39, 0x34, // UVTH2
+ 0x40, 0xf7, // YRANGE
+
+ 0x41, 0x77, // CDIFF
+ 0x42, 0x55, // CSUM2
+ 0x43, 0xf0,
+ 0x44, 0x66,
+ 0x45, 0x33,
+ 0x46, 0x01, // WHTPXLTH1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0e, //BLC_TIME_TH_ON
+0x91, 0x0e, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x00,
+0xa2, 0x00,
+0xa4, 0x00,
+0xa6, 0x00,
+//Normal BLC
+0xa8, 0x42,
+0xaa, 0x42,
+0xac, 0x42,
+0xae, 0x42,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x11,
+0x2f, 0xa1,
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0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TH_ON 78
+0xd7, 0x70, //DCDC_AG_TH_OFF 70
+0xe0, 0xc4,
+0xe1, 0xc4,
+0xe2, 0xc4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x88, // YOFS
+0x41, 0x00, // DYOFS
+0x48, 0xa0,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x7a, //7e //8e //88 //70
+0x62, 0x78, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x31, // Double_AG 31->20
+0x27, 0x34, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+0x3e, 0x80,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+
+0x42, 0x80,
+0x43, 0x18,
+0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x20,
+0x58, 0x20,
+0x59, 0x30,
+0x5a, 0x18,
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x50,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xe6,
+0x51, 0x80,
+//Dark1 th
+0x52, 0xb0,
+0x53, 0x60,
+0x54, 0xc0,
+0x55, 0xc0,
+0x56, 0xc0,
+0x57, 0xa0,
+//Dark2 th
+0x58, 0x90,
+0x59, 0x40,
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xe0,
+0x5d, 0xa0,
+
+//Dark3 th
+0x5e, 0x88,
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe6,
+0x62, 0xe6,
+0x63, 0xb0,
+
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x14,
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x04,
+0x24, 0x09,
+0x25, 0x08,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+
+//Low clip th
+0x2b, 0x06,
+0x2c, 0x06,
+0x25, 0x08,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+
+//Out2 Edge
+0x50, 0x10,
+0x51, 0x14,
+0x52, 0x10,
+0x53, 0x0c,
+0x54, 0x0f,
+0x55, 0x0c,
+
+//Out1 Edge
+0x56, 0x10,
+0x57, 0x13,
+0x58, 0x10,
+0x59, 0x0c,
+0x5a, 0x0f,
+0x5b, 0x0c,
+
+//Indoor Edge
+0x5c, 0x0a,
+0x5d, 0x0b,
+0x5e, 0x0a,
+0x5f, 0x08,
+0x60, 0x09,
+0x61, 0x08,
+
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x08,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x06,
+0x67, 0x06,
+
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x01,
+0x90, 0x15,
+0x91, 0x15,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x30,
+0x99, 0x30,
+
+0xa0, 0x04,
+0xa1, 0x05,
+0xa2, 0x04,
+0xa3, 0x05,
+0xa4, 0x07,
+0xa5, 0x08,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+
+//Out2
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+
+//Out1
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+
+//Indoor
+0xbc, 0x07,
+0xbd, 0x07,
+0xbe, 0x07,
+0xbf, 0x07,
+0xc0, 0x07,
+0xc1, 0x07,
+
+//Dark1
+0xc2, 0x0e,
+0xc3, 0x02,
+0xc4, 0x00,
+0xc5, 0x0e,
+0xc6, 0x02,
+0xc7, 0x00,
+
+//Dark2
+0xc8, 0x18,
+0xc9, 0x05,
+0xca, 0x05,
+0xcb, 0x18,
+0xcc, 0x05,
+0xcd, 0x05,
+
+//Dark3
+0xce, 0x18,
+0xcf, 0x05,
+0xd0, 0x05,
+0xd1, 0x18,
+0xd2, 0x05,
+0xd3, 0x05,
+
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x78,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x37,//AG_ON
+0x19, 0x36,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+//GMA
+0x30, 0x00,
+0x31, 0x08,
+0x32, 0x1f,
+0x33, 0x35,
+0x34, 0x55,
+0x35, 0x73,
+0x36, 0x86,
+0x37, 0x96,
+0x38, 0xa6,
+0x39, 0xb6,
+0x3a, 0xc5,
+0x3b, 0xd0,
+0x3c, 0xd8,
+0x3d, 0xe0,
+0x3e, 0xe8,
+0x3f, 0xf0,
+0x40, 0xf7,
+0x41, 0xfd,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x05,
+0x52, 0x1b,
+0x53, 0x36,
+0x54, 0x5a,
+0x55, 0x75,
+0x56, 0x89,
+0x57, 0x9c,
+0x58, 0xac,
+0x59, 0xb8,
+0x5a, 0xc7,
+0x5b, 0xd2,
+0x5c, 0xdc,
+0x5d, 0xe5,
+0x5e, 0xed,
+0x5f, 0xf2,
+0x60, 0xf7,
+0x61, 0xf9,
+0x62, 0xfa,
+//BGMA
+0x70, 0x00,
+0x71, 0x0a,
+0x72, 0x19,
+0x73, 0x31,
+0x74, 0x55,
+0x75, 0x6e,
+0x76, 0x83,
+0x77, 0x96,
+0x78, 0xa6,
+0x79, 0xb5,
+0x7a, 0xc2,
+0x7b, 0xcd,
+0x7c, 0xd7,
+0x7d, 0xe0,
+0x7e, 0xe8,
+0x7f, 0xf0,
+0x80, 0xf6,
+0x81, 0xfc,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+/*
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xe8,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+*/
+
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6a,
+0x65, 0xa9,
+0x66, 0x6b,//eb
+0x67, 0xe9,//eb
+0x68, 0x6b,//eb
+0x69, 0xe9,//eb
+0x6a, 0x6a,
+0x6b, 0xa9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+
+0x70, 0x6e, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x01, //EXP Normal 33.33 fps
+0x84, 0x5f,
+0x85, 0x90,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x06, //EXP Max 8.33 fps
+0x89, 0x68,
+0x8a, 0xa0,
+0x8B, 0x75, //EXP100
+0x8C, 0x30,
+0x8D, 0x61, //EXP120
+0x8E, 0xa8,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xa3, 0x00, //Outdoor Int
+0xa4, 0x61,
+
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x52,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x23,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x7f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-syx-gt7206.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-syx-gt7206.h
new file mode 100755
index 00000000..814d61ea
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-syx-gt7206.h
@@ -0,0 +1,2159 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ 0x11,0x2e,
+ 0x83,0x53, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x25, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x4d,
+ 0x83,0x25,
+ 0x84,0x1b,
+ 0x85,0x55,
+ 0x86,0x48,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x88,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x45,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_320_240_regs[]= {
+ 0x01, 0xf9,
+ 0x08, 0x0f,
+ 0x01, 0xf8,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x0e, 0x00,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0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86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x04, //PLL On
+0x0e, 0x74, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0c, //BLC_TIME_TH_ON
+0x91, 0x0c, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x08,
+0xa2, 0x08,
+0xa4, 0x08,
+0xa6, 0x08,
+//Normal BLC
+0xa8, 0x40,
+0xaa, 0x40,
+0xac, 0x40,
+0xae, 0x40,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x00, //11
+0x2f, 0x00, //a1
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0x74, 0x89,
+0x75, 0x96,
+0x76, 0x89,
+0x77, 0x96,
+0x7c, 0x85,
+0x7d, 0xaf,
+0x80, 0x01,
+0x81, 0x7f,
+0x82, 0x13,
+0x83, 0x24,
+0x84, 0x7d,
+0x85, 0x81,
+0x86, 0x7d,
+0x87, 0x81,
+0x88, 0xab,
+0x89, 0xbc,
+0x8a, 0xac,
+0x8b, 0xba,
+0x8c, 0xad,
+0x8d, 0xb8,
+0x8e, 0xae,
+0x8f, 0xb2,
+0x90, 0xb3,
+0x91, 0xb7,
+0x92, 0x48,
+0x93, 0x54,
+0x94, 0x7d,
+0x95, 0x81,
+0x96, 0x7d,
+0x97, 0x81,
+0xa0, 0x02,
+0xa1, 0x7b,
+0xa2, 0x02,
+0xa3, 0x7b,
+0xa4, 0x7b,
+0xa5, 0x02,
+0xa6, 0x7b,
+0xa7, 0x02,
+0xa8, 0x85,
+0xa9, 0x8c,
+0xaa, 0x85,
+0xab, 0x8c,
+0xac, 0x10,
+0xad, 0x16,
+0xae, 0x10,
+0xaf, 0x16,
+0xb0, 0x99,
+0xb1, 0xa3,
+0xb2, 0xa4,
+0xb3, 0xae,
+0xb4, 0x9b,
+0xb5, 0xa2,
+0xb6, 0xa6,
+0xb7, 0xac,
+0xb8, 0x9b,
+0xb9, 0x9f,
+0xba, 0xa6,
+0xbb, 0xaa,
+0xbc, 0x9b,
+0xbd, 0x9f,
+0xbe, 0xa6,
+0xbf, 0xaa,
+0xc4, 0x2c,
+0xc5, 0x43,
+0xc6, 0x63,
+0xc7, 0x79,
+0xc8, 0x2d,
+0xc9, 0x42,
+0xca, 0x2d,
+0xcb, 0x42,
+0xcc, 0x64,
+0xcd, 0x78,
+0xce, 0x64,
+0xcf, 0x78,
+0xd0, 0x0a,
+0xd1, 0x09,
+0xd2, 0x20,
+0xd3, 0x00,
+0xd4, 0x0c, //DCDC_TIME_TH_ON don't touch
+0xd5, 0x0c, //DCDC_TIME_TH_OFF don't touch
+0xd6, 0x78, //DCDC_AG_TH_ON 78
+0xd7, 0x70, //DCDC_AG_TH_OFF 70
+0xe0, 0xc4,
+0xe1, 0xc4,
+0xe2, 0xc4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x80, // YOFS
+0x41, 0x00, // DYOFS
+0x48, 0x80,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x70, //7e //8e //88 //70
+0x62, 0x70, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x51, // Double_AG 31->20
+0x27, 0x54, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+ 0x3e, 0x90,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+0x42, 0x80,
+0x43, 0x18,
+ 0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x01,
+0x58, 0x00,
+0x59, 0x00,
+0x5a, 0x1f, //18
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x60,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xa0,
+0x51, 0x80,
+//Dark1 th
+0x52, 0x00, //b0
+0x53, 0x50, //60
+0x54, 0xd4, //c0
+0x55, 0xc0, //c0
+0x56, 0x70, //b0
+0x57, 0xec, //70
+//Dark2 th
+0x58, 0x60, //90
+0x59, 0x40, //
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xc0,
+0x5d, 0x9b, //70
+//Dark3 th
+0x5e, 0x70,//88
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe0,
+0x62, 0xe0,
+0x63, 0xb4,//80
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x00, //14
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x05,
+0x24, 0x09,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+//Low clip th
+0x2b, 0x01, //Out2 02
+0x2c, 0x01, //Out1 02
+0x25, 0x06,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+//Out2 Edge
+0x50, 0x18,
+0x51, 0x1c,
+0x52, 0x1b,
+0x53, 0x15,
+0x54, 0x18,
+0x55, 0x15,
+//Out1 Edge
+0x56, 0x18,
+0x57, 0x1c,
+0x58, 0x1b,
+0x59, 0x15,
+0x5a, 0x18,
+0x5b, 0x15,
+//Indoor Edge
+0x5c, 0x0f,//0b
+0x5d, 0x21,//21
+0x5e, 0x1c,//0a
+0x5f, 0x0c,//08
+0x60, 0x2f,//19
+0x61, 0x1c,//08
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x28,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x26,
+0x67, 0x06,
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x31,
+0x90, 0x05,
+0x91, 0x05,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x20,
+0x99, 0x20,
+0xa0, 0x01,
+0xa1, 0x02,
+0xa2, 0x01,
+0xa3, 0x02,
+0xa4, 0x05,
+0xa5, 0x05,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+0xbc, 0x25,
+0xbd, 0x2a,
+0xbe, 0x27,
+0xbf, 0x25,
+0xc0, 0x2a,
+0xc1, 0x27,
+0xc2, 0x1e,
+0xc3, 0x24,
+0xc4, 0x20,
+0xc5, 0x1e,
+0xc6, 0x24,
+0xc7, 0x20,
+0xc8, 0x18,
+0xc9, 0x20,
+0xca, 0x1e,
+0xcb, 0x18,
+0xcc, 0x20,
+0xcd, 0x1e,
+0xce, 0x18,
+0xcf, 0x20,
+0xd0, 0x1e,
+0xd1, 0x18,
+0xd2, 0x20,
+0xd3, 0x1e,
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x80,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x48, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x5e,//AG_ON
+0x19, 0x5d,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+
+//GMA
+0x30, 0x00,
+0x31, 0x06,
+0x32, 0x0e,
+0x33, 0x23,
+0x34, 0x55,
+0x35, 0x7f,
+0x36, 0x99,
+0x37, 0xac,
+0x38, 0xba,
+0x39, 0xc5,
+0x3a, 0xcd,
+0x3b, 0xd4,
+0x3c, 0xdb,
+0x3d, 0xe2,
+0x3e, 0xe7,
+0x3f, 0xec,
+0x40, 0xf3,
+0x41, 0xfa,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x07,
+0x52, 0x12,
+0x53, 0x27,
+0x54, 0x57,
+0x55, 0x7f,
+0x56, 0x99,
+0x57, 0xac,
+0x58, 0xba,
+0x59, 0xc5,
+0x5a, 0xcd,
+0x5b, 0xd4,
+0x5c, 0xdb,
+0x5d, 0xe2,
+0x5e, 0xe7,
+0x5f, 0xec,
+0x60, 0xf3,
+0x61, 0xfa,
+0x62, 0xff,
+//BGMA
+0x70, 0x00,
+0x71, 0x09,
+0x72, 0x16,
+0x73, 0x2c,
+0x74, 0x59,
+0x75, 0x7f,
+0x76, 0x99,
+0x77, 0xac,
+0x78, 0xba,
+0x79, 0xc5,
+0x7a, 0xcd,
+0x7b, 0xd4,
+0x7c, 0xdb,
+0x7d, 0xe2,
+0x7e, 0xe7,
+0x7f, 0xec,
+0x80, 0xf3,
+0x81, 0xfa,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x45,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+
+/*
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xea,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+*/
+
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6a,
+0x65, 0xa9,
+0x66, 0x6b,//eb
+0x67, 0xe9,//eb
+0x68, 0x6b,//eb
+0x69, 0xe9,//eb
+0x6a, 0x6a,
+0x6b, 0xa9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+
+0x70, 0x6e, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x03, //EXP Normal 33.33 fps
+0x84, 0x6e,
+0x85, 0xe8,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x06, //EXP Max 8.33 fps
+0x89, 0xdd,
+0x8a, 0xd0,
+0x8B, 0x92, //EXP100
+0x8C, 0x7c,
+0x8D, 0x7a, //EXP120
+0x8E, 0x12,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x53,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x25,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x6f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x04, //PLL On
+0x0e, 0x74, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-wave7.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-wave7.h
new file mode 100755
index 00000000..f95c4a22
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253-wave7.h
@@ -0,0 +1,2128 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ //0x11,0x2e,
+ 0x83,0x52, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x23, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x26,
+ 0x82,0x44,
+ 0x83,0x2f,
+ 0x84,0x24,
+ 0x85,0x4a,
+ 0x86,0x40,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x85,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0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 0xfd, // AWBCTL1
+ 0x11, 0x2e, // AWBCTL2
+ 0x19, 0x01,
+ 0x20, 0x30,
+ 0x21, 0x80,
+ 0x23, 0x08,
+ 0x24, 0x01,
+
+ 0x30, 0x80, // ULVL
+ 0x31, 0x80, // VLVL
+ 0x38, 0x11, // UVTH1
+ 0x39, 0x34, // UVTH2
+ 0x40, 0xf7, // YRANGE
+
+ 0x41, 0x77, // CDIFF
+ 0x42, 0x55, // CSUM2
+ 0x43, 0xf0,
+ 0x44, 0x66,
+ 0x45, 0x33,
+ 0x46, 0x01, // WHTPXLTH1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0e, //BLC_TIME_TH_ON
+0x91, 0x0e, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x00,
+0xa2, 0x00,
+0xa4, 0x00,
+0xa6, 0x00,
+//Normal BLC
+0xa8, 0x42,
+0xaa, 0x42,
+0xac, 0x42,
+0xae, 0x42,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x00, //11
+0x2f, 0x00, //a1
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0x74, 0x89,
+0x75, 0x96,
+0x76, 0x89,
+0x77, 0x96,
+0x7c, 0x85,
+0x7d, 0xaf,
+0x80, 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4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x85, // YOFS
+0x41, 0x00, // DYOFS
+0x48, 0x8a,
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x7e, //7e //8e //88 //70
+0x62, 0x7e, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x51, // Double_AG 31->20
+0x27, 0x54, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+0x3e, 0x80,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+0x42, 0x80,
+0x43, 0x18,
+0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x01,
+0x58, 0x00,
+0x59, 0x00,
+0x5a, 0x1f, //18
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x60,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xa0,
+0x51, 0x80,
+//Dark1 th
+0x52, 0x00, //b0
+0x53, 0x50, //60
+0x54, 0xd4, //c0
+0x55, 0xc0, //c0
+0x56, 0x70, //b0
+0x57, 0xec, //70
+//Dark2 th
+0x58, 0x60, //90
+0x59, 0x40, //
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xc0,
+0x5d, 0x9b, //70
+//Dark3 th
+0x5e, 0x70,//88
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe0,
+0x62, 0xe0,
+0x63, 0xb4,//80
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x00, //14
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x05,
+0x24, 0x09,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+//Low clip th
+0x2b, 0x01, //Out2 02
+0x2c, 0x01, //Out1 02
+0x25, 0x06,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+//Out2 Edge
+0x50, 0x18,
+0x51, 0x1c,
+0x52, 0x1b,
+0x53, 0x15,
+0x54, 0x18,
+0x55, 0x15,
+//Out1 Edge
+0x56, 0x18,
+0x57, 0x1c,
+0x58, 0x1b,
+0x59, 0x15,
+0x5a, 0x18,
+0x5b, 0x15,
+//Indoor Edge
+0x5c, 0x2b,
+0x5d, 0x3c,
+0x5e, 0x2a,
+0x5f, 0x28,
+0x60, 0x39,
+0x61, 0x28,
+//Dark1 Edge
+0x62, 0x18,
+0x63, 0x28,
+0x64, 0x18,
+0x65, 0x16,
+0x66, 0x26,
+0x67, 0x16,
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x17,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x15,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x31,
+0x90, 0x05,
+0x91, 0x05,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x20,
+0x99, 0x20,
+0xa0, 0x01,
+0xa1, 0x02,
+0xa2, 0x01,
+0xa3, 0x02,
+0xa4, 0x05,
+0xa5, 0x05,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+//Indoor
+0xbc, 0x15,
+0xbd, 0x2a,
+0xbe, 0x27,
+0xbf, 0x15,
+0xc0, 0x2a,
+0xc1, 0x27,
+//Dark1
+0xc2, 0x1e,
+0xc3, 0x24,
+0xc4, 0x10,
+0xc5, 0x1e,
+0xc6, 0x24,
+0xc7, 0x10,
+//Dark2
+0xc8, 0x18,
+0xc9, 0x20,
+0xca, 0x1e,
+0xcb, 0x18,
+0xcc, 0x20,
+0xcd, 0x1e,
+//Dark3
+0xce, 0x18,
+0xcf, 0x20,
+0xd0, 0x1e,
+0xd1, 0x18,
+0xd2, 0x20,
+0xd3, 0x1e,
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x78,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x5e,//AG_ON
+0x19, 0x5d,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+
+//GMA
+0x30, 0x00,
+0x31, 0x09,
+0x32, 0x19,
+0x33, 0x34,
+0x34, 0x5e,
+0x35, 0x7f,
+0x36, 0x99,
+0x37, 0xac,
+0x38, 0xba,
+0x39, 0xc5,
+0x3a, 0xcd,
+0x3b, 0xd4,
+0x3c, 0xdb,
+0x3d, 0xe2,
+0x3e, 0xe7,
+0x3f, 0xec,
+0x40, 0xf3,
+0x41, 0xfa,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x05,
+0x52, 0x1b,
+0x53, 0x36,
+0x54, 0x5a,
+0x55, 0x75,
+0x56, 0x89,
+0x57, 0x9c,
+0x58, 0xac,
+0x59, 0xb8,
+0x5a, 0xc7,
+0x5b, 0xd2,
+0x5c, 0xdc,
+0x5d, 0xe5,
+0x5e, 0xed,
+0x5f, 0xf2,
+0x60, 0xf7,
+0x61, 0xf9,
+0x62, 0xfa,
+//BGMA
+0x70, 0x00,
+0x71, 0x0a,
+0x72, 0x19,
+0x73, 0x31,
+0x74, 0x55,
+0x75, 0x6e,
+0x76, 0x83,
+0x77, 0x96,
+0x78, 0xa6,
+0x79, 0xb5,
+0x7a, 0xc2,
+0x7b, 0xcd,
+0x7c, 0xd7,
+0x7d, 0xe0,
+0x7e, 0xe8,
+0x7f, 0xf0,
+0x80, 0xf6,
+0x81, 0xfc,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+/*
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xe8,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+*/
+
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6a,
+0x65, 0xa9,
+0x66, 0x6b,//eb
+0x67, 0xe9,//eb
+0x68, 0x6b,//eb
+0x69, 0xe9,//eb
+0x6a, 0x6a,
+0x6b, 0xa9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+
+0x70, 0x76, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x01, //EXP Normal 33.33 fps
+0x84, 0x5f,
+0x85, 0x90,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x06, //EXP Max 8.33 fps
+0x89, 0x68,
+0x8a, 0xa0,
+0x8B, 0x75, //EXP100
+0x8C, 0x30,
+0x8D, 0x61, //EXP120
+0x8E, 0xa8,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xa3, 0x00, //Outdoor Int
+0xa4, 0x61,
+
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x52,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x23,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x7f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.c b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.c
new file mode 100755
index 00000000..b5a72b49
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.c
@@ -0,0 +1,333 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "hi253.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, hi253_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, hi253_640_480_regs),
+// CMOS_WIN_SIZE("SVGA", 800, 600, hi253_800_600_regs),
+// CMOS_WIN_SIZE("720p", 1280, 720, hi253_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, hi253_1600_1200_rets),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = hi253_wb_auto;
+ size = ARRAY_SIZE(hi253_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = hi253_wb_incandescent;
+ size = ARRAY_SIZE(hi253_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = hi253_wb_daylight;
+ size = ARRAY_SIZE(hi253_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = hi253_wb_cloudy;
+ size = ARRAY_SIZE(hi253_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = hi253_wb_fluorescent;
+ size = ARRAY_SIZE(hi253_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = hi253_scene_mode_auto;
+ size = ARRAY_SIZE(hi253_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = hi253_scene_mode_night;
+ size = ARRAY_SIZE(hi253_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = hi253_exposure_neg6;
+ size = ARRAY_SIZE(hi253_exposure_neg6);
+ break;
+ case -1:
+ regs = hi253_exposure_neg3;
+ size = ARRAY_SIZE(hi253_exposure_neg3);
+ break;
+ case 0:
+ regs = hi253_exposure_zero;
+ size = ARRAY_SIZE(hi253_exposure_zero);
+ break;
+ case 1:
+ regs = hi253_exposure_pos3;
+ size = ARRAY_SIZE(hi253_exposure_pos3);
+ break;
+ case 2:
+ regs = hi253_exposure_pos6;
+ size = ARRAY_SIZE(hi253_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x03, 0x00);
+
+ data = sensor_read(sd, 0x11);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x11, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x03, 0x00);
+
+ data = sensor_read(sd, 0x11);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x11, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ sensor_write(sd, 0x03, 0x0);
+
+ data = sensor_read(sd, 0x04);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, hi253_default_regs_init,
+ ARRAY_SIZE(hi253_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops hi253_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev hi253 = {
+ .name = "hi253",
+ .i2c_addr = 0x20,
+ .id = 0x92,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &hi253_ops,
+};
+
+#if 0
+static int __init hi253_init(void)
+{
+ return cmos_register_sudbdev(&hi253);
+}
+
+static void __exit hi253_exit(void)
+{
+ return cmos_unregister_subdev(&hi253);
+}
+
+module_init(hi253_init);
+module_exit(hi253_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.h b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.h
new file mode 100755
index 00000000..929104a9
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi253/hi253.h
@@ -0,0 +1,2124 @@
+#ifndef YACD511_H
+#define YACD511_H
+
+// Scene Mode
+uint8_t hi253_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t hi253_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi253_wb_auto [] = {
+ 0x03,0x22,
+ //0x11,0x2e,
+ 0x83,0x52, // RMAX
+ 0x84, 0x16, // RMIN
+ 0x85, 0x5a, // BMAX
+ 0x86, 0x23, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x60,
+ 0x83,0x20,
+ 0x84,0x18,
+ 0x85,0x60,
+ 0x86,0x64,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x41,
+ 0x82,0x58,
+ 0x83,0x44,
+ 0x84,0x22,
+ 0x85,0x55,
+ 0x86,0x53,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x59,
+ 0x82,0x29,
+ 0x83,0x60,
+ 0x84,0x50,
+ 0x85,0x2f,
+ 0x86,0x23,
+ 0xff,0xff,
+};
+
+uint8_t hi253_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x71,
+ 0x82,0x2b,
+ 0x83,0x72,
+ 0x84,0x70,
+ 0x85,0x2b,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi253_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi253_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi253_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x90,
+};
+
+uint8_t hi253_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi253_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi253_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_1280_720_regs[]={
+};
+
+uint8_t hi253_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi253_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x04,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x04,
+ 0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H1
+ 0x47, 0x94,
+
+ 0x50, 0xb2,
+ 0x51, 0x81,
+ 0x52, 0x98,
+
+ 0x80, 0x38, // RGAIN
+ 0x81, 0x20, // GGAIN
+ 0x82, 0x38, // BGAIN
+
+ 0x83, 0x5e, // RMAX
+ 0x84, 0x20, // RMIN
+ 0x85, 0x53, // BMAX
+ 0x86, 0x15, // BMIN
+
+ 0x87, 0x54, // RMAXM
+ 0x88, 0x20, // RMINM
+ 0x89, 0x3f, // BMAXM
+ 0x8a, 0x1c, // BMINM
+
+ 0x8b, 0x54, // RMAXB
+ 0x8c, 0x3f, // RMINB
+ 0x8d, 0x24, // BMAXB
+ 0x8e, 0x1c, // BMINB
+
+ 0x8f, 0x60, // BGAINPARA1
+ 0x90, 0x5f, // BGAINPARA2
+ 0x91, 0x5c, // BGAINPARA3
+ 0x92, 0x4C, // BGAINPARA4
+ 0x93, 0x41, // BGAINPARA5
+ 0x94, 0x3b, // BGAINPARA6
+ 0x95, 0x36, // BGAINPARA7
+ 0x96, 0x30, // BGAINPARA8
+ 0x97, 0x27, // BGAINPARA9
+ 0x98, 0x20, // BGAINPARA10
+ 0x99, 0x1C, // BGAINPARA11
+ 0x9a, 0x19, // BGAINPARA12
+
+ 0x9b, 0x88, // BGAINBND1
+ 0x9c, 0x88, // BGAINBND2
+ 0x9d, 0x48, // RGAINTH1
+ 0x9e, 0x38, // RGAINTH2
+ 0x9f, 0x30, // RGAINTH3
+
+ 0xa0, 0x74, // RDELTA1
+ 0xa1, 0x35, // BDELTA1
+ 0xa2, 0xaf, // RDELTA2
+ 0xa3, 0xf7, // BDELTA2
+
+ 0xa4, 0x10, // AWBEXPLMT1
+ 0xa5, 0x50, // AWBEXPLMT2
+ 0xa6, 0xc4, // AWBEXPLMT3
+
+ 0xad, 0x40,
+ 0xae, 0x4a,
+
+ 0xaf, 0x2a,
+ 0xb0, 0x29,
+
+ 0xb1, 0x20,
+ 0xb4, 0xff,
+ 0xb8, 0x6b,
+ 0xb9, 0x00,
+
+
+ 0x03, 0x24,
+ 0x10, 0x01,
+ 0x18, 0x06,
+ 0x30, 0x06,
+ 0x31, 0x90,
+ 0x32, 0x25,
+ 0x33, 0xa2,
+ 0x34, 0x26,
+ 0x35, 0x58,
+ 0x36, 0x60,
+ 0x37, 0x00,
+ 0x38, 0x50,
+ 0x39, 0x00,
+
+ 0x03, 0x20,
+ 0x10, 0x9c,
+ 0x03, 0x22,
+ 0x10, 0xe9,
+
+ //Page 00
+ 0x03, 0x00,
+ 0x0e, 0x03,
+ 0x0e, 0x73,
+
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+ 0x03, 0x00,
+
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+uint8_t hi253_default_regs_init[]={
+
+0x01, 0xf9, //sleep on
+0x08, 0x0f, //Hi-Z on
+0x01, 0xf8, //sleep off
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us START
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00, // Dummy 750us END
+0x0e, 0x00, //PLL off
+0x01, 0xf1, //sleep on
+0x08, 0x00, //Hi-Z off
+0x01, 0xf3,
+0x01, 0xf1,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x1c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0x69, //awb off
+/////// PAGE 0 START ///////
+0x03, 0x00,
+0x10, 0x10, // Sub1/2_Preview2 Mode_H binning
+0x11, 0x90,
+0x12, 0x04,//00
+0x0b, 0xaa, // ESD Check Register
+0x0c, 0xaa, // ESD Check Register
+0x0d, 0xaa, // ESD Check Register
+0x20, 0x00, // Windowing start point Y
+0x21, 0x04,
+0x22, 0x00, // Windowing start point X
+0x23, 0x07,
+0x24, 0x04,
+0x25, 0xb0,
+0x26, 0x06,
+0x27, 0x40, // WINROW END
+0x40, 0x01, //Hblank 408
+0x41, 0x68,
+0x42, 0x00, //Vblank 20
+0x43, 0x14,
+0x45, 0x04,
+0x46, 0x18,
+0x47, 0xd8,
+//BLC
+0x80, 0x2e,
+0x81, 0x7e,
+0x82, 0x90,
+0x83, 0x00,
+0x84, 0x0c,
+0x85, 0x00,
+0x90, 0x0c, //BLC_TIME_TH_ON
+0x91, 0x0c, //BLC_TIME_TH_OFF
+0x92, 0x78, //BLC_AG_TH_ON
+0x93, 0x70, //BLC_AG_TH_OFF
+0x94, 0x75,
+0x95, 0x70,
+0x96, 0xdc,
+0x97, 0xfe,
+0x98, 0x38,
+//OutDoor BLC
+0x99, 0x42,
+0x9a, 0x42,
+0x9b, 0x42,
+0x9c, 0x42,
+//Dark BLC
+0xa0, 0x00,
+0xa2, 0x00,
+0xa4, 0x00,
+0xa6, 0x00,
+//Normal BLC
+0xa8, 0x42,
+0xaa, 0x42,
+0xac, 0x42,
+0xae, 0x42,
+/////// PAGE 2 START ///////
+0x03, 0x02, //Page 02
+0x10, 0x00, //Mode_test
+0x11, 0x00, //Mode_dead_test
+0x12, 0x03, //pwr_ctl_ctl1
+0x13, 0x03, //Mode_ana_test
+0x14, 0x00, //mode_memory
+0x16, 0x00, //dcdc_ctl1
+0x17, 0x8c, //dcdc_ctl2
+0x18, 0x4C, //analog_func1
+0x19, 0x00, //analog_func2
+0x1a, 0x39, //analog_func3
+0x1b, 0x00, //analog_func4
+0x1c, 0x09, //dcdc_ctl3
+0x1d, 0x40, //dcdc_ctl4
+0x1e, 0x30, //analog_func7
+0x1f, 0x10, //analog_func8
+0x20, 0x77, //pixel bias
+0x21, 0xde, //adc,asp bias
+0x22, 0xa7, //main,bus bias
+0x23, 0x30, //clamp
+0x24, 0x4a,
+0x25, 0x10,
+0x27, 0x3c,
+0x28, 0x00,
+0x29, 0x0c,
+0x2a, 0x80,
+0x2b, 0x80,
+0x2c, 0x02,
+0x2d, 0xa0,
+0x2e, 0x00, //11
+0x2f, 0x00, //a1
+0x30, 0x05, //swap_ctl
+0x31, 0x99,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x22,
+0x38, 0x88,
+0x39, 0x88,
+0x50, 0x20,
+0x51, 0x03, //00 don't touch
+0x52, 0x01,
+0x53, 0xc1,
+0x54, 0x10,
+0x55, 0x1c,
+0x56, 0x11,
+0x58, 0x10,
+0x59, 0x0e,
+0x5d, 0xa2,
+0x5e, 0x5a,
+0x60, 0x87,
+0x61, 0x99,
+0x62, 0x88,
+0x63, 0x97,
+0x64, 0x88,
+0x65, 0x97,
+0x67, 0x0c,
+0x68, 0x0c,
+0x69, 0x0c,
+0x6a, 0xb4,
+0x6b, 0xc4,
+0x6c, 0xb5,
+0x6d, 0xc2,
+0x6e, 0xb5,
+0x6f, 0xc0,
+0x70, 0xb6,
+0x71, 0xb8,
+0x72, 0x89,
+0x73, 0x96,
+0x74, 0x89,
+0x75, 0x96,
+0x76, 0x89,
+0x77, 0x96,
+0x7c, 0x85,
+0x7d, 0xaf,
+0x80, 0x01,
+0x81, 0x7f,
+0x82, 0x13,
+0x83, 0x24,
+0x84, 0x7d,
+0x85, 0x81,
+0x86, 0x7d,
+0x87, 0x81,
+0x88, 0xab,
+0x89, 0xbc,
+0x8a, 0xac,
+0x8b, 0xba,
+0x8c, 0xad,
+0x8d, 0xb8,
+0x8e, 0xae,
+0x8f, 0xb2,
+0x90, 0xb3,
+0x91, 0xb7,
+0x92, 0x48,
+0x93, 0x54,
+0x94, 0x7d,
+0x95, 0x81,
+0x96, 0x7d,
+0x97, 0x81,
+0xa0, 0x02,
+0xa1, 0x7b,
+0xa2, 0x02,
+0xa3, 0x7b,
+0xa4, 0x7b,
+0xa5, 0x02,
+0xa6, 0x7b,
+0xa7, 0x02,
+0xa8, 0x85,
+0xa9, 0x8c,
+0xaa, 0x85,
+0xab, 0x8c,
+0xac, 0x10,
+0xad, 0x16,
+0xae, 0x10,
+0xaf, 0x16,
+0xb0, 0x99,
+0xb1, 0xa3,
+0xb2, 0xa4,
+0xb3, 0xae,
+0xb4, 0x9b,
+0xb5, 0xa2,
+0xb6, 0xa6,
+0xb7, 0xac,
+0xb8, 0x9b,
+0xb9, 0x9f,
+0xba, 0xa6,
+0xbb, 0xaa,
+0xbc, 0x9b,
+0xbd, 0x9f,
+0xbe, 0xa6,
+0xbf, 0xaa,
+0xc4, 0x2c,
+0xc5, 0x43,
+0xc6, 0x63,
+0xc7, 0x79,
+0xc8, 0x2d,
+0xc9, 0x42,
+0xca, 0x2d,
+0xcb, 0x42,
+0xcc, 0x64,
+0xcd, 0x78,
+0xce, 0x64,
+0xcf, 0x78,
+0xd0, 0x0a,
+0xd1, 0x09,
+0xd2, 0x20,
+0xd3, 0x00,
+0xd4, 0x0c, //DCDC_TIME_TH_ON don't touch
+0xd5, 0x0c, //DCDC_TIME_TH_OFF don't touch
+0xd6, 0x78, //DCDC_AG_TH_ON 78
+0xd7, 0x70, //DCDC_AG_TH_OFF 70
+0xe0, 0xc4,
+0xe1, 0xc4,
+0xe2, 0xc4,
+0xe3, 0xc4,
+0xe4, 0x00,
+0xe8, 0x80,
+0xe9, 0x40,
+0xea, 0x7f,
+0xf0, 0x01,
+0xf1, 0x01,
+0xf2, 0x01,
+0xf3, 0x01,
+0xf4, 0x01,
+/////// PAGE 3 ///////
+0x03, 0x03,
+0x10, 0x10,
+/////// PAGE 10 START ///////
+0x03, 0x10,
+0x10, 0x03, // CrYCbY // For Demoset 0x03
+0x12, 0x30,
+0x13, 0x0a,//add jacky open constrast
+0x20, 0x00,
+0x30, 0x00,
+0x31, 0x00,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x30,
+0x35, 0x00,
+0x36, 0x00,
+0x38, 0x00,
+0x3e, 0x58,
+0x3f, 0x00,
+0x40, 0x90, // YOFS
+0x41, 0x00, // DYOFS
+0x48, 0x84,// 84
+0x60, 0x67,//6b AG ratio jacky
+
+0x61, 0x70, //7e //8e //88 //70
+0x62, 0x68, //7e //8e //88 //80
+0x63, 0x50, //Double_AG 50->30
+0x64, 0x41,
+0x66, 0x42,
+0x67, 0x20,
+0x6a, 0x80, //8a
+0x6b, 0x84, //74
+0x6c, 0x80, //7e //7a
+0x6d, 0x80, //8e
+/////// PAGE 11 START ///////
+0x03, 0x11,
+0x10, 0x7f,
+0x11, 0x40,
+0x12, 0x0a, // Blue Max-Filter Delete
+0x13, 0xbb,
+0x26, 0x51, // Double_AG 31->20
+0x27, 0x54, // Double_AG 34->22
+0x28, 0x0f,
+0x29, 0x10,
+0x2b, 0x30,
+0x2c, 0x32,
+//Out2 D-LPF th
+0x30, 0x70,
+0x31, 0x10,
+0x32, 0x58,
+0x33, 0x09,
+0x34, 0x06,
+0x35, 0x03,
+//Out1 D-LPF th
+0x36, 0x70,
+0x37, 0x18,
+0x38, 0x58,
+0x39, 0x09,
+0x3a, 0x06,
+0x3b, 0x03,
+//Indoor D-LPF th
+0x3c, 0x80,
+0x3d, 0x18,
+ 0x3e, 0x80,
+0x3f, 0x0c,
+0x40, 0x09,
+0x41, 0x06,
+0x42, 0x80,
+0x43, 0x18,
+ 0x44, 0x90,
+0x45, 0x12,
+0x46, 0x10,
+0x47, 0x10,
+0x48, 0x90,
+0x49, 0x40,
+0x4a, 0x80,
+0x4b, 0x13,
+0x4c, 0x10,
+0x4d, 0x11,
+0x4e, 0x80,
+0x4f, 0x30,
+0x50, 0x80,
+0x51, 0x13,
+0x52, 0x10,
+0x53, 0x13,
+0x54, 0x11,
+0x55, 0x17,
+0x56, 0x20,
+0x57, 0x01,
+0x58, 0x00,
+0x59, 0x00,
+0x5a, 0x1f, //18
+0x5b, 0x00,
+0x5c, 0x00,
+0x60, 0x3f,
+0x62, 0x60,
+0x70, 0x06,
+/////// PAGE 12 START ///////
+0x03, 0x12,
+0x20, 0x0f,
+0x21, 0x0f,
+0x25, 0x00, //0x30
+0x28, 0x00,
+0x29, 0x00,
+0x2a, 0x00,
+0x30, 0x50,
+0x31, 0x18,
+0x32, 0x32,
+0x33, 0x40,
+0x34, 0x50,
+0x35, 0x70,
+0x36, 0xa0,
+//Out2 th
+0x40, 0xa0,
+0x41, 0x40,
+0x42, 0xa0,
+0x43, 0x90,
+0x44, 0x90,
+0x45, 0x80,
+//Out1 th
+0x46, 0xb0,
+0x47, 0x55,
+0x48, 0xa0,
+0x49, 0x90,
+0x4a, 0x90,
+0x4b, 0x80,
+//Indoor th
+0x4c, 0xb0,
+0x4d, 0x40,
+0x4e, 0x90,
+0x4f, 0x90,
+0x50, 0xa0,
+0x51, 0x80,
+//Dark1 th
+0x52, 0x00, //b0
+0x53, 0x50, //60
+0x54, 0xd4, //c0
+0x55, 0xc0, //c0
+0x56, 0x70, //b0
+0x57, 0xec, //70
+//Dark2 th
+0x58, 0x60, //90
+0x59, 0x40, //
+0x5a, 0xd0,
+0x5b, 0xd0,
+0x5c, 0xc0,
+0x5d, 0x9b, //70
+//Dark3 th
+0x5e, 0x70,//88
+0x5f, 0x40,
+0x60, 0xe0,
+0x61, 0xe0,
+0x62, 0xe0,
+0x63, 0xb4,//80
+0x70, 0x15,
+0x71, 0x01, //Don't Touch register
+0x72, 0x18,
+0x73, 0x01, //Don't Touch register
+0x74, 0x25,
+0x75, 0x15,
+0x80, 0x20,
+0x81, 0x40,
+0x82, 0x65,
+0x85, 0x1a,
+0x88, 0x00,
+0x89, 0x00,
+0x90, 0x5d, //For capture
+0x91, 0x88,
+0x98, 0x7d,
+0x99, 0x28,
+0x9A, 0x14,
+0x9B, 0xc8,
+0x9C, 0x02,
+0x9D, 0x1e,
+0x9E, 0x28,
+0x9F, 0x07,
+0xA0, 0x32,
+0xA4, 0x04,
+0xA5, 0x0e,
+0xA6, 0x0c,
+0xA7, 0x04,
+0xA8, 0x3c,
+
+0xAA, 0x14,
+0xAB, 0x11,
+0xAC, 0x0f,
+0xAD, 0x16,
+0xAE, 0x15,
+0xAF, 0x14,
+
+0xB1, 0xaa,
+0xB2, 0x96,
+0xB3, 0x28,
+//Dont Touch register
+0xB8, 0x78,
+0xB9, 0xa0,
+0xBA, 0xb4,
+0xBB, 0x14,
+0xBC, 0x14,
+0xBD, 0x00, //14
+0xBE, 0x64,
+0xBF, 0x64,
+0xC0, 0x64,
+0xC1, 0x64,
+0xC2, 0x04,
+0xC3, 0x03,
+0xC4, 0x0c,
+0xC5, 0x30,
+0xC6, 0x2a,
+0xD0, 0x0c, //CI Option/CI DPC
+0xD1, 0x80,
+0xD2, 0x67,
+0xD3, 0x00,
+0xD4, 0x00,
+0xD5, 0x02,
+0xD6, 0xff,
+0xD7, 0x18,
+//End
+0x3b, 0x06,
+0x3c, 0x06,
+0xc5, 0x00,//55->48
+0xc6, 0x00,//48->40
+/////// PAGE 13 START ///////
+0x03, 0x13,
+//Edge
+0x10, 0xcb,
+0x11, 0x7b,
+0x12, 0x07,
+0x14, 0x00,
+0x20, 0x15,
+0x21, 0x13,
+0x22, 0x33,
+0x23, 0x05,
+0x24, 0x09,
+0x26, 0x18,
+0x27, 0x30,
+0x29, 0x12,
+0x2a, 0x50,
+//Low clip th
+0x2b, 0x01, //Out2 02
+0x2c, 0x01, //Out1 02
+0x25, 0x06,
+0x2d, 0x0c,
+0x2e, 0x12,
+0x2f, 0x12,
+//Out2 Edge
+0x50, 0x18,
+0x51, 0x1c,
+0x52, 0x1b,
+0x53, 0x15,
+0x54, 0x18,
+0x55, 0x15,
+//Out1 Edge
+0x56, 0x18,
+0x57, 0x1c,
+0x58, 0x1b,
+0x59, 0x15,
+0x5a, 0x18,
+0x5b, 0x15,
+//Indoor Edge
+0x5c, 0x0b,
+0x5d, 0x2c,
+0x5e, 0x1a,
+0x5f, 0x08,
+0x60, 0x29,
+0x61, 0x18,
+//Dark1 Edge
+0x62, 0x08,
+0x63, 0x28,
+0x64, 0x08,
+0x65, 0x06,
+0x66, 0x26,
+0x67, 0x06,
+//Dark2 Edge
+0x68, 0x07,
+0x69, 0x07,
+0x6a, 0x07,
+0x6b, 0x05,
+0x6c, 0x05,
+0x6d, 0x05,
+//Dark3 Edge
+0x6e, 0x07,
+0x6f, 0x07,
+0x70, 0x07,
+0x71, 0x05,
+0x72, 0x05,
+0x73, 0x05,
+0x80, 0xfd,
+0x81, 0x1f,
+0x82, 0x05,
+0x83, 0x31,
+0x90, 0x05,
+0x91, 0x05,
+0x92, 0x33,
+0x93, 0x30,
+0x94, 0x03,
+0x95, 0x14,
+0x97, 0x20,
+0x99, 0x20,
+0xa0, 0x01,
+0xa1, 0x02,
+0xa2, 0x01,
+0xa3, 0x02,
+0xa4, 0x05,
+0xa5, 0x05,
+0xa6, 0x07,
+0xa7, 0x08,
+0xa8, 0x07,
+0xa9, 0x08,
+0xaa, 0x07,
+0xab, 0x08,
+0xb0, 0x22,
+0xb1, 0x2a,
+0xb2, 0x28,
+0xb3, 0x22,
+0xb4, 0x2a,
+0xb5, 0x28,
+0xb6, 0x22,
+0xb7, 0x2a,
+0xb8, 0x28,
+0xb9, 0x22,
+0xba, 0x2a,
+0xbb, 0x28,
+0xbc, 0x25,
+0xbd, 0x2a,
+0xbe, 0x27,
+0xbf, 0x25,
+0xc0, 0x2a,
+0xc1, 0x27,
+0xc2, 0x1e,
+0xc3, 0x24,
+0xc4, 0x20,
+0xc5, 0x1e,
+0xc6, 0x24,
+0xc7, 0x20,
+0xc8, 0x18,
+0xc9, 0x20,
+0xca, 0x1e,
+0xcb, 0x18,
+0xcc, 0x20,
+0xcd, 0x1e,
+0xce, 0x18,
+0xcf, 0x20,
+0xd0, 0x1e,
+0xd1, 0x18,
+0xd2, 0x20,
+0xd3, 0x1e,
+/////// PAGE 14 START ///////
+0x03, 0x14,
+0x10, 0x11,
+0x14, 0x80, // GX
+0x15, 0x80, // GY
+0x16, 0x80, // RX
+0x17, 0x80, // RY
+0x18, 0x80, // BX
+0x19, 0x80, // BY
+0x20, 0x80, //X 60 //a0
+0x21, 0x80, //Y
+0x22, 0x78,
+0x23, 0x80,
+0x24, 0x80,
+0x30, 0xc8,
+0x31, 0x2b,
+0x32, 0x00,
+0x33, 0x00,
+0x34, 0x90,
+0x40, 0x56, //0x48//65
+0x50, 0x44, //0x34
+0x60, 0x46, //0x29
+0x70, 0x44, //0x34
+/////// PAGE 15 START ///////
+0x03, 0x15,
+0x10, 0x0f,
+//Rstep H 16
+//Rstep L 14
+0x14, 0x4f, //CMCOFSGH
+0x15, 0x32, //CMCOFSGM
+0x16, 0x24, //CMCOFSGL
+0x17, 0x2f, //CMC SIGN
+//CMC
+0x30, 0x91,
+0x31, 0x6a,
+0x32, 0x18,
+0x33, 0x17,
+0x34, 0x53,
+0x35, 0x08,
+0x36, 0x08,
+0x37, 0x3e,
+0x38, 0x87,
+//CMC OFS
+0x40, 0xa3,
+0x41, 0x3a,
+0x42, 0x93,
+0x43, 0x0b,
+0x44, 0x86,
+0x45, 0x06,
+0x46, 0x00,
+0x47, 0xa2,
+0x48, 0x22,
+//CMC POFS
+0x50, 0x82,
+0x51, 0x06,
+0x52, 0x83,
+0x53, 0x03,
+0x54, 0x11,
+0x55, 0x8e,
+0x56, 0x00,
+0x57, 0x06,
+0x58, 0x87,
+
+0x80, 0x03,
+0x85, 0x40,
+0x87, 0x02,
+0x88, 0x00,
+0x89, 0x00,
+0x8a, 0x00,
+
+
+
+/////// PAGE 16 START ///////
+0x03, 0x16,
+0x10, 0x31,//GMA_CTL
+0x18, 0x5e,//AG_ON
+0x19, 0x5d,//AG_OFF
+0x1A, 0x0e,//TIME_ON
+0x1B, 0x01,//TIME_OFF
+0x1C, 0xdc,//OUT_ON
+0x1D, 0xfe,//OUT_OFF
+
+//GMA
+0x30, 0x00,
+0x31, 0x06,
+0x32, 0x0e,
+0x33, 0x23,
+0x34, 0x55,
+0x35, 0x7f,
+0x36, 0x99,
+0x37, 0xac,
+0x38, 0xba,
+0x39, 0xc5,
+0x3a, 0xcd,
+0x3b, 0xd4,
+0x3c, 0xdb,
+0x3d, 0xe2,
+0x3e, 0xe7,
+0x3f, 0xec,
+0x40, 0xf3,
+0x41, 0xfa,
+0x42, 0xff,
+//RGMA
+0x50, 0x00,
+0x51, 0x07,
+0x52, 0x12,
+0x53, 0x27,
+0x54, 0x57,
+0x55, 0x7f,
+0x56, 0x99,
+0x57, 0xac,
+0x58, 0xba,
+0x59, 0xc5,
+0x5a, 0xcd,
+0x5b, 0xd4,
+0x5c, 0xdb,
+0x5d, 0xe2,
+0x5e, 0xe7,
+0x5f, 0xec,
+0x60, 0xf3,
+0x61, 0xfa,
+0x62, 0xff,
+//BGMA
+0x70, 0x00,
+0x71, 0x09,
+0x72, 0x16,
+0x73, 0x2c,
+0x74, 0x59,
+0x75, 0x7f,
+0x76, 0x99,
+0x77, 0xac,
+0x78, 0xba,
+0x79, 0xc5,
+0x7a, 0xcd,
+0x7b, 0xd4,
+0x7c, 0xdb,
+0x7d, 0xe2,
+0x7e, 0xe7,
+0x7f, 0xec,
+0x80, 0xf3,
+0x81, 0xfa,
+0x82, 0xff,
+/////// PAGE 17 START ///////
+0x03, 0x17,
+0x10, 0xf7,
+/////// PAGE 18 START ///////
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+
+/////// PAGE 20 START ///////
+0x03, 0x20,
+0x11, 0x1c,
+0x18, 0x30,
+0x1a, 0x08,
+0x20, 0x01, //05_lowtemp Y Mean off
+0x21, 0x30,
+0x22, 0x10,
+0x23, 0x00,
+0x24, 0x00, //Uniform Scene Off
+0x28, 0xe7,
+0x29, 0x0d, //20100305 ad->0d
+0x2a, 0xff,
+0x2b, 0x34, //f4->Adaptive on //04 off
+0x2c, 0xc2,
+0x2d, 0xcf, //fe->AE Speed option
+0x2e, 0x33,
+0x30, 0x78, //f8
+0x32, 0x03,
+0x33, 0x2e,
+0x34, 0x30,
+0x35, 0xd4,
+0x36, 0xfe,
+0x37, 0x32,
+0x38, 0x04,
+0x39, 0x22, //AE_escapeC10
+0x3a, 0xde, //AE_escapeC11
+0x3b, 0x22, //AE_escapeC1
+0x3c, 0xde, //AE_escapeC2
+0x50, 0x45,
+0x51, 0x88,
+0x56, 0x03,
+0x57, 0xf7,
+0x58, 0x14,
+0x59, 0x88,
+0x5a, 0x04,
+
+0x60, 0xff,
+0x61, 0xff,
+0x62, 0xea,
+0x63, 0xab,
+0x64, 0xea,
+0x65, 0xab,
+0x66, 0xea,//eb
+0x67, 0x2b,//eb
+0x68, 0xe8,//eb
+0x69, 0x2b,//eb
+0x6a, 0xea,
+0x6b, 0xab,
+0x6c, 0xea,
+0x6d, 0xab,
+0x6e, 0xff,
+0x6f, 0xff,
+
+/*
+0x60, 0x55,
+0x61, 0x55,
+0x62, 0x6a,
+0x63, 0xa9,
+0x64, 0x6f,
+0x65, 0xf9,
+0x66, 0x6f,//eb
+0x67, 0xf9,//eb
+0x68, 0x6f,//eb
+0x69, 0xf9,//eb
+0x6a, 0x6f,
+0x6b, 0xf9,
+0x6c, 0x6a,
+0x6d, 0xa9,
+0x6e, 0x55,
+0x6f, 0x55,
+*/
+
+0x70, 0x76, //6e
+0x71, 0x89, //00 //-4
+0x76, 0x43,
+0x77, 0xe2, //04 //f2
+0x78, 0x23, //Yth1
+0x79, 0x46, //Yth2 //46
+0x7a, 0x23, //23
+0x7b, 0x22, //22
+0x7d, 0x23,
+0x83, 0x01, //EXP Normal 33.33 fps
+0x84, 0x5f,
+0x85, 0x90,
+0x86, 0x01, //EXPMin 7500.00 fps
+0x87, 0xf4,
+0x88, 0x05, //EXP Max 8.33 fps
+0x89, 0x7e,
+0x8a, 0x40,
+0x8B, 0x75, //EXP100
+0x8C, 0x30,
+0x8D, 0x61, //EXP120
+0x8E, 0xa8,
+0x9c, 0x17, //EXP Limit 500.00 fps
+0x9d, 0x70,
+0x9e, 0x01, //EXP Unit
+0x9f, 0xf4,
+0xb0, 0x18,
+0xb1, 0x14, //ADC 400->560
+0xb2, 0x80,//a0
+0xb3, 0x18,
+0xb4, 0x1a,
+0xb5, 0x44,
+0xb6, 0x2f,
+0xb7, 0x28,
+0xb8, 0x25,
+0xb9, 0x22,
+0xba, 0x21,
+0xbb, 0x20,
+0xbc, 0x1f,
+0xbd, 0x1f,
+0xc0, 0x14,
+0xc1, 0x1f,
+0xc2, 0x1f,
+0xc3, 0x18, //2b
+0xc4, 0x10, //08
+0xc8, 0x80,
+0xc9, 0x40,
+/////// PAGE 22 START ///////
+0x03, 0x22,
+0x10, 0xfd,
+0x11, 0x2e,
+0x19, 0x01,
+0x20, 0x30,
+0x21, 0x80,
+0x24, 0x01,
+0x30, 0x80,
+0x31, 0x80,
+0x38, 0x11,
+0x39, 0x34,
+0x40, 0xf7,
+0x41, 0x55,
+0x42, 0x33, //43
+
+0x43, 0xf6,
+0x44, 0x55, //44
+0x45, 0x44, //33
+
+0x46, 0x00,
+0x50, 0xb2,
+0x51, 0x81,
+0x52, 0x98,
+0x80, 0x38,//40
+0x81, 0x20,
+0x82, 0x30,
+
+0x83, 0x52,
+0x84, 0x16,//1E
+0x85, 0x5A,//52
+0x86, 0x23,
+
+0x87, 0x45,
+0x88, 0x35,
+0x89, 0x47,
+0x8a, 0x2b,
+
+0x8b, 0x40,
+0x8c, 0x33,
+0x8d, 0x38,
+0x8e, 0x30,
+
+0x8f, 0x53,
+0x90, 0x52,
+0x91, 0x50,
+0x92, 0x4c,
+0x93, 0x43,
+0x94, 0x37,
+0x95, 0x2f,//2a
+0x96, 0x26,//24
+0x97, 0x21,//20
+0x98, 0x1e,
+0x99, 0x1f,
+0x9a, 0x20,
+0x9b, 0x88,
+0x9c, 0x88,
+0x9d, 0x48,
+0x9e, 0x38,
+0x9f, 0x30,
+0xa0, 0x60,
+0xa1, 0x34,
+0xa2, 0x6f,
+0xa3, 0xff,
+0xa4, 0x14,
+0xa5, 0x2c,
+0xa6, 0xcf,
+0xad, 0x40,
+0xae, 0x4a,
+0xaf, 0x28,
+0xb0, 0x26,
+0xb1, 0x00,
+0xb8, 0xa0,
+0xb9, 0x00,
+// PAGE 20
+0x03, 0x20, //page 20
+0x10, 0x9c, //ae off
+// PAGE 22
+0x03, 0x22, //page 22
+0x10, 0xe9, //awb off
+// PAGE 0
+0x03, 0x00,
+0x0e, 0x03, //PLL On
+0x0e, 0x73, //PLLx2
+0x03, 0x00, // Dummy 750us
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+0x03, 0x00,
+ 0x03, 0x00,
+ 0x01, 0xf8,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.c b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.c
new file mode 100755
index 00000000..61a6859e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.c
@@ -0,0 +1,333 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "hi257.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, hi257_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, hi257_640_480_regs),
+// CMOS_WIN_SIZE("SVGA", 800, 600, hi257_800_600_regs),
+// CMOS_WIN_SIZE("720p", 1280, 720, hi257_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, hi257_1600_1200_rets),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = hi257_wb_auto;
+ size = ARRAY_SIZE(hi257_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = hi257_wb_incandescent;
+ size = ARRAY_SIZE(hi257_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = hi257_wb_daylight;
+ size = ARRAY_SIZE(hi257_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = hi257_wb_cloudy;
+ size = ARRAY_SIZE(hi257_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = hi257_wb_fluorescent;
+ size = ARRAY_SIZE(hi257_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = hi257_scene_mode_auto;
+ size = ARRAY_SIZE(hi257_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = hi257_scene_mode_night;
+ size = ARRAY_SIZE(hi257_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = hi257_exposure_neg6;
+ size = ARRAY_SIZE(hi257_exposure_neg6);
+ break;
+ case -1:
+ regs = hi257_exposure_neg3;
+ size = ARRAY_SIZE(hi257_exposure_neg3);
+ break;
+ case 0:
+ regs = hi257_exposure_zero;
+ size = ARRAY_SIZE(hi257_exposure_zero);
+ break;
+ case 1:
+ regs = hi257_exposure_pos3;
+ size = ARRAY_SIZE(hi257_exposure_pos3);
+ break;
+ case 2:
+ regs = hi257_exposure_pos6;
+ size = ARRAY_SIZE(hi257_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x03, 0x00);
+
+ data = sensor_read(sd, 0x11);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x11, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x03, 0x00);
+
+ data = sensor_read(sd, 0x11);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x11, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ sensor_write(sd, 0x03, 0x0);
+
+ data = sensor_read(sd, 0x04);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, hi257_default_regs_init,
+ ARRAY_SIZE(hi257_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops hi257_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev hi257 = {
+ .name = "hi257",
+ .i2c_addr = 0x20,
+ .id = 0xc4,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &hi257_ops,
+};
+
+#if 0
+static int __init hi257_init(void)
+{
+ return cmos_register_sudbdev(&hi257);
+}
+
+static void __exit hi257_exit(void)
+{
+ return cmos_unregister_subdev(&hi257);
+}
+
+module_init(hi257_init);
+module_exit(hi257_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.h b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.h
new file mode 100755
index 00000000..a64be87a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257.h
@@ -0,0 +1,2195 @@
+#ifndef HI257_H
+#define HI257_H
+
+// Scene Mode
+uint8_t hi257_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x60,
+ 0xff,0xff,
+};
+
+uint8_t hi257_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi257_wb_auto [] = {
+ 0x03,0x22,
+ 0x11,0x2e,
+ 0x83,0x58, // RMAX
+ 0x84,0x16, // RMIN
+ 0x85,0x4f, // BMAX
+ 0x86,0x1a, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x4d,
+ 0x83,0x25,
+ 0x84,0x1b,
+ 0x85,0x55,
+ 0x86,0x48,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi257_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi257_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi257_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x80,
+};
+
+uint8_t hi257_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi257_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi257_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_1280_720_regs[]={
+};
+
+uint8_t hi257_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x00,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x00,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x44,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_320_240_regs[]= {
+ 0x01,0x01, //sleep on
+0x01,0x03, //sleep off
+0x01,0x01, //sleep on
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x08,0x00,
+0x09,0x77, // pad strength = max
+0x0a,0x07, // pad strength = max
+
+0x0e,0x03, //PLL On
+0x0e,0x73, //PLLx2
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+
+///// PAGE 20 /////
+0x03,0x20, //page 20
+0x10,0x1c, //AE off 50hz
+
+///// PAGE 22 /////
+0x03,0x22, //page 22
+0x10,0x69, //AWB off
+
+
+///// Initial Start /////
+///// PAGE 0 Start /////
+0x03,0x00, //page 0
+0x10,0x91,
+0x11,0x90, //Windowing On + 1Frame Skip
+0x12,0x04, //Rinsing edge 0x04 // Falling edge 0x00
+0x14,0x05,
+
+0x20,0x00, //Row H
+0x21,0x02, //Row L
+0x22,0x00, //Col H
+0x23,0x04, //Col L
+
+0x24,0x04, //Window height_H //= 1200
+0x25,0xb0, //Window height_L //
+0x26,0x06, //Window width_H //= 1600
+0x27,0x40, //Window wight_L
+
+0x40,0x01, //Hblank_360
+0x41,0x78,
+0x42,0x00, //Vblank
+0x43,0x14, //Flick Stop
+
+0x50,0x00, //Test Pattern
+
+///// BLC /////
+0x80,0x2e,
+0x81,0x7e,
+0x82,0x90,
+0x83,0x00,
+0x84,0xcc, //20130604 0x0c->0xcc
+0x85,0x00,
+0x86,0x00,
+0x87,0x0f,
+0x88,0x34,
+0x8a,0x0b,
+0x8e,0x80, //Pga Blc Hold
+
+0x90,0x0c, //BLC_TIME_TH_ON
+0x91,0x0c, //BLC_TIME_TH_OFF
+0x92,0x58, //BLC_AG_TH_ON
+0x93,0x50, //BLC_AG_TH_OFF
+0x96,0xdc, //BLC Outdoor Th On
+0x97,0xfe, //BLC Outdoor Th Off
+0x98,0x38,
+
+//OutDoor BLC
+0x99,0x43, //R,Gr,B,Gb Offset
+
+//Dark BLC
+0xa0,0x02, //R,Gr,B,Gb Offset
+
+//Normal BLC
+0xa8,0x43, //R,Gr,B,Gb Offset
+///// PAGE 0 END /////
+
+///// PAGE 2 START /////
+0x03,0x02,
+0x10,0x00,
+0x13,0x00,
+0x14,0x00,
+0x18,0xcc,
+0x19,0x01, // pmos switch on (for cfpn)
+0x1A,0x39, //20130604 0x09->0xcc
+0x1B,0x00,
+0x1C,0x1a, // for ncp
+0x1D,0x14, // for ncp
+0x1E,0x30, // for ncp
+0x1F,0x10,
+
+0x20,0x77,
+0x21,0xde,
+0x22,0xa7,
+0x23,0x30,
+0x24,0x77,
+0x25,0x10,
+0x26,0x10,
+0x27,0x3c,
+0x2b,0x80,
+0x2c,0x02,
+0x2d,0x58,
+0x2e,0x11,//20130604 0xde->0x11
+0x2f,0x11,//20130604 0xa7->0x11
+
+0x30,0x00,
+0x31,0x99,
+0x32,0x00,
+0x33,0x00,
+0x34,0x22,
+0x36,0x75,
+0x38,0x88,
+0x39,0x88,
+0x3d,0x03,
+0x3f,0x02,
+
+0x49,0xc1,//20130604 0x87->0xd1 --> mode Change Issue modify -> 0xc1
+0x4a,0x10,
+
+0x50,0x21,
+0x53,0xb1,
+0x54,0x10,
+0x55,0x1c, // for ncp
+0x56,0x11,
+0x58,0x3a,//20130604 add
+0x59,0x38,//20130604 add
+0x5d,0xa2,
+0x5e,0x5a,
+
+0x60,0x87,
+0x61,0x98,
+0x62,0x88,
+0x63,0x96,
+0x64,0x88,
+0x65,0x96,
+0x67,0x3f,
+0x68,0x3f,
+0x69,0x3f,
+
+0x72,0x89,
+0x73,0x95,
+0x74,0x89,
+0x75,0x95,
+0x7C,0x84,
+0x7D,0xaf,
+
+0x80,0x01,
+0x81,0x7a,
+0x82,0x13,
+0x83,0x24,
+0x84,0x78,
+0x85,0x7c,
+
+0x92,0x44,
+0x93,0x59,
+0x94,0x78,
+0x95,0x7c,
+
+0xA0,0x02,
+0xA1,0x74,
+0xA4,0x74,
+0xA5,0x02,
+0xA8,0x85,
+0xA9,0x8c,
+0xAC,0x10,
+0xAD,0x16,
+
+0xB0,0x99,
+0xB1,0xa3,
+0xB4,0x9b,
+0xB5,0xa2,
+0xB8,0x9b,
+0xB9,0x9f,
+0xBC,0x9b,
+0xBD,0x9f,
+
+0xc4,0x29,
+0xc5,0x40,
+0xc6,0x5c,
+0xc7,0x72,
+0xc8,0x2a,
+0xc9,0x3f,
+0xcc,0x5d,
+0xcd,0x71,
+
+0xd0,0x10,
+0xd1,0x14,
+0xd2,0x20,
+0xd3,0x00,
+0xd4,0x0c, //DCDC_TIME_TH_ON
+0xd5,0x0c, //DCDC_TIME_TH_OFF
+0xd6,0x58, //DCDC_AG_TH_ON
+0xd7,0x50, //DCDC_AG_TH_OFF
+0xdc,0x00,
+0xdd,0xa3,
+0xde,0x00,
+0xdf,0x84,
+
+0xe0,0xa4,
+0xe1,0xa4,
+0xe2,0xa4,
+0xe3,0xa4,
+0xe4,0xa4,
+0xe5,0x01,
+0xe8,0x00,
+0xe9,0x00,
+0xea,0x77,
+
+0xF0,0x00,
+0xF1,0x00,
+0xF2,0x00,
+
+///// PAGE 2 END /////
+
+///// PAGE 10 START /////
+0x03,0x10, //page 10
+0x10,0x03, //S2D enable _ YUYV Order o??
+0x11,0x03,
+0x12,0xf0,
+0x13,0x01,
+
+0x20,0x00,
+0x21,0x40,
+0x22,0x0f,
+0x24,0x20,
+0x25,0x10,
+0x26,0x01,
+0x27,0x02,
+0x28,0x11,
+
+0x40,0x00,
+0x41,0x00, //D-YOffset Th
+0x42,0x04, //Cb Offset
+0x43,0x04, //Cr Offset
+0x44,0x80,
+0x45,0x80,
+0x46,0xf0,
+0x48,0x80,
+0x4a,0x80,
+
+0x50,0xa0, //D-YOffset AG
+
+0x60,0x0f,
+0x61,0xc0, //Sat B
+0x62,0xc0, //Sat R
+0x63,0x58, //Auto-De Color
+
+0x66,0x42,
+0x67,0x22,
+
+0x6a,0x7c, //White Protection Offset Dark/Indoor
+0x74,0x0c, //White Protection Offset Outdoor
+0x76,0x01, //White Protection Enable
+///// PAGE 10 END /////
+
+///// PAGE 11 START /////
+0x03,0x11, //page 11
+
+//LPF Auto Control
+0x20,0x00,
+0x21,0x00,
+0x26,0x5a, // Double_AG
+0x27,0x58, // Double_AG
+0x28,0x0f,
+0x29,0x10,
+0x2b,0x30,
+0x2c,0x32,
+
+//GBGR
+0x70,0x2b,
+0x74,0x30,
+0x75,0x18,
+0x76,0x30,
+0x77,0xff,
+0x78,0xa0,
+0x79,0xff, //Dark GbGr Th
+0x7a,0x30,
+0x7b,0x20,
+0x7c,0xf4, //Dark Dy Th B[7:4]
+///// PAGE 11 END /////
+
+///// PAGE 12 START /////
+0x03,0x12, //page 11
+
+//YC2D
+0x10,0x03, //Y DPC Enable
+0x11,0x08, //
+0x12,0x10, //0x30 -> 0x10
+0x20,0x53, //Y_lpf_enable
+0x21,0x03, //C_lpf_enable_on
+0x22,0xe6, //YC2D_CrCbY_Dy
+
+0x23,0x14, //Outdoor Dy Th
+0x24,0x20, //Indoor Dy Th // For reso Limit 0x20
+0x25,0x30, //Dark Dy Th
+
+//Outdoor LPF Flat
+0x30,0xff, //Y Hi Th
+0x31,0x00, //Y Lo Th
+0x32,0xf0, //Std Hi Th //Reso Improve Th Low //50
+0x33,0x00, //Std Lo Th
+0x34,0x00, //Median ratio
+
+//Indoor LPF Flat
+0x35,0xff, //Y Hi Th
+0x36,0x00, //Y Lo Th
+0x37,0xff, //Std Hi Th //Reso Improve Th Low //50
+0x38,0x00, //Std Lo Th
+0x39,0x00, //Median ratio
+
+//Dark LPF Flat
+0x3a,0xff, //Y Hi Th
+0x3b,0x00, //Y Lo Th
+0x3c,0x93, //Std Hi Th //Reso Improve Th Low //50
+0x3d,0x00, //Std Lo Th
+0x3e,0x00, //Median ratio
+
+//Outdoor Cindition
+0x46,0xa0, //Out Lum Hi
+0x47,0x40, //Out Lum Lo
+
+//Indoor Cindition
+0x4c,0xb0, //Indoor Lum Hi
+0x4d,0x40, //Indoor Lum Lo
+
+//Dark Cindition
+0x52,0xb0, //Dark Lum Hi
+0x53,0x50, //Dark Lum Lo
+
+//C-Filter
+0x70,0x10, //Outdoor(2:1) AWM Th Horizontal
+0x71,0x0a, //Outdoor(2:1) Diff Th Vertical
+0x72,0x10, //Indoor,Dark1 AWM Th Horizontal
+0x73,0x0a, //Indoor,Dark1 Diff Th Vertical
+0x74,0x18, //Dark(2:3) AWM Th Horizontal
+0x75,0x0f, //Dark(2:3) Diff Th Vertical
+
+//DPC
+0x90,0x7d,
+0x91,0x34,
+0x99,0x28,
+0x9c,0x14,
+0x9d,0x15,
+0x9e,0x28,
+0x9f,0x28,
+0xb0,0x0e, //Zipper noise Detault change (0x75->0x0e)
+0xb8,0x44,
+0xb9,0x15,
+///// PAGE 12 END /////
+
+///// PAGE 13 START /////
+0x03,0x13, //page 13
+
+0x80,0xfd, //Sharp2D enable _ YUYV Order o??
+0x81,0x07, //Sharp2D Clip/Limit
+0x82,0x73, //Sharp2D Filter
+0x83,0x00, //Sharp2D Low Clip
+0x85,0x00,
+
+0x92,0x33, //Sharp2D Slop n/p
+0x93,0x30, //Sharp2D LClip
+0x94,0x02, //Sharp2D HiClip1 Th
+0x95,0xf0, //Sharp2D HiClip2 Th
+0x96,0x1e, //Sharp2D HiClip2 Resolution
+0x97,0x40,
+0x98,0x80,
+0x99,0x40,
+
+//Sharp Lclp
+0xa2,0x04, //Outdoor Lclip_N
+0xa3,0x05, //Outdoor Lclip_P
+0xa4,0x06, //Indoor Lclip_N 0x03 For reso Limit 0x0e
+0xa5,0x07, //Indoor Lclip_P 0x0f For reso Limit 0x0f
+0xa6,0x80, //Dark Lclip_N
+0xa7,0x80, //Dark Lclip_P
+
+//Outdoor Slope
+0xb6,0x28, //Lum negative Hi
+0xb7,0x20, //Lum negative middle
+0xb8,0x24, //Lum negative Low
+0xb9,0x28, //Lum postive Hi
+0xba,0x20, //Lum postive middle
+0xbb,0x24, //Lum postive Low
+
+//Indoor Slope
+0xbc,0x20, //Lum negative Hi
+0xbd,0x20, //Lum negative middle
+0xbe,0x20, //Lum negative Low
+0xbf,0x20, //Lum postive Hi
+0xc0,0x20, //Lum postive middle
+0xc1,0x20, //Lum postive Low
+
+//Dark Slope
+0xc2,0x14, //Lum negative Hi
+0xc3,0x24, //Lum negative middle
+0xc4,0x1d, //Lum negative Low
+0xc5,0x14, //Lum postive Hi
+0xc6,0x24, //Lum postive middle
+0xc7,0x1d, //Lum postive Low
+///// PAGE 13 END /////
+
+///// PAGE 14 START /////
+0x03,0x14, //page 14
+0x10,0x01,
+
+0x20,0xA0,//X-Center
+0x21,0x80,//Y-Center
+
+0x22,0x12, //LSC R 1b->15 20130125
+0x23,0x0f, //LSC G
+0x24,0x0f, //LSC B
+
+0x25,0xf0, //LSC Off
+0x26,0xf0, //LSC On
+///// PAGE 14 END /////
+
+/////// PAGE 15 START ///////
+0x03,0x15, //page 15
+0x10,0x21,
+0x14,0x44,
+0x15,0x34,
+0x16,0x26,
+0x17,0x2f,
+
+//CMC
+0x30,0xdd,
+0x31,0x68,
+0x32,0x0b,
+0x33,0x2c,
+0x34,0xce,
+0x35,0x22,
+0x36,0x0e,
+0x37,0x42,
+0x38,0xd0,
+
+//CMC OFS
+0x40,0x90,
+0x41,0x16,
+0x42,0x86,
+0x43,0x01,
+0x44,0x10,
+0x45,0x91,
+0x46,0x82,
+0x47,0x9c,
+0x48,0x1d,
+
+//CMC POFS
+0x50,0x0d,
+0x51,0x91,
+0x52,0x04,
+0x53,0x07,
+0x54,0x19,
+0x55,0xa0,
+0x56,0x00,
+0x57,0x98,
+0x58,0x18,
+///// PAGE 15 END /////
+
+///// PAGE 16 START /////
+0x03,0x16, //page 16
+0x10,0x31,
+0x18,0x5a,// Double_AG 5e->37
+0x19,0x58,// Double_AG 5e->36
+0x1a,0x0e,
+0x1b,0x01,
+0x1c,0xdc,
+0x1d,0xfe,
+
+//Indoor
+0x30,0x00,
+0x31,0x06,
+0x32,0x12,
+0x33,0x29,
+0x34,0x4d,
+0x35,0x6c,
+0x36,0x81,
+0x37,0x94,
+0x38,0xa4,
+0x39,0xb3,
+0x3a,0xc0,
+0x3b,0xcb,
+0x3c,0xd5,
+0x3d,0xde,
+0x3e,0xe6,
+0x3f,0xee,
+0x40,0xf5,
+0x41,0xfc,
+0x42,0xff,
+
+
+//Outdoor
+0x50,0x00,
+0x51,0x06,
+0x52,0x12,
+0x53,0x29,
+0x54,0x45,
+0x55,0x60,
+0x56,0x7a,
+0x57,0x8e,
+0x58,0xa1,
+0x59,0xac,
+0x5a,0xb8,
+0x5b,0xc5,
+0x5c,0xd0,
+0x5d,0xda,
+0x5e,0xe3,
+0x5f,0xeb,
+0x60,0xf0,
+0x61,0xf4,
+0x62,0xf5,
+
+//Dark
+0x70,0x00,
+0x71,0x0e,
+0x72,0x17,
+0x73,0x26,
+0x74,0x3f,
+0x75,0x56,
+0x76,0x6c,
+0x77,0x81,
+0x78,0x94,
+0x79,0xa5,
+0x7a,0xb3,
+0x7b,0xc4,
+0x7c,0xce,
+0x7d,0xd9,
+0x7e,0xe4,
+0x7f,0xec,
+0x80,0xf5,
+0x81,0xfc,
+0x82,0xff,
+///// PAGE 16 END /////
+
+///// PAGE 17 START /////
+0x03,0x17, //page 17
+0xc1,0x00,
+0xc4,0x4b,
+0xc5,0x3f,
+0xc6,0x02,
+0xc7,0x20,
+///// PAGE 17 END /////
+
+///// PAGE 18 START /////
+ //page 18
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x02,
+ 0x21, 0x80,
+ 0x22, 0x01,
+ 0x23, 0xe0,
+ 0x24, 0x00,
+ 0x25, 0x00,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x02,
+ 0x29, 0x80,
+ 0x2a, 0x01,
+ 0x2b, 0xe0,
+ 0x2c, 0x14,
+ 0x2d, 0x00,
+ 0x2e, 0x14,
+ 0x2f, 0x00,
+ 0x30, 0x64,
+///// PAGE 18 END /////
+
+///// PAGE 19 START /////
+0x03,0x19, //Page 0x18
+0x10,0x7f, //mcmc_ctl1 MCMC Enable B:[0]
+0x11,0x7f, //mcmc_ctl2
+0x12,0x1b, //mcmc_delta1
+0x13,0xac, //mcmc_center1
+0x14,0x1e, //mcmc_delta2
+0x15,0x6e, //mcmc_center2
+0x16,0x0a, //mcmc_delta3
+0x17,0xb8, //mcmc_center3
+0x18,0x1e, //mcmc_delta4
+0x19,0xe6, //mcmc_center4
+0x1a,0x9e, //mcmc_delta5
+0x1b,0x22, //mcmc_center5
+0x1c,0x9e, //mcmc_delta6
+0x1d,0x5e, //mcmc_center6
+0x1e,0x70,//mcmc_sat_gain1
+0x1f,0x37, //mcmc_sat_gain2
+0x20,0x21, //mcmc_sat_gain3
+0x21,0x43, //mcmc_sat_gain4
+0x22,0x2f, //mcmc_sat_gain5
+0x23,0x37, //mcmc_sat_gain6
+0x24,0x00, //mcmc_hue_angle1
+0x25,0x07, //mcmc_hue_angle2
+0x26,0x09, //mcmc_hue_angle3
+0x27,0x04, //mcmc_hue_angle4
+0x28,0x00, //mcmc_hue_angle5
+0x29,0x8c, //mcmc_hue_angle6
+
+0x53,0x10, //mcmc_ctl3
+
+0x6c,0xff, //mcmc_lum_ctl1 sat hue offset
+0x6d,0x3f, //mcmc_lum_ctl2 gain
+0x6e,0x00, //mcmc_lum_ctl3 hue
+0x6f,0x00, //mcmc_lum_ctl4 rgb offset
+0x70,0x00, //mcmc_lum_ctl5 rgb scale
+
+0x71,0x3f, //mcmc_lum_gain_wgt_th1 R1 magenta
+0x72,0x3f, //mcmc_lum_gain_wgt_th2 R1
+0x73,0x3f, //mcmc_lum_gain_wgt_th3 R1
+0x74,0x3f, //mcmc_lum_gain_wgt_th4 R1
+0x75,0x30, //mcmc_rg1_lum_sp1 R1
+0x76,0x50, //mcmc_rg1_lum_sp2 R1
+0x77,0x80, //mcmc_rg1_lum_sp3 R1
+0x78,0xb0, //mcmc_rg1_lum_sp4 R1
+
+0x79,0x3f, //mcmc_lum_gain_wgt_th1 R2 bright green
+0x7a,0x3f, //mcmc_lum_gain_wgt_th2 R2
+0x7b,0x3f, //mcmc_lum_gain_wgt_th3 R2
+0x7c,0x3f, //mcmc_lum_gain_wgt_th4 R2
+0x7d,0x28, //mcmc_rg2_lum_sp1 R2
+0x7e,0x50, //mcmc_rg2_lum_sp2 R2
+0x7f,0x80, //mcmc_rg2_lum_sp3 R2
+0x80,0xb0, //mcmc_rg2_lum_sp4 R2
+
+0x81,0x28, //mcmc_lum_gain_wgt_th1 R3 dark green
+0x82,0x3f, //mcmc_lum_gain_wgt_th2 R3
+0x83,0x3f, //mcmc_lum_gain_wgt_th3 R3
+0x84,0x3f, //mcmc_lum_gain_wgt_th4 R3
+0x85,0x28, //mcmc_rg3_lum_sp1 R3
+0x86,0x50, //mcmc_rg3_lum_sp2 R3
+0x87,0x80, //mcmc_rg3_lum_sp3 R3
+0x88,0xb0, //mcmc_rg3_lum_sp4 R3
+
+0x89,0x1a, //mcmc_lum_gain_wgt_th1 R4 skin
+0x8a,0x28, //mcmc_lum_gain_wgt_th2 R4
+0x8b,0x3f, //mcmc_lum_gain_wgt_th3 R4
+0x8c,0x3f, //mcmc_lum_gain_wgt_th4 R4
+0x8d,0x10, //mcmc_rg3_lum_sp1 R4
+0x8e,0x30, //mcmc_rg3_lum_sp2 R4
+0x8f,0x60, //mcmc_rg3_lum_sp3 R4
+0x90,0x90, //mcmc_rg3_lum_sp4 R4
+
+0x91,0x1a, //mcmc_rg5_gain_wgt_th1 R5 cyan
+0x92,0x28, //mcmc_rg5_gain_wgt_th2 R5
+0x93,0x3f, //mcmc_rg5_gain_wgt_th3 R5
+0x94,0x3f, //mcmc_rg5_gain_wgt_th4 R5
+0x95,0x28, //mcmc_rg5_lum_sp1 R5
+0x96,0x50, //mcmc_rg5_lum_sp2 R5
+0x97,0x80, //mcmc_rg5_lum_sp3 R5
+0x98,0xb0, //mcmc_rg5_lum_sp4 R5
+
+0x99,0x1a, //mcmc_rg6_gain_wgt_th1 R6 blue
+0x9a,0x28, //mcmc_rg6_gain_wgt_th2 R6
+0x9b,0x3f, //mcmc_rg6_gain_wgt_th3 R6
+0x9c,0x3f, //mcmc_rg6_gain_wgt_th4 R6
+0x9d,0x28, //mcmc_rg6_lum_sp1 R6
+0x9e,0x50, //mcmc_rg6_lum_sp2 R6
+0x9f,0x80, //mcmc_rg6_lum_sp3 R6
+0xa0,0xb0, //mcmc_rg6_lum_sp4 R6
+
+0xa2,0x00,
+0xe5,0x80, //add 20120709 Bit[7] On MCMC --> YC2D_LPF
+
+/////// PAGE 20 START ///////
+0x03,0x20,
+0x10,0x1c,
+0x11,0x14,
+0x18,0x30,
+0x20,0x25, //8x8 Ae weight 0~7 Outdoor / Weight Outdoor On B[5]
+0x21,0x30,
+0x22,0x10,
+0x23,0x00,
+
+0x28,0xe7,
+0x29,0x0d,
+0x2a,0xff,
+0x2b,0x04, //Adaptive Off,1/100 Flicker
+
+0x2c,0x83, //AE After CI
+0x2d,0x03,
+0x2e,0x13,
+0x2f,0x0b,
+
+0x30,0x78,
+0x31,0xd7,
+0x32,0x10,
+0x33,0x2e,
+0x34,0x20,
+0x35,0xd4,
+0x36,0xfe,
+0x37,0x32,
+0x38,0x04,
+0x39,0x22,
+0x3a,0xde,
+0x3b,0x22,
+0x3c,0xde,
+0x3d,0xe1,
+
+0x50,0x45,
+0x51,0x88,
+
+0x56,0x1f, // for tracking
+0x57,0xa6, // for tracking
+0x58,0x1a, // for tracking
+0x59,0x7a, // for tracking
+
+0x5a,0x04,
+0x5b,0x04,
+
+0x5e,0xc7,
+0x5f,0x95,
+
+0x62,0x10,
+0x63,0xc0,
+0x64,0x10,
+0x65,0x8a,
+0x66,0x58,
+0x67,0x58,
+
+0x70,0x54, //6c
+0x71,0x80, //81(+4),89(-4)
+
+0x76,0x32,
+0x77,0xb1,
+0x78,0x22, //24
+0x79,0x32, // Y Target 70 => 25,72 => 26 //
+0x7a,0x23, //23
+0x7b,0x22, //22
+0x7d,0x23,
+
+0x83,0x02, //EXP Normal 33.33 fps
+0x84,0xbf,
+0x85,0x20,
+
+0x86,0x01, //EXPMin 12000.00 fps
+0x87,0xf4,
+
+0x88,0x0b, //EXP Max(120Hz) 8.00 fps
+0x89,0x71,
+0x8a,0xb0,
+
+0xa5,0x0b, //EXP Max(100Hz) 7.69 fps
+0xa6,0xe6,
+0xa7,0xe0,
+
+0x8B,0xea, //EXP100
+0x8C,0x60,
+
+0x8D,0xc3, //EXP120
+0x8E,0x50,
+
+0x9c,0x0f, //EXP Limit 1500.00 fps
+0x9d,0xa0,
+0x9e,0x01, //EXP Unit
+0x9f,0xf4,
+
+0xa3,0x00,
+0xa4,0xfd, //Exp 12000
+
+0xb0,0x15,
+0xb1,0x14,
+0xb2,0x60,
+0xb3,0x1a,
+0xb4,0x1c,
+0xb5,0x48,
+0xb6,0x32,
+0xb7,0x2b,
+0xb8,0x27,
+0xb9,0x25,
+0xba,0x23,
+0xbb,0x22,
+0xbc,0x22,
+0xbd,0x21,
+
+0xc0,0x10,
+0xc1,0x40,
+0xc2,0x40,
+0xc3,0x40,
+0xc4,0x06,
+
+0xc8,0x80,
+0xc9,0x80,
+///// PAGE 20 END /////
+
+///// PAGE 21 START /////
+0x03,0x21, //page 21
+
+//Indoor Weight
+0x20,0x11,
+0x21,0x11,
+0x22,0x11,
+0x23,0x11,
+0x24,0x14,
+0x25,0x44,
+0x26,0x44,
+0x27,0x41,
+0x28,0x14,
+0x29,0x44,
+0x2a,0x44,
+0x2b,0x41,
+0x2c,0x14,
+0x2d,0x47,
+0x2e,0x74,
+0x2f,0x41,
+0x30,0x14,
+0x31,0x47,
+0x32,0x74,
+0x33,0x41,
+0x34,0x14,
+0x35,0x44,
+0x36,0x44,
+0x37,0x41,
+0x38,0x14,
+0x39,0x44,
+0x3a,0x44,
+0x3b,0x41,
+0x3c,0x11,
+0x3d,0x11,
+0x3e,0x11,
+0x3f,0x11,
+
+//Outdoor Weight
+0x40,0x11,
+0x41,0x11,
+0x42,0x11,
+0x43,0x11,
+0x44,0x14,
+0x45,0x44,
+0x46,0x44,
+0x47,0x41,
+0x48,0x14,
+0x49,0x44,
+0x4a,0x44,
+0x4b,0x41,
+0x4c,0x14,
+0x4d,0x47,
+0x4e,0x74,
+0x4f,0x41,
+0x50,0x14,
+0x51,0x47,
+0x52,0x74,
+0x53,0x41,
+0x54,0x14,
+0x55,0x44,
+0x56,0x44,
+0x57,0x41,
+0x58,0x14,
+0x59,0x44,
+0x5a,0x44,
+0x5b,0x41,
+0x5c,0x11,
+0x5d,0x11,
+0x5e,0x11,
+0x5f,0x11,
+
+
+///// PAGE 22 START /////
+0x03,0x22, //page 22
+0x10,0xfd,
+0x11,0x2e,
+0x19,0x00, //Low On //
+0x20,0x30, //For AWB Speed
+0x21,0x80,
+0x22,0x00,
+0x23,0x00,
+0x24,0x01,
+0x25,0x7e, //for Tracking setting
+
+0x30,0x80,
+0x31,0x80,
+0x38,0x11,
+0x39,0x34,
+0x40,0xe4, //Stb Yth
+0x41,0x33, //Stb cdiff
+0x42,0x22, //Stb csum
+0x43,0xf3, //Unstb Yth
+0x44,0x55, //Unstb cdiff
+0x45,0x33, //Unstb csum
+0x46,0x00,
+0x47,0xa2,
+0x48,0x02,
+0x49,0x0a,
+
+0x60,0x04,
+0x61,0xc4,
+0x62,0x04,
+0x63,0x92,
+0x66,0x04,
+0x67,0xc4,
+0x68,0x04,
+0x69,0x92,
+
+0x80,0x38,
+0x81,0x20,
+0x82,0x38,
+
+0x83,0x58,
+0x84,0x16,
+0x85,0x4f,
+0x86,0x1a,
+
+0x87,0x42,
+0x88,0x30,
+0x89,0x27,
+0x8a,0x18,
+
+0x8b,0x3d,
+0x8c,0x32,
+0x8d,0x24,
+0x8e,0x1d,
+
+0x8f,0x4d, //4e
+0x90,0x46, //4d
+0x91,0x40, //4c
+0x92,0x3a, //4a
+0x93,0x2f, //46
+0x94,0x21,
+0x95,0x19,
+0x96,0x16,
+0x97,0x13,
+0x98,0x12,
+0x99,0x11,
+0x9a,0x10,
+
+0x9b,0xbb,
+0x9c,0xaa,
+0x9d,0x48,
+0x9e,0x38,
+0x9f,0x30,
+
+0xa0,0x70,
+0xa1,0x54,
+0xa2,0x6f,
+0xa3,0xff,
+
+0xa4,0x14, //1536fps
+0xa5,0x2c, //698fps
+0xa6,0xcf, //148fps
+
+0xad,0x40,
+0xae,0x4a,
+
+0xaf,0x28, //Low temp Rgain
+0xb0,0x26, //Low temp Rgain
+
+0xb1,0x00,
+0xb4,0xbf, //For Tracking AWB Weight
+0xb8,0x91, //(0+,1-)High Cb ,(0+,1-)Low Cr
+0xb9,0x00,
+/////// PAGE 22 END ///////
+
+/////// PAGE 20 ///////
+0x03,0x20,
+0x10,0x9c, //AE On 50hz
+
+/////// PAGE 22 ///////
+0x03,0x22,
+0x10,0xe9, //AWB On
+
+/////// PAGE 0 ///////
+0x03,0x00,
+0x0e,0x03,
+0x0e,0x73,
+
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x03,0x18,
+0x12,0x20,
+0x10,0x07,
+0x11,0x00,
+0x20,0x02,
+0x21,0x80,
+0x22,0x03,
+0x23,0xc0,
+0x24,0x00,
+0x25,0x00,
+0x26,0x00,
+0x27,0x00,
+0x28,0x02,
+0x29,0x80,
+0x2a,0x03,
+0x2b,0xc0,
+0x2c,0x0a,
+0x2d,0x00,
+0x2e,0x0a,
+0x2f,0x00,
+0x30,0x24,
+
+0x03,0x00,
+0x01,0x00,
+
+};
+
+uint8_t hi257_default_regs_init[]={
+
+0x01,0x01, //sleep on
+0x01,0x03, //sleep off
+0x01,0x01, //sleep on
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x08,0x00,
+0x09,0x77, // pad strength = max
+0x0a,0x07, // pad strength = max
+
+0x0e,0x03, //PLL On
+0x0e,0x73, //PLLx2
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+
+///// PAGE 20 /////
+0x03,0x20, //page 20
+0x10,0x1c, //AE off 50hz
+
+///// PAGE 22 /////
+0x03,0x22, //page 22
+0x10,0x69, //AWB off
+
+
+///// Initial Start /////
+///// PAGE 0 Start /////
+0x03,0x00, //page 0
+0x10,0x90,
+0x11,0x90, //Windowing On + 1Frame Skip
+0x12,0x04, //Rinsing edge 0x04 // Falling edge 0x00
+0x14,0x05,
+
+0x20,0x00, //Row H
+0x21,0x02, //Row L
+0x22,0x00, //Col H
+0x23,0x04, //Col L
+
+0x24,0x04, //Window height_H //= 1200
+0x25,0xb0, //Window height_L //
+0x26,0x06, //Window width_H //= 1600
+0x27,0x40, //Window wight_L
+
+0x40,0x01, //Hblank_360
+0x41,0x78,
+0x42,0x00, //Vblank
+0x43,0x14, //Flick Stop
+
+0x50,0x00, //Test Pattern
+
+///// BLC /////
+0x80,0x2e,
+0x81,0x7e,
+0x82,0x90,
+0x83,0x00,
+0x84,0xcc, //20130604 0x0c->0xcc
+0x85,0x00,
+0x86,0x00,
+0x87,0x0f,
+0x88,0x34,
+0x8a,0x0b,
+0x8e,0x80, //Pga Blc Hold
+
+0x90,0x0c, //BLC_TIME_TH_ON
+0x91,0x0c, //BLC_TIME_TH_OFF
+0x92,0x58, //BLC_AG_TH_ON
+0x93,0x50, //BLC_AG_TH_OFF
+0x96,0xdc, //BLC Outdoor Th On
+0x97,0xfe, //BLC Outdoor Th Off
+0x98,0x38,
+
+//OutDoor BLC
+0x99,0x43, //R,Gr,B,Gb Offset
+
+//Dark BLC
+0xa0,0x02, //R,Gr,B,Gb Offset
+
+//Normal BLC
+0xa8,0x43, //R,Gr,B,Gb Offset
+///// PAGE 0 END /////
+
+///// PAGE 2 START /////
+0x03,0x02,
+0x10,0x00,
+0x13,0x00,
+0x14,0x00,
+0x18,0xcc,
+0x19,0x01, // pmos switch on (for cfpn)
+0x1A,0x39, //20130604 0x09->0xcc
+0x1B,0x00,
+0x1C,0x1a, // for ncp
+0x1D,0x14, // for ncp
+0x1E,0x30, // for ncp
+0x1F,0x10,
+
+0x20,0x77,
+0x21,0xde,
+0x22,0xa7,
+0x23,0x30,
+0x24,0x77,
+0x25,0x10,
+0x26,0x10,
+0x27,0x3c,
+0x2b,0x80,
+0x2c,0x02,
+0x2d,0x58,
+0x2e,0x11,//20130604 0xde->0x11
+0x2f,0x11,//20130604 0xa7->0x11
+
+0x30,0x00,
+0x31,0x99,
+0x32,0x00,
+0x33,0x00,
+0x34,0x22,
+0x36,0x75,
+0x38,0x88,
+0x39,0x88,
+0x3d,0x03,
+0x3f,0x02,
+
+0x49,0xc1,//20130604 0x87->0xd1 --> mode Change Issue modify -> 0xc1
+0x4a,0x10,
+
+0x50,0x21,
+0x53,0xb1,
+0x54,0x10,
+0x55,0x1c, // for ncp
+0x56,0x11,
+0x58,0x3a,//20130604 add
+0x59,0x38,//20130604 add
+0x5d,0xa2,
+0x5e,0x5a,
+
+0x60,0x87,
+0x61,0x98,
+0x62,0x88,
+0x63,0x96,
+0x64,0x88,
+0x65,0x96,
+0x67,0x3f,
+0x68,0x3f,
+0x69,0x3f,
+
+0x72,0x89,
+0x73,0x95,
+0x74,0x89,
+0x75,0x95,
+0x7C,0x84,
+0x7D,0xaf,
+
+0x80,0x01,
+0x81,0x7a,
+0x82,0x13,
+0x83,0x24,
+0x84,0x78,
+0x85,0x7c,
+
+0x92,0x44,
+0x93,0x59,
+0x94,0x78,
+0x95,0x7c,
+
+0xA0,0x02,
+0xA1,0x74,
+0xA4,0x74,
+0xA5,0x02,
+0xA8,0x85,
+0xA9,0x8c,
+0xAC,0x10,
+0xAD,0x16,
+
+0xB0,0x99,
+0xB1,0xa3,
+0xB4,0x9b,
+0xB5,0xa2,
+0xB8,0x9b,
+0xB9,0x9f,
+0xBC,0x9b,
+0xBD,0x9f,
+
+0xc4,0x29,
+0xc5,0x40,
+0xc6,0x5c,
+0xc7,0x72,
+0xc8,0x2a,
+0xc9,0x3f,
+0xcc,0x5d,
+0xcd,0x71,
+
+0xd0,0x10,
+0xd1,0x14,
+0xd2,0x20,
+0xd3,0x00,
+0xd4,0x0c, //DCDC_TIME_TH_ON
+0xd5,0x0c, //DCDC_TIME_TH_OFF
+0xd6,0x58, //DCDC_AG_TH_ON
+0xd7,0x50, //DCDC_AG_TH_OFF
+0xdc,0x00,
+0xdd,0xa3,
+0xde,0x00,
+0xdf,0x84,
+
+0xe0,0xa4,
+0xe1,0xa4,
+0xe2,0xa4,
+0xe3,0xa4,
+0xe4,0xa4,
+0xe5,0x01,
+0xe8,0x00,
+0xe9,0x00,
+0xea,0x77,
+
+0xF0,0x00,
+0xF1,0x00,
+0xF2,0x00,
+
+///// PAGE 2 END /////
+
+///// PAGE 10 START /////
+0x03,0x10, //page 10
+0x10,0x03, //S2D enable _ YUYV Order o??
+0x11,0x03,
+0x12,0xf0,
+0x13,0x01,
+
+0x20,0x00,
+0x21,0x40,
+0x22,0x0f,
+0x24,0x20,
+0x25,0x10,
+0x26,0x01,
+0x27,0x02,
+0x28,0x11,
+
+0x40,0x00,
+0x41,0x00, //D-YOffset Th
+0x42,0x04, //Cb Offset
+0x43,0x04, //Cr Offset
+0x44,0x80,
+0x45,0x80,
+0x46,0xf0,
+0x48,0x80,
+0x4a,0x80,
+
+0x50,0xa0, //D-YOffset AG
+
+0x60,0x0f,
+0x61,0xc0, //Sat B
+0x62,0xc0, //Sat R
+0x63,0x58, //Auto-De Color
+
+0x66,0x42,
+0x67,0x22,
+
+0x6a,0x7c, //White Protection Offset Dark/Indoor
+0x74,0x0c, //White Protection Offset Outdoor
+0x76,0x01, //White Protection Enable
+///// PAGE 10 END /////
+
+///// PAGE 11 START /////
+0x03,0x11, //page 11
+
+//LPF Auto Control
+0x20,0x00,
+0x21,0x00,
+0x26,0x5a, // Double_AG
+0x27,0x58, // Double_AG
+0x28,0x0f,
+0x29,0x10,
+0x2b,0x30,
+0x2c,0x32,
+
+//GBGR
+0x70,0x2b,
+0x74,0x30,
+0x75,0x18,
+0x76,0x30,
+0x77,0xff,
+0x78,0xa0,
+0x79,0xff, //Dark GbGr Th
+0x7a,0x30,
+0x7b,0x20,
+0x7c,0xf4, //Dark Dy Th B[7:4]
+///// PAGE 11 END /////
+
+///// PAGE 12 START /////
+0x03,0x12, //page 11
+
+//YC2D
+0x10,0x03, //Y DPC Enable
+0x11,0x08, //
+0x12,0x10, //0x30 -> 0x10
+0x20,0x53, //Y_lpf_enable
+0x21,0x03, //C_lpf_enable_on
+0x22,0xe6, //YC2D_CrCbY_Dy
+
+0x23,0x14, //Outdoor Dy Th
+0x24,0x20, //Indoor Dy Th // For reso Limit 0x20
+0x25,0x30, //Dark Dy Th
+
+//Outdoor LPF Flat
+0x30,0xff, //Y Hi Th
+0x31,0x00, //Y Lo Th
+0x32,0xf0, //Std Hi Th //Reso Improve Th Low //50
+0x33,0x00, //Std Lo Th
+0x34,0x00, //Median ratio
+
+//Indoor LPF Flat
+0x35,0xff, //Y Hi Th
+0x36,0x00, //Y Lo Th
+0x37,0xff, //Std Hi Th //Reso Improve Th Low //50
+0x38,0x00, //Std Lo Th
+0x39,0x00, //Median ratio
+
+//Dark LPF Flat
+0x3a,0xff, //Y Hi Th
+0x3b,0x00, //Y Lo Th
+0x3c,0x93, //Std Hi Th //Reso Improve Th Low //50
+0x3d,0x00, //Std Lo Th
+0x3e,0x00, //Median ratio
+
+//Outdoor Cindition
+0x46,0xa0, //Out Lum Hi
+0x47,0x40, //Out Lum Lo
+
+//Indoor Cindition
+0x4c,0xb0, //Indoor Lum Hi
+0x4d,0x40, //Indoor Lum Lo
+
+//Dark Cindition
+0x52,0xb0, //Dark Lum Hi
+0x53,0x50, //Dark Lum Lo
+
+//C-Filter
+0x70,0x10, //Outdoor(2:1) AWM Th Horizontal
+0x71,0x0a, //Outdoor(2:1) Diff Th Vertical
+0x72,0x10, //Indoor,Dark1 AWM Th Horizontal
+0x73,0x0a, //Indoor,Dark1 Diff Th Vertical
+0x74,0x18, //Dark(2:3) AWM Th Horizontal
+0x75,0x0f, //Dark(2:3) Diff Th Vertical
+
+//DPC
+0x90,0x7d,
+0x91,0x34,
+0x99,0x28,
+0x9c,0x14,
+0x9d,0x15,
+0x9e,0x28,
+0x9f,0x28,
+0xb0,0x0e, //Zipper noise Detault change (0x75->0x0e)
+0xb8,0x44,
+0xb9,0x15,
+///// PAGE 12 END /////
+
+///// PAGE 13 START /////
+0x03,0x13, //page 13
+
+0x80,0xfd, //Sharp2D enable _ YUYV Order o??
+0x81,0x07, //Sharp2D Clip/Limit
+0x82,0x73, //Sharp2D Filter
+0x83,0x00, //Sharp2D Low Clip
+0x85,0x00,
+
+0x92,0x33, //Sharp2D Slop n/p
+0x93,0x30, //Sharp2D LClip
+0x94,0x02, //Sharp2D HiClip1 Th
+0x95,0xf0, //Sharp2D HiClip2 Th
+0x96,0x1e, //Sharp2D HiClip2 Resolution
+0x97,0x40,
+0x98,0x80,
+0x99,0x40,
+
+//Sharp Lclp
+0xa2,0x04, //Outdoor Lclip_N
+0xa3,0x05, //Outdoor Lclip_P
+0xa4,0x06, //Indoor Lclip_N 0x03 For reso Limit 0x0e
+0xa5,0x07, //Indoor Lclip_P 0x0f For reso Limit 0x0f
+0xa6,0x80, //Dark Lclip_N
+0xa7,0x80, //Dark Lclip_P
+
+//Outdoor Slope
+0xb6,0x28, //Lum negative Hi
+0xb7,0x20, //Lum negative middle
+0xb8,0x24, //Lum negative Low
+0xb9,0x28, //Lum postive Hi
+0xba,0x20, //Lum postive middle
+0xbb,0x24, //Lum postive Low
+
+//Indoor Slope
+0xbc,0x20, //Lum negative Hi
+0xbd,0x20, //Lum negative middle
+0xbe,0x20, //Lum negative Low
+0xbf,0x20, //Lum postive Hi
+0xc0,0x20, //Lum postive middle
+0xc1,0x20, //Lum postive Low
+
+//Dark Slope
+0xc2,0x14, //Lum negative Hi
+0xc3,0x24, //Lum negative middle
+0xc4,0x1d, //Lum negative Low
+0xc5,0x14, //Lum postive Hi
+0xc6,0x24, //Lum postive middle
+0xc7,0x1d, //Lum postive Low
+///// PAGE 13 END /////
+
+///// PAGE 14 START /////
+0x03,0x14, //page 14
+0x10,0x01,
+
+0x20,0xA0,//X-Center
+0x21,0x80,//Y-Center
+
+0x22,0x12, //LSC R 1b->15 20130125
+0x23,0x0f, //LSC G
+0x24,0x0f, //LSC B
+
+0x25,0xf0, //LSC Off
+0x26,0xf0, //LSC On
+///// PAGE 14 END /////
+
+/////// PAGE 15 START ///////
+0x03,0x15, //page 15
+0x10,0x21,
+0x14,0x44,
+0x15,0x34,
+0x16,0x26,
+0x17,0x2f,
+
+//CMC
+0x30,0xdd,
+0x31,0x68,
+0x32,0x0b,
+0x33,0x2c,
+0x34,0xce,
+0x35,0x22,
+0x36,0x0e,
+0x37,0x42,
+0x38,0xd0,
+
+//CMC OFS
+0x40,0x90,
+0x41,0x16,
+0x42,0x86,
+0x43,0x01,
+0x44,0x10,
+0x45,0x91,
+0x46,0x82,
+0x47,0x9c,
+0x48,0x1d,
+
+//CMC POFS
+0x50,0x0d,
+0x51,0x91,
+0x52,0x04,
+0x53,0x07,
+0x54,0x19,
+0x55,0xa0,
+0x56,0x00,
+0x57,0x98,
+0x58,0x18,
+///// PAGE 15 END /////
+
+///// PAGE 16 START /////
+0x03,0x16, //page 16
+0x10,0x31,
+0x18,0x5a,// Double_AG 5e->37
+0x19,0x58,// Double_AG 5e->36
+0x1a,0x0e,
+0x1b,0x01,
+0x1c,0xdc,
+0x1d,0xfe,
+
+//Indoor
+0x30,0x00,
+0x31,0x06,
+0x32,0x12,
+0x33,0x29,
+0x34,0x4d,
+0x35,0x6c,
+0x36,0x81,
+0x37,0x94,
+0x38,0xa4,
+0x39,0xb3,
+0x3a,0xc0,
+0x3b,0xcb,
+0x3c,0xd5,
+0x3d,0xde,
+0x3e,0xe6,
+0x3f,0xee,
+0x40,0xf5,
+0x41,0xfc,
+0x42,0xff,
+
+
+//Outdoor
+0x50,0x00,
+0x51,0x06,
+0x52,0x12,
+0x53,0x29,
+0x54,0x45,
+0x55,0x60,
+0x56,0x7a,
+0x57,0x8e,
+0x58,0xa1,
+0x59,0xac,
+0x5a,0xb8,
+0x5b,0xc5,
+0x5c,0xd0,
+0x5d,0xda,
+0x5e,0xe3,
+0x5f,0xeb,
+0x60,0xf0,
+0x61,0xf4,
+0x62,0xf5,
+
+//Dark
+0x70,0x00,
+0x71,0x0e,
+0x72,0x17,
+0x73,0x26,
+0x74,0x3f,
+0x75,0x56,
+0x76,0x6c,
+0x77,0x81,
+0x78,0x94,
+0x79,0xa5,
+0x7a,0xb3,
+0x7b,0xc4,
+0x7c,0xce,
+0x7d,0xd9,
+0x7e,0xe4,
+0x7f,0xec,
+0x80,0xf5,
+0x81,0xfc,
+0x82,0xff,
+///// PAGE 16 END /////
+
+///// PAGE 17 START /////
+0x03,0x17, //page 17
+0xc1,0x00,
+0xc4,0x4b,
+0xc5,0x3f,
+0xc6,0x02,
+0xc7,0x20,
+///// PAGE 17 END /////
+
+///// PAGE 18 START /////
+0x03,0x18, //page 18
+0x14,0x00, //Cubic Off
+///// PAGE 18 END /////
+
+///// PAGE 19 START /////
+0x03,0x19, //Page 0x18
+0x10,0x7f, //mcmc_ctl1 MCMC Enable B:[0]
+0x11,0x7f, //mcmc_ctl2
+0x12,0x1b, //mcmc_delta1
+0x13,0xac, //mcmc_center1
+0x14,0x1e, //mcmc_delta2
+0x15,0x6e, //mcmc_center2
+0x16,0x0a, //mcmc_delta3
+0x17,0xb8, //mcmc_center3
+0x18,0x1e, //mcmc_delta4
+0x19,0xe6, //mcmc_center4
+0x1a,0x9e, //mcmc_delta5
+0x1b,0x22, //mcmc_center5
+0x1c,0x9e, //mcmc_delta6
+0x1d,0x5e, //mcmc_center6
+0x1e,0x70,//mcmc_sat_gain1
+0x1f,0x37, //mcmc_sat_gain2
+0x20,0x21, //mcmc_sat_gain3
+0x21,0x43, //mcmc_sat_gain4
+0x22,0x2f, //mcmc_sat_gain5
+0x23,0x37, //mcmc_sat_gain6
+0x24,0x00, //mcmc_hue_angle1
+0x25,0x07, //mcmc_hue_angle2
+0x26,0x09, //mcmc_hue_angle3
+0x27,0x04, //mcmc_hue_angle4
+0x28,0x00, //mcmc_hue_angle5
+0x29,0x8c, //mcmc_hue_angle6
+
+0x53,0x10, //mcmc_ctl3
+
+0x6c,0xff, //mcmc_lum_ctl1 sat hue offset
+0x6d,0x3f, //mcmc_lum_ctl2 gain
+0x6e,0x00, //mcmc_lum_ctl3 hue
+0x6f,0x00, //mcmc_lum_ctl4 rgb offset
+0x70,0x00, //mcmc_lum_ctl5 rgb scale
+
+0x71,0x3f, //mcmc_lum_gain_wgt_th1 R1 magenta
+0x72,0x3f, //mcmc_lum_gain_wgt_th2 R1
+0x73,0x3f, //mcmc_lum_gain_wgt_th3 R1
+0x74,0x3f, //mcmc_lum_gain_wgt_th4 R1
+0x75,0x30, //mcmc_rg1_lum_sp1 R1
+0x76,0x50, //mcmc_rg1_lum_sp2 R1
+0x77,0x80, //mcmc_rg1_lum_sp3 R1
+0x78,0xb0, //mcmc_rg1_lum_sp4 R1
+
+0x79,0x3f, //mcmc_lum_gain_wgt_th1 R2 bright green
+0x7a,0x3f, //mcmc_lum_gain_wgt_th2 R2
+0x7b,0x3f, //mcmc_lum_gain_wgt_th3 R2
+0x7c,0x3f, //mcmc_lum_gain_wgt_th4 R2
+0x7d,0x28, //mcmc_rg2_lum_sp1 R2
+0x7e,0x50, //mcmc_rg2_lum_sp2 R2
+0x7f,0x80, //mcmc_rg2_lum_sp3 R2
+0x80,0xb0, //mcmc_rg2_lum_sp4 R2
+
+0x81,0x28, //mcmc_lum_gain_wgt_th1 R3 dark green
+0x82,0x3f, //mcmc_lum_gain_wgt_th2 R3
+0x83,0x3f, //mcmc_lum_gain_wgt_th3 R3
+0x84,0x3f, //mcmc_lum_gain_wgt_th4 R3
+0x85,0x28, //mcmc_rg3_lum_sp1 R3
+0x86,0x50, //mcmc_rg3_lum_sp2 R3
+0x87,0x80, //mcmc_rg3_lum_sp3 R3
+0x88,0xb0, //mcmc_rg3_lum_sp4 R3
+
+0x89,0x1a, //mcmc_lum_gain_wgt_th1 R4 skin
+0x8a,0x28, //mcmc_lum_gain_wgt_th2 R4
+0x8b,0x3f, //mcmc_lum_gain_wgt_th3 R4
+0x8c,0x3f, //mcmc_lum_gain_wgt_th4 R4
+0x8d,0x10, //mcmc_rg3_lum_sp1 R4
+0x8e,0x30, //mcmc_rg3_lum_sp2 R4
+0x8f,0x60, //mcmc_rg3_lum_sp3 R4
+0x90,0x90, //mcmc_rg3_lum_sp4 R4
+
+0x91,0x1a, //mcmc_rg5_gain_wgt_th1 R5 cyan
+0x92,0x28, //mcmc_rg5_gain_wgt_th2 R5
+0x93,0x3f, //mcmc_rg5_gain_wgt_th3 R5
+0x94,0x3f, //mcmc_rg5_gain_wgt_th4 R5
+0x95,0x28, //mcmc_rg5_lum_sp1 R5
+0x96,0x50, //mcmc_rg5_lum_sp2 R5
+0x97,0x80, //mcmc_rg5_lum_sp3 R5
+0x98,0xb0, //mcmc_rg5_lum_sp4 R5
+
+0x99,0x1a, //mcmc_rg6_gain_wgt_th1 R6 blue
+0x9a,0x28, //mcmc_rg6_gain_wgt_th2 R6
+0x9b,0x3f, //mcmc_rg6_gain_wgt_th3 R6
+0x9c,0x3f, //mcmc_rg6_gain_wgt_th4 R6
+0x9d,0x28, //mcmc_rg6_lum_sp1 R6
+0x9e,0x50, //mcmc_rg6_lum_sp2 R6
+0x9f,0x80, //mcmc_rg6_lum_sp3 R6
+0xa0,0xb0, //mcmc_rg6_lum_sp4 R6
+
+0xa2,0x00,
+0xe5,0x80, //add 20120709 Bit[7] On MCMC --> YC2D_LPF
+
+/////// PAGE 20 START ///////
+0x03,0x20,
+0x10,0x1c,
+0x11,0x14,
+0x18,0x30,
+0x20,0x25, //8x8 Ae weight 0~7 Outdoor / Weight Outdoor On B[5]
+0x21,0x30,
+0x22,0x10,
+0x23,0x00,
+
+0x28,0xe7,
+0x29,0x0d,
+0x2a,0xff,
+0x2b,0x04, //Adaptive Off,1/100 Flicker
+
+0x2c,0x83, //AE After CI
+0x2d,0x03,
+0x2e,0x13,
+0x2f,0x0b,
+
+0x30,0x78,
+0x31,0xd7,
+0x32,0x10,
+0x33,0x2e,
+0x34,0x20,
+0x35,0xd4,
+0x36,0xfe,
+0x37,0x32,
+0x38,0x04,
+0x39,0x22,
+0x3a,0xde,
+0x3b,0x22,
+0x3c,0xde,
+0x3d,0xe1,
+
+0x50,0x45,
+0x51,0x88,
+
+0x56,0x1f, // for tracking
+0x57,0xa6, // for tracking
+0x58,0x1a, // for tracking
+0x59,0x7a, // for tracking
+
+0x5a,0x04,
+0x5b,0x04,
+
+0x5e,0xc7,
+0x5f,0x95,
+
+0x62,0x10,
+0x63,0xc0,
+0x64,0x10,
+0x65,0x8a,
+0x66,0x58,
+0x67,0x58,
+
+0x70,0x54, //6c
+0x71,0x80, //81(+4),89(-4)
+
+0x76,0x32,
+0x77,0xb1,
+0x78,0x22, //24
+0x79,0x32, // Y Target 70 => 25,72 => 26 //
+0x7a,0x23, //23
+0x7b,0x22, //22
+0x7d,0x23,
+
+0x83,0x02, //EXP Normal 33.33 fps
+0x84,0xbf,
+0x85,0x20,
+
+0x86,0x01, //EXPMin 12000.00 fps
+0x87,0xf4,
+
+0x88,0x0b, //EXP Max(120Hz) 8.00 fps
+0x89,0x71,
+0x8a,0xb0,
+
+0xa5,0x0b, //EXP Max(100Hz) 7.69 fps
+0xa6,0xe6,
+0xa7,0xe0,
+
+0x8B,0xea, //EXP100
+0x8C,0x60,
+
+0x8D,0xc3, //EXP120
+0x8E,0x50,
+
+0x9c,0x0f, //EXP Limit 1500.00 fps
+0x9d,0xa0,
+0x9e,0x01, //EXP Unit
+0x9f,0xf4,
+
+0xa3,0x00,
+0xa4,0xfd, //Exp 12000
+
+0xb0,0x15,
+0xb1,0x14,
+0xb2,0x60,
+0xb3,0x1a,
+0xb4,0x1c,
+0xb5,0x48,
+0xb6,0x32,
+0xb7,0x2b,
+0xb8,0x27,
+0xb9,0x25,
+0xba,0x23,
+0xbb,0x22,
+0xbc,0x22,
+0xbd,0x21,
+
+0xc0,0x10,
+0xc1,0x40,
+0xc2,0x40,
+0xc3,0x40,
+0xc4,0x06,
+
+0xc8,0x80,
+0xc9,0x80,
+///// PAGE 20 END /////
+
+///// PAGE 21 START /////
+0x03,0x21, //page 21
+
+//Indoor Weight
+0x20,0x11,
+0x21,0x11,
+0x22,0x11,
+0x23,0x11,
+0x24,0x14,
+0x25,0x44,
+0x26,0x44,
+0x27,0x41,
+0x28,0x14,
+0x29,0x44,
+0x2a,0x44,
+0x2b,0x41,
+0x2c,0x14,
+0x2d,0x47,
+0x2e,0x74,
+0x2f,0x41,
+0x30,0x14,
+0x31,0x47,
+0x32,0x74,
+0x33,0x41,
+0x34,0x14,
+0x35,0x44,
+0x36,0x44,
+0x37,0x41,
+0x38,0x14,
+0x39,0x44,
+0x3a,0x44,
+0x3b,0x41,
+0x3c,0x11,
+0x3d,0x11,
+0x3e,0x11,
+0x3f,0x11,
+
+//Outdoor Weight
+0x40,0x11,
+0x41,0x11,
+0x42,0x11,
+0x43,0x11,
+0x44,0x14,
+0x45,0x44,
+0x46,0x44,
+0x47,0x41,
+0x48,0x14,
+0x49,0x44,
+0x4a,0x44,
+0x4b,0x41,
+0x4c,0x14,
+0x4d,0x47,
+0x4e,0x74,
+0x4f,0x41,
+0x50,0x14,
+0x51,0x47,
+0x52,0x74,
+0x53,0x41,
+0x54,0x14,
+0x55,0x44,
+0x56,0x44,
+0x57,0x41,
+0x58,0x14,
+0x59,0x44,
+0x5a,0x44,
+0x5b,0x41,
+0x5c,0x11,
+0x5d,0x11,
+0x5e,0x11,
+0x5f,0x11,
+
+
+///// PAGE 22 START /////
+0x03,0x22, //page 22
+0x10,0xfd,
+0x11,0x2e,
+0x19,0x00, //Low On //
+0x20,0x30, //For AWB Speed
+0x21,0x80,
+0x22,0x00,
+0x23,0x00,
+0x24,0x01,
+0x25,0x7e, //for Tracking setting
+
+0x30,0x80,
+0x31,0x80,
+0x38,0x11,
+0x39,0x34,
+0x40,0xe4, //Stb Yth
+0x41,0x33, //Stb cdiff
+0x42,0x22, //Stb csum
+0x43,0xf3, //Unstb Yth
+0x44,0x55, //Unstb cdiff
+0x45,0x33, //Unstb csum
+0x46,0x00,
+0x47,0xa2,
+0x48,0x02,
+0x49,0x0a,
+
+0x60,0x04,
+0x61,0xc4,
+0x62,0x04,
+0x63,0x92,
+0x66,0x04,
+0x67,0xc4,
+0x68,0x04,
+0x69,0x92,
+
+0x80,0x38,
+0x81,0x20,
+0x82,0x38,
+
+0x83,0x58,
+0x84,0x16,
+0x85,0x4f,
+0x86,0x1a,
+
+0x87,0x42,
+0x88,0x30,
+0x89,0x27,
+0x8a,0x18,
+
+0x8b,0x3d,
+0x8c,0x32,
+0x8d,0x24,
+0x8e,0x1d,
+
+0x8f,0x4d, //4e
+0x90,0x46, //4d
+0x91,0x40, //4c
+0x92,0x3a, //4a
+0x93,0x2f, //46
+0x94,0x21,
+0x95,0x19,
+0x96,0x16,
+0x97,0x13,
+0x98,0x12,
+0x99,0x11,
+0x9a,0x10,
+
+0x9b,0xbb,
+0x9c,0xaa,
+0x9d,0x48,
+0x9e,0x38,
+0x9f,0x30,
+
+0xa0,0x70,
+0xa1,0x54,
+0xa2,0x6f,
+0xa3,0xff,
+
+0xa4,0x14, //1536fps
+0xa5,0x2c, //698fps
+0xa6,0xcf, //148fps
+
+0xad,0x40,
+0xae,0x4a,
+
+0xaf,0x28, //Low temp Rgain
+0xb0,0x26, //Low temp Rgain
+
+0xb1,0x00,
+0xb4,0xbf, //For Tracking AWB Weight
+0xb8,0x91, //(0+,1-)High Cb ,(0+,1-)Low Cr
+0xb9,0x00,
+/////// PAGE 22 END ///////
+
+/////// PAGE 20 ///////
+0x03,0x20,
+0x10,0x9c, //AE On 50hz
+
+/////// PAGE 22 ///////
+0x03,0x22,
+0x10,0xe9, //AWB On
+
+/////// PAGE 0 ///////
+0x03,0x00,
+0x0e,0x03,
+0x0e,0x73,
+
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x03,0x18,
+0x12,0x20,
+0x10,0x07,
+0x11,0x00,
+0x20,0x02,
+0x21,0x80,
+0x22,0x03,
+0x23,0xc0,
+0x24,0x00,
+0x25,0x00,
+0x26,0x00,
+0x27,0x00,
+0x28,0x02,
+0x29,0x80,
+0x2a,0x03,
+0x2b,0xc0,
+0x2c,0x0a,
+0x2d,0x00,
+0x2e,0x0a,
+0x2f,0x00,
+0x30,0x24,
+
+0x03,0x00,
+0x01,0x00,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/hi257/hi257_kyt162_v7.h b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257_kyt162_v7.h
new file mode 100755
index 00000000..a64be87a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/hi257/hi257_kyt162_v7.h
@@ -0,0 +1,2195 @@
+#ifndef HI257_H
+#define HI257_H
+
+// Scene Mode
+uint8_t hi257_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x60,
+ 0xff,0xff,
+};
+
+uint8_t hi257_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t hi257_wb_auto [] = {
+ 0x03,0x22,
+ 0x11,0x2e,
+ 0x83,0x58, // RMAX
+ 0x84,0x16, // RMIN
+ 0x85,0x4f, // BMAX
+ 0x86,0x1a, // BMIN
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_incandescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x2a,
+ 0x82,0x3f,
+ 0x83,0x35,
+ 0x84,0x28,
+ 0x85,0x45,
+ 0x86,0x3b,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_fluorescent [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x20,
+ 0x82,0x4d,
+ 0x83,0x25,
+ 0x84,0x1b,
+ 0x85,0x55,
+ 0x86,0x48,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_daylight [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x3d,
+ 0x82,0x2e,
+ 0x83,0x40,
+ 0x84,0x33,
+ 0x85,0x33,
+ 0x86,0x28,
+ 0xff,0xff,
+};
+
+uint8_t hi257_wb_cloudy [] = {
+ 0x03,0x22,
+ 0x11,0x28,
+ 0x80,0x50,
+ 0x82,0x25,
+ 0x83,0x55,
+ 0x84,0x4b,
+ 0x85,0x28,
+ 0x86,0x20,
+ 0xff,0xff,
+};
+
+
+// Exposure
+uint8_t hi257_exposure_neg6[] = {
+ 0x03,0x10,
+ 0x40,0xa8,
+};
+
+uint8_t hi257_exposure_neg3[] = {
+ 0x03,0x10,
+ 0x40,0x98,
+};
+
+uint8_t hi257_exposure_zero[] = {
+ 0x03,0x10,
+ 0x40,0x80,
+};
+
+uint8_t hi257_exposure_pos3[] = {
+ 0x03,0x10,
+ 0x40,0x08,
+};
+
+uint8_t hi257_exposure_pos6[] = {
+ 0x03,0x10,
+ 0x40,0x28,
+};
+
+
+// Resolution
+uint8_t hi257_1600_1200_rets[]={
+ 0x03, 0x00,
+ 0x10, 0x00,
+ 0x12, 0x04,
+ 0x20, 0x00,
+ 0x21, 0x0a,
+ 0x22, 0x00,
+ 0x23, 0x0a,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_1280_720_regs[]={
+};
+
+uint8_t hi257_800_600_regs[]={
+
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x10, 0x00,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_640_480_regs[]={
+ 0x03, 0x00,
+ 0x10, 0x10,
+ 0x12, 0x04,
+
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x05,
+ 0x21, 0x00,
+ 0x22, 0x03,
+ 0x23, 0xc0,
+ 0x24, 0x00,
+ 0x25, 0x00,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x05,
+ 0x29, 0x00,
+ 0x2a, 0x03,
+ 0x2b, 0xc0,
+ 0x2c, 0x0a,
+ 0x2d, 0x00,
+ 0x2e, 0x0a,
+ 0x2f, 0x00,
+ 0x30, 0x44,
+ 0xff, 0xff,
+};
+
+uint8_t hi257_320_240_regs[]= {
+ 0x01,0x01, //sleep on
+0x01,0x03, //sleep off
+0x01,0x01, //sleep on
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x08,0x00,
+0x09,0x77, // pad strength = max
+0x0a,0x07, // pad strength = max
+
+0x0e,0x03, //PLL On
+0x0e,0x73, //PLLx2
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+
+///// PAGE 20 /////
+0x03,0x20, //page 20
+0x10,0x1c, //AE off 50hz
+
+///// PAGE 22 /////
+0x03,0x22, //page 22
+0x10,0x69, //AWB off
+
+
+///// Initial Start /////
+///// PAGE 0 Start /////
+0x03,0x00, //page 0
+0x10,0x91,
+0x11,0x90, //Windowing On + 1Frame Skip
+0x12,0x04, //Rinsing edge 0x04 // Falling edge 0x00
+0x14,0x05,
+
+0x20,0x00, //Row H
+0x21,0x02, //Row L
+0x22,0x00, //Col H
+0x23,0x04, //Col L
+
+0x24,0x04, //Window height_H //= 1200
+0x25,0xb0, //Window height_L //
+0x26,0x06, //Window width_H //= 1600
+0x27,0x40, //Window wight_L
+
+0x40,0x01, //Hblank_360
+0x41,0x78,
+0x42,0x00, //Vblank
+0x43,0x14, //Flick Stop
+
+0x50,0x00, //Test Pattern
+
+///// BLC /////
+0x80,0x2e,
+0x81,0x7e,
+0x82,0x90,
+0x83,0x00,
+0x84,0xcc, //20130604 0x0c->0xcc
+0x85,0x00,
+0x86,0x00,
+0x87,0x0f,
+0x88,0x34,
+0x8a,0x0b,
+0x8e,0x80, //Pga Blc Hold
+
+0x90,0x0c, //BLC_TIME_TH_ON
+0x91,0x0c, //BLC_TIME_TH_OFF
+0x92,0x58, //BLC_AG_TH_ON
+0x93,0x50, //BLC_AG_TH_OFF
+0x96,0xdc, //BLC Outdoor Th On
+0x97,0xfe, //BLC Outdoor Th Off
+0x98,0x38,
+
+//OutDoor BLC
+0x99,0x43, //R,Gr,B,Gb Offset
+
+//Dark BLC
+0xa0,0x02, //R,Gr,B,Gb Offset
+
+//Normal BLC
+0xa8,0x43, //R,Gr,B,Gb Offset
+///// PAGE 0 END /////
+
+///// PAGE 2 START /////
+0x03,0x02,
+0x10,0x00,
+0x13,0x00,
+0x14,0x00,
+0x18,0xcc,
+0x19,0x01, // pmos switch on (for cfpn)
+0x1A,0x39, //20130604 0x09->0xcc
+0x1B,0x00,
+0x1C,0x1a, // for ncp
+0x1D,0x14, // for ncp
+0x1E,0x30, // for ncp
+0x1F,0x10,
+
+0x20,0x77,
+0x21,0xde,
+0x22,0xa7,
+0x23,0x30,
+0x24,0x77,
+0x25,0x10,
+0x26,0x10,
+0x27,0x3c,
+0x2b,0x80,
+0x2c,0x02,
+0x2d,0x58,
+0x2e,0x11,//20130604 0xde->0x11
+0x2f,0x11,//20130604 0xa7->0x11
+
+0x30,0x00,
+0x31,0x99,
+0x32,0x00,
+0x33,0x00,
+0x34,0x22,
+0x36,0x75,
+0x38,0x88,
+0x39,0x88,
+0x3d,0x03,
+0x3f,0x02,
+
+0x49,0xc1,//20130604 0x87->0xd1 --> mode Change Issue modify -> 0xc1
+0x4a,0x10,
+
+0x50,0x21,
+0x53,0xb1,
+0x54,0x10,
+0x55,0x1c, // for ncp
+0x56,0x11,
+0x58,0x3a,//20130604 add
+0x59,0x38,//20130604 add
+0x5d,0xa2,
+0x5e,0x5a,
+
+0x60,0x87,
+0x61,0x98,
+0x62,0x88,
+0x63,0x96,
+0x64,0x88,
+0x65,0x96,
+0x67,0x3f,
+0x68,0x3f,
+0x69,0x3f,
+
+0x72,0x89,
+0x73,0x95,
+0x74,0x89,
+0x75,0x95,
+0x7C,0x84,
+0x7D,0xaf,
+
+0x80,0x01,
+0x81,0x7a,
+0x82,0x13,
+0x83,0x24,
+0x84,0x78,
+0x85,0x7c,
+
+0x92,0x44,
+0x93,0x59,
+0x94,0x78,
+0x95,0x7c,
+
+0xA0,0x02,
+0xA1,0x74,
+0xA4,0x74,
+0xA5,0x02,
+0xA8,0x85,
+0xA9,0x8c,
+0xAC,0x10,
+0xAD,0x16,
+
+0xB0,0x99,
+0xB1,0xa3,
+0xB4,0x9b,
+0xB5,0xa2,
+0xB8,0x9b,
+0xB9,0x9f,
+0xBC,0x9b,
+0xBD,0x9f,
+
+0xc4,0x29,
+0xc5,0x40,
+0xc6,0x5c,
+0xc7,0x72,
+0xc8,0x2a,
+0xc9,0x3f,
+0xcc,0x5d,
+0xcd,0x71,
+
+0xd0,0x10,
+0xd1,0x14,
+0xd2,0x20,
+0xd3,0x00,
+0xd4,0x0c, //DCDC_TIME_TH_ON
+0xd5,0x0c, //DCDC_TIME_TH_OFF
+0xd6,0x58, //DCDC_AG_TH_ON
+0xd7,0x50, //DCDC_AG_TH_OFF
+0xdc,0x00,
+0xdd,0xa3,
+0xde,0x00,
+0xdf,0x84,
+
+0xe0,0xa4,
+0xe1,0xa4,
+0xe2,0xa4,
+0xe3,0xa4,
+0xe4,0xa4,
+0xe5,0x01,
+0xe8,0x00,
+0xe9,0x00,
+0xea,0x77,
+
+0xF0,0x00,
+0xF1,0x00,
+0xF2,0x00,
+
+///// PAGE 2 END /////
+
+///// PAGE 10 START /////
+0x03,0x10, //page 10
+0x10,0x03, //S2D enable _ YUYV Order o??
+0x11,0x03,
+0x12,0xf0,
+0x13,0x01,
+
+0x20,0x00,
+0x21,0x40,
+0x22,0x0f,
+0x24,0x20,
+0x25,0x10,
+0x26,0x01,
+0x27,0x02,
+0x28,0x11,
+
+0x40,0x00,
+0x41,0x00, //D-YOffset Th
+0x42,0x04, //Cb Offset
+0x43,0x04, //Cr Offset
+0x44,0x80,
+0x45,0x80,
+0x46,0xf0,
+0x48,0x80,
+0x4a,0x80,
+
+0x50,0xa0, //D-YOffset AG
+
+0x60,0x0f,
+0x61,0xc0, //Sat B
+0x62,0xc0, //Sat R
+0x63,0x58, //Auto-De Color
+
+0x66,0x42,
+0x67,0x22,
+
+0x6a,0x7c, //White Protection Offset Dark/Indoor
+0x74,0x0c, //White Protection Offset Outdoor
+0x76,0x01, //White Protection Enable
+///// PAGE 10 END /////
+
+///// PAGE 11 START /////
+0x03,0x11, //page 11
+
+//LPF Auto Control
+0x20,0x00,
+0x21,0x00,
+0x26,0x5a, // Double_AG
+0x27,0x58, // Double_AG
+0x28,0x0f,
+0x29,0x10,
+0x2b,0x30,
+0x2c,0x32,
+
+//GBGR
+0x70,0x2b,
+0x74,0x30,
+0x75,0x18,
+0x76,0x30,
+0x77,0xff,
+0x78,0xa0,
+0x79,0xff, //Dark GbGr Th
+0x7a,0x30,
+0x7b,0x20,
+0x7c,0xf4, //Dark Dy Th B[7:4]
+///// PAGE 11 END /////
+
+///// PAGE 12 START /////
+0x03,0x12, //page 11
+
+//YC2D
+0x10,0x03, //Y DPC Enable
+0x11,0x08, //
+0x12,0x10, //0x30 -> 0x10
+0x20,0x53, //Y_lpf_enable
+0x21,0x03, //C_lpf_enable_on
+0x22,0xe6, //YC2D_CrCbY_Dy
+
+0x23,0x14, //Outdoor Dy Th
+0x24,0x20, //Indoor Dy Th // For reso Limit 0x20
+0x25,0x30, //Dark Dy Th
+
+//Outdoor LPF Flat
+0x30,0xff, //Y Hi Th
+0x31,0x00, //Y Lo Th
+0x32,0xf0, //Std Hi Th //Reso Improve Th Low //50
+0x33,0x00, //Std Lo Th
+0x34,0x00, //Median ratio
+
+//Indoor LPF Flat
+0x35,0xff, //Y Hi Th
+0x36,0x00, //Y Lo Th
+0x37,0xff, //Std Hi Th //Reso Improve Th Low //50
+0x38,0x00, //Std Lo Th
+0x39,0x00, //Median ratio
+
+//Dark LPF Flat
+0x3a,0xff, //Y Hi Th
+0x3b,0x00, //Y Lo Th
+0x3c,0x93, //Std Hi Th //Reso Improve Th Low //50
+0x3d,0x00, //Std Lo Th
+0x3e,0x00, //Median ratio
+
+//Outdoor Cindition
+0x46,0xa0, //Out Lum Hi
+0x47,0x40, //Out Lum Lo
+
+//Indoor Cindition
+0x4c,0xb0, //Indoor Lum Hi
+0x4d,0x40, //Indoor Lum Lo
+
+//Dark Cindition
+0x52,0xb0, //Dark Lum Hi
+0x53,0x50, //Dark Lum Lo
+
+//C-Filter
+0x70,0x10, //Outdoor(2:1) AWM Th Horizontal
+0x71,0x0a, //Outdoor(2:1) Diff Th Vertical
+0x72,0x10, //Indoor,Dark1 AWM Th Horizontal
+0x73,0x0a, //Indoor,Dark1 Diff Th Vertical
+0x74,0x18, //Dark(2:3) AWM Th Horizontal
+0x75,0x0f, //Dark(2:3) Diff Th Vertical
+
+//DPC
+0x90,0x7d,
+0x91,0x34,
+0x99,0x28,
+0x9c,0x14,
+0x9d,0x15,
+0x9e,0x28,
+0x9f,0x28,
+0xb0,0x0e, //Zipper noise Detault change (0x75->0x0e)
+0xb8,0x44,
+0xb9,0x15,
+///// PAGE 12 END /////
+
+///// PAGE 13 START /////
+0x03,0x13, //page 13
+
+0x80,0xfd, //Sharp2D enable _ YUYV Order o??
+0x81,0x07, //Sharp2D Clip/Limit
+0x82,0x73, //Sharp2D Filter
+0x83,0x00, //Sharp2D Low Clip
+0x85,0x00,
+
+0x92,0x33, //Sharp2D Slop n/p
+0x93,0x30, //Sharp2D LClip
+0x94,0x02, //Sharp2D HiClip1 Th
+0x95,0xf0, //Sharp2D HiClip2 Th
+0x96,0x1e, //Sharp2D HiClip2 Resolution
+0x97,0x40,
+0x98,0x80,
+0x99,0x40,
+
+//Sharp Lclp
+0xa2,0x04, //Outdoor Lclip_N
+0xa3,0x05, //Outdoor Lclip_P
+0xa4,0x06, //Indoor Lclip_N 0x03 For reso Limit 0x0e
+0xa5,0x07, //Indoor Lclip_P 0x0f For reso Limit 0x0f
+0xa6,0x80, //Dark Lclip_N
+0xa7,0x80, //Dark Lclip_P
+
+//Outdoor Slope
+0xb6,0x28, //Lum negative Hi
+0xb7,0x20, //Lum negative middle
+0xb8,0x24, //Lum negative Low
+0xb9,0x28, //Lum postive Hi
+0xba,0x20, //Lum postive middle
+0xbb,0x24, //Lum postive Low
+
+//Indoor Slope
+0xbc,0x20, //Lum negative Hi
+0xbd,0x20, //Lum negative middle
+0xbe,0x20, //Lum negative Low
+0xbf,0x20, //Lum postive Hi
+0xc0,0x20, //Lum postive middle
+0xc1,0x20, //Lum postive Low
+
+//Dark Slope
+0xc2,0x14, //Lum negative Hi
+0xc3,0x24, //Lum negative middle
+0xc4,0x1d, //Lum negative Low
+0xc5,0x14, //Lum postive Hi
+0xc6,0x24, //Lum postive middle
+0xc7,0x1d, //Lum postive Low
+///// PAGE 13 END /////
+
+///// PAGE 14 START /////
+0x03,0x14, //page 14
+0x10,0x01,
+
+0x20,0xA0,//X-Center
+0x21,0x80,//Y-Center
+
+0x22,0x12, //LSC R 1b->15 20130125
+0x23,0x0f, //LSC G
+0x24,0x0f, //LSC B
+
+0x25,0xf0, //LSC Off
+0x26,0xf0, //LSC On
+///// PAGE 14 END /////
+
+/////// PAGE 15 START ///////
+0x03,0x15, //page 15
+0x10,0x21,
+0x14,0x44,
+0x15,0x34,
+0x16,0x26,
+0x17,0x2f,
+
+//CMC
+0x30,0xdd,
+0x31,0x68,
+0x32,0x0b,
+0x33,0x2c,
+0x34,0xce,
+0x35,0x22,
+0x36,0x0e,
+0x37,0x42,
+0x38,0xd0,
+
+//CMC OFS
+0x40,0x90,
+0x41,0x16,
+0x42,0x86,
+0x43,0x01,
+0x44,0x10,
+0x45,0x91,
+0x46,0x82,
+0x47,0x9c,
+0x48,0x1d,
+
+//CMC POFS
+0x50,0x0d,
+0x51,0x91,
+0x52,0x04,
+0x53,0x07,
+0x54,0x19,
+0x55,0xa0,
+0x56,0x00,
+0x57,0x98,
+0x58,0x18,
+///// PAGE 15 END /////
+
+///// PAGE 16 START /////
+0x03,0x16, //page 16
+0x10,0x31,
+0x18,0x5a,// Double_AG 5e->37
+0x19,0x58,// Double_AG 5e->36
+0x1a,0x0e,
+0x1b,0x01,
+0x1c,0xdc,
+0x1d,0xfe,
+
+//Indoor
+0x30,0x00,
+0x31,0x06,
+0x32,0x12,
+0x33,0x29,
+0x34,0x4d,
+0x35,0x6c,
+0x36,0x81,
+0x37,0x94,
+0x38,0xa4,
+0x39,0xb3,
+0x3a,0xc0,
+0x3b,0xcb,
+0x3c,0xd5,
+0x3d,0xde,
+0x3e,0xe6,
+0x3f,0xee,
+0x40,0xf5,
+0x41,0xfc,
+0x42,0xff,
+
+
+//Outdoor
+0x50,0x00,
+0x51,0x06,
+0x52,0x12,
+0x53,0x29,
+0x54,0x45,
+0x55,0x60,
+0x56,0x7a,
+0x57,0x8e,
+0x58,0xa1,
+0x59,0xac,
+0x5a,0xb8,
+0x5b,0xc5,
+0x5c,0xd0,
+0x5d,0xda,
+0x5e,0xe3,
+0x5f,0xeb,
+0x60,0xf0,
+0x61,0xf4,
+0x62,0xf5,
+
+//Dark
+0x70,0x00,
+0x71,0x0e,
+0x72,0x17,
+0x73,0x26,
+0x74,0x3f,
+0x75,0x56,
+0x76,0x6c,
+0x77,0x81,
+0x78,0x94,
+0x79,0xa5,
+0x7a,0xb3,
+0x7b,0xc4,
+0x7c,0xce,
+0x7d,0xd9,
+0x7e,0xe4,
+0x7f,0xec,
+0x80,0xf5,
+0x81,0xfc,
+0x82,0xff,
+///// PAGE 16 END /////
+
+///// PAGE 17 START /////
+0x03,0x17, //page 17
+0xc1,0x00,
+0xc4,0x4b,
+0xc5,0x3f,
+0xc6,0x02,
+0xc7,0x20,
+///// PAGE 17 END /////
+
+///// PAGE 18 START /////
+ //page 18
+ 0x03, 0x18,
+ 0x12, 0x20,
+ 0x10, 0x07,
+ 0x11, 0x00,
+ 0x20, 0x02,
+ 0x21, 0x80,
+ 0x22, 0x01,
+ 0x23, 0xe0,
+ 0x24, 0x00,
+ 0x25, 0x00,
+ 0x26, 0x00,
+ 0x27, 0x00,
+ 0x28, 0x02,
+ 0x29, 0x80,
+ 0x2a, 0x01,
+ 0x2b, 0xe0,
+ 0x2c, 0x14,
+ 0x2d, 0x00,
+ 0x2e, 0x14,
+ 0x2f, 0x00,
+ 0x30, 0x64,
+///// PAGE 18 END /////
+
+///// PAGE 19 START /////
+0x03,0x19, //Page 0x18
+0x10,0x7f, //mcmc_ctl1 MCMC Enable B:[0]
+0x11,0x7f, //mcmc_ctl2
+0x12,0x1b, //mcmc_delta1
+0x13,0xac, //mcmc_center1
+0x14,0x1e, //mcmc_delta2
+0x15,0x6e, //mcmc_center2
+0x16,0x0a, //mcmc_delta3
+0x17,0xb8, //mcmc_center3
+0x18,0x1e, //mcmc_delta4
+0x19,0xe6, //mcmc_center4
+0x1a,0x9e, //mcmc_delta5
+0x1b,0x22, //mcmc_center5
+0x1c,0x9e, //mcmc_delta6
+0x1d,0x5e, //mcmc_center6
+0x1e,0x70,//mcmc_sat_gain1
+0x1f,0x37, //mcmc_sat_gain2
+0x20,0x21, //mcmc_sat_gain3
+0x21,0x43, //mcmc_sat_gain4
+0x22,0x2f, //mcmc_sat_gain5
+0x23,0x37, //mcmc_sat_gain6
+0x24,0x00, //mcmc_hue_angle1
+0x25,0x07, //mcmc_hue_angle2
+0x26,0x09, //mcmc_hue_angle3
+0x27,0x04, //mcmc_hue_angle4
+0x28,0x00, //mcmc_hue_angle5
+0x29,0x8c, //mcmc_hue_angle6
+
+0x53,0x10, //mcmc_ctl3
+
+0x6c,0xff, //mcmc_lum_ctl1 sat hue offset
+0x6d,0x3f, //mcmc_lum_ctl2 gain
+0x6e,0x00, //mcmc_lum_ctl3 hue
+0x6f,0x00, //mcmc_lum_ctl4 rgb offset
+0x70,0x00, //mcmc_lum_ctl5 rgb scale
+
+0x71,0x3f, //mcmc_lum_gain_wgt_th1 R1 magenta
+0x72,0x3f, //mcmc_lum_gain_wgt_th2 R1
+0x73,0x3f, //mcmc_lum_gain_wgt_th3 R1
+0x74,0x3f, //mcmc_lum_gain_wgt_th4 R1
+0x75,0x30, //mcmc_rg1_lum_sp1 R1
+0x76,0x50, //mcmc_rg1_lum_sp2 R1
+0x77,0x80, //mcmc_rg1_lum_sp3 R1
+0x78,0xb0, //mcmc_rg1_lum_sp4 R1
+
+0x79,0x3f, //mcmc_lum_gain_wgt_th1 R2 bright green
+0x7a,0x3f, //mcmc_lum_gain_wgt_th2 R2
+0x7b,0x3f, //mcmc_lum_gain_wgt_th3 R2
+0x7c,0x3f, //mcmc_lum_gain_wgt_th4 R2
+0x7d,0x28, //mcmc_rg2_lum_sp1 R2
+0x7e,0x50, //mcmc_rg2_lum_sp2 R2
+0x7f,0x80, //mcmc_rg2_lum_sp3 R2
+0x80,0xb0, //mcmc_rg2_lum_sp4 R2
+
+0x81,0x28, //mcmc_lum_gain_wgt_th1 R3 dark green
+0x82,0x3f, //mcmc_lum_gain_wgt_th2 R3
+0x83,0x3f, //mcmc_lum_gain_wgt_th3 R3
+0x84,0x3f, //mcmc_lum_gain_wgt_th4 R3
+0x85,0x28, //mcmc_rg3_lum_sp1 R3
+0x86,0x50, //mcmc_rg3_lum_sp2 R3
+0x87,0x80, //mcmc_rg3_lum_sp3 R3
+0x88,0xb0, //mcmc_rg3_lum_sp4 R3
+
+0x89,0x1a, //mcmc_lum_gain_wgt_th1 R4 skin
+0x8a,0x28, //mcmc_lum_gain_wgt_th2 R4
+0x8b,0x3f, //mcmc_lum_gain_wgt_th3 R4
+0x8c,0x3f, //mcmc_lum_gain_wgt_th4 R4
+0x8d,0x10, //mcmc_rg3_lum_sp1 R4
+0x8e,0x30, //mcmc_rg3_lum_sp2 R4
+0x8f,0x60, //mcmc_rg3_lum_sp3 R4
+0x90,0x90, //mcmc_rg3_lum_sp4 R4
+
+0x91,0x1a, //mcmc_rg5_gain_wgt_th1 R5 cyan
+0x92,0x28, //mcmc_rg5_gain_wgt_th2 R5
+0x93,0x3f, //mcmc_rg5_gain_wgt_th3 R5
+0x94,0x3f, //mcmc_rg5_gain_wgt_th4 R5
+0x95,0x28, //mcmc_rg5_lum_sp1 R5
+0x96,0x50, //mcmc_rg5_lum_sp2 R5
+0x97,0x80, //mcmc_rg5_lum_sp3 R5
+0x98,0xb0, //mcmc_rg5_lum_sp4 R5
+
+0x99,0x1a, //mcmc_rg6_gain_wgt_th1 R6 blue
+0x9a,0x28, //mcmc_rg6_gain_wgt_th2 R6
+0x9b,0x3f, //mcmc_rg6_gain_wgt_th3 R6
+0x9c,0x3f, //mcmc_rg6_gain_wgt_th4 R6
+0x9d,0x28, //mcmc_rg6_lum_sp1 R6
+0x9e,0x50, //mcmc_rg6_lum_sp2 R6
+0x9f,0x80, //mcmc_rg6_lum_sp3 R6
+0xa0,0xb0, //mcmc_rg6_lum_sp4 R6
+
+0xa2,0x00,
+0xe5,0x80, //add 20120709 Bit[7] On MCMC --> YC2D_LPF
+
+/////// PAGE 20 START ///////
+0x03,0x20,
+0x10,0x1c,
+0x11,0x14,
+0x18,0x30,
+0x20,0x25, //8x8 Ae weight 0~7 Outdoor / Weight Outdoor On B[5]
+0x21,0x30,
+0x22,0x10,
+0x23,0x00,
+
+0x28,0xe7,
+0x29,0x0d,
+0x2a,0xff,
+0x2b,0x04, //Adaptive Off,1/100 Flicker
+
+0x2c,0x83, //AE After CI
+0x2d,0x03,
+0x2e,0x13,
+0x2f,0x0b,
+
+0x30,0x78,
+0x31,0xd7,
+0x32,0x10,
+0x33,0x2e,
+0x34,0x20,
+0x35,0xd4,
+0x36,0xfe,
+0x37,0x32,
+0x38,0x04,
+0x39,0x22,
+0x3a,0xde,
+0x3b,0x22,
+0x3c,0xde,
+0x3d,0xe1,
+
+0x50,0x45,
+0x51,0x88,
+
+0x56,0x1f, // for tracking
+0x57,0xa6, // for tracking
+0x58,0x1a, // for tracking
+0x59,0x7a, // for tracking
+
+0x5a,0x04,
+0x5b,0x04,
+
+0x5e,0xc7,
+0x5f,0x95,
+
+0x62,0x10,
+0x63,0xc0,
+0x64,0x10,
+0x65,0x8a,
+0x66,0x58,
+0x67,0x58,
+
+0x70,0x54, //6c
+0x71,0x80, //81(+4),89(-4)
+
+0x76,0x32,
+0x77,0xb1,
+0x78,0x22, //24
+0x79,0x32, // Y Target 70 => 25,72 => 26 //
+0x7a,0x23, //23
+0x7b,0x22, //22
+0x7d,0x23,
+
+0x83,0x02, //EXP Normal 33.33 fps
+0x84,0xbf,
+0x85,0x20,
+
+0x86,0x01, //EXPMin 12000.00 fps
+0x87,0xf4,
+
+0x88,0x0b, //EXP Max(120Hz) 8.00 fps
+0x89,0x71,
+0x8a,0xb0,
+
+0xa5,0x0b, //EXP Max(100Hz) 7.69 fps
+0xa6,0xe6,
+0xa7,0xe0,
+
+0x8B,0xea, //EXP100
+0x8C,0x60,
+
+0x8D,0xc3, //EXP120
+0x8E,0x50,
+
+0x9c,0x0f, //EXP Limit 1500.00 fps
+0x9d,0xa0,
+0x9e,0x01, //EXP Unit
+0x9f,0xf4,
+
+0xa3,0x00,
+0xa4,0xfd, //Exp 12000
+
+0xb0,0x15,
+0xb1,0x14,
+0xb2,0x60,
+0xb3,0x1a,
+0xb4,0x1c,
+0xb5,0x48,
+0xb6,0x32,
+0xb7,0x2b,
+0xb8,0x27,
+0xb9,0x25,
+0xba,0x23,
+0xbb,0x22,
+0xbc,0x22,
+0xbd,0x21,
+
+0xc0,0x10,
+0xc1,0x40,
+0xc2,0x40,
+0xc3,0x40,
+0xc4,0x06,
+
+0xc8,0x80,
+0xc9,0x80,
+///// PAGE 20 END /////
+
+///// PAGE 21 START /////
+0x03,0x21, //page 21
+
+//Indoor Weight
+0x20,0x11,
+0x21,0x11,
+0x22,0x11,
+0x23,0x11,
+0x24,0x14,
+0x25,0x44,
+0x26,0x44,
+0x27,0x41,
+0x28,0x14,
+0x29,0x44,
+0x2a,0x44,
+0x2b,0x41,
+0x2c,0x14,
+0x2d,0x47,
+0x2e,0x74,
+0x2f,0x41,
+0x30,0x14,
+0x31,0x47,
+0x32,0x74,
+0x33,0x41,
+0x34,0x14,
+0x35,0x44,
+0x36,0x44,
+0x37,0x41,
+0x38,0x14,
+0x39,0x44,
+0x3a,0x44,
+0x3b,0x41,
+0x3c,0x11,
+0x3d,0x11,
+0x3e,0x11,
+0x3f,0x11,
+
+//Outdoor Weight
+0x40,0x11,
+0x41,0x11,
+0x42,0x11,
+0x43,0x11,
+0x44,0x14,
+0x45,0x44,
+0x46,0x44,
+0x47,0x41,
+0x48,0x14,
+0x49,0x44,
+0x4a,0x44,
+0x4b,0x41,
+0x4c,0x14,
+0x4d,0x47,
+0x4e,0x74,
+0x4f,0x41,
+0x50,0x14,
+0x51,0x47,
+0x52,0x74,
+0x53,0x41,
+0x54,0x14,
+0x55,0x44,
+0x56,0x44,
+0x57,0x41,
+0x58,0x14,
+0x59,0x44,
+0x5a,0x44,
+0x5b,0x41,
+0x5c,0x11,
+0x5d,0x11,
+0x5e,0x11,
+0x5f,0x11,
+
+
+///// PAGE 22 START /////
+0x03,0x22, //page 22
+0x10,0xfd,
+0x11,0x2e,
+0x19,0x00, //Low On //
+0x20,0x30, //For AWB Speed
+0x21,0x80,
+0x22,0x00,
+0x23,0x00,
+0x24,0x01,
+0x25,0x7e, //for Tracking setting
+
+0x30,0x80,
+0x31,0x80,
+0x38,0x11,
+0x39,0x34,
+0x40,0xe4, //Stb Yth
+0x41,0x33, //Stb cdiff
+0x42,0x22, //Stb csum
+0x43,0xf3, //Unstb Yth
+0x44,0x55, //Unstb cdiff
+0x45,0x33, //Unstb csum
+0x46,0x00,
+0x47,0xa2,
+0x48,0x02,
+0x49,0x0a,
+
+0x60,0x04,
+0x61,0xc4,
+0x62,0x04,
+0x63,0x92,
+0x66,0x04,
+0x67,0xc4,
+0x68,0x04,
+0x69,0x92,
+
+0x80,0x38,
+0x81,0x20,
+0x82,0x38,
+
+0x83,0x58,
+0x84,0x16,
+0x85,0x4f,
+0x86,0x1a,
+
+0x87,0x42,
+0x88,0x30,
+0x89,0x27,
+0x8a,0x18,
+
+0x8b,0x3d,
+0x8c,0x32,
+0x8d,0x24,
+0x8e,0x1d,
+
+0x8f,0x4d, //4e
+0x90,0x46, //4d
+0x91,0x40, //4c
+0x92,0x3a, //4a
+0x93,0x2f, //46
+0x94,0x21,
+0x95,0x19,
+0x96,0x16,
+0x97,0x13,
+0x98,0x12,
+0x99,0x11,
+0x9a,0x10,
+
+0x9b,0xbb,
+0x9c,0xaa,
+0x9d,0x48,
+0x9e,0x38,
+0x9f,0x30,
+
+0xa0,0x70,
+0xa1,0x54,
+0xa2,0x6f,
+0xa3,0xff,
+
+0xa4,0x14, //1536fps
+0xa5,0x2c, //698fps
+0xa6,0xcf, //148fps
+
+0xad,0x40,
+0xae,0x4a,
+
+0xaf,0x28, //Low temp Rgain
+0xb0,0x26, //Low temp Rgain
+
+0xb1,0x00,
+0xb4,0xbf, //For Tracking AWB Weight
+0xb8,0x91, //(0+,1-)High Cb ,(0+,1-)Low Cr
+0xb9,0x00,
+/////// PAGE 22 END ///////
+
+/////// PAGE 20 ///////
+0x03,0x20,
+0x10,0x9c, //AE On 50hz
+
+/////// PAGE 22 ///////
+0x03,0x22,
+0x10,0xe9, //AWB On
+
+/////// PAGE 0 ///////
+0x03,0x00,
+0x0e,0x03,
+0x0e,0x73,
+
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x03,0x18,
+0x12,0x20,
+0x10,0x07,
+0x11,0x00,
+0x20,0x02,
+0x21,0x80,
+0x22,0x03,
+0x23,0xc0,
+0x24,0x00,
+0x25,0x00,
+0x26,0x00,
+0x27,0x00,
+0x28,0x02,
+0x29,0x80,
+0x2a,0x03,
+0x2b,0xc0,
+0x2c,0x0a,
+0x2d,0x00,
+0x2e,0x0a,
+0x2f,0x00,
+0x30,0x24,
+
+0x03,0x00,
+0x01,0x00,
+
+};
+
+uint8_t hi257_default_regs_init[]={
+
+0x01,0x01, //sleep on
+0x01,0x03, //sleep off
+0x01,0x01, //sleep on
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x08,0x00,
+0x09,0x77, // pad strength = max
+0x0a,0x07, // pad strength = max
+
+0x0e,0x03, //PLL On
+0x0e,0x73, //PLLx2
+
+0x03,0x00, //Dummy 750us
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+
+///// PAGE 20 /////
+0x03,0x20, //page 20
+0x10,0x1c, //AE off 50hz
+
+///// PAGE 22 /////
+0x03,0x22, //page 22
+0x10,0x69, //AWB off
+
+
+///// Initial Start /////
+///// PAGE 0 Start /////
+0x03,0x00, //page 0
+0x10,0x90,
+0x11,0x90, //Windowing On + 1Frame Skip
+0x12,0x04, //Rinsing edge 0x04 // Falling edge 0x00
+0x14,0x05,
+
+0x20,0x00, //Row H
+0x21,0x02, //Row L
+0x22,0x00, //Col H
+0x23,0x04, //Col L
+
+0x24,0x04, //Window height_H //= 1200
+0x25,0xb0, //Window height_L //
+0x26,0x06, //Window width_H //= 1600
+0x27,0x40, //Window wight_L
+
+0x40,0x01, //Hblank_360
+0x41,0x78,
+0x42,0x00, //Vblank
+0x43,0x14, //Flick Stop
+
+0x50,0x00, //Test Pattern
+
+///// BLC /////
+0x80,0x2e,
+0x81,0x7e,
+0x82,0x90,
+0x83,0x00,
+0x84,0xcc, //20130604 0x0c->0xcc
+0x85,0x00,
+0x86,0x00,
+0x87,0x0f,
+0x88,0x34,
+0x8a,0x0b,
+0x8e,0x80, //Pga Blc Hold
+
+0x90,0x0c, //BLC_TIME_TH_ON
+0x91,0x0c, //BLC_TIME_TH_OFF
+0x92,0x58, //BLC_AG_TH_ON
+0x93,0x50, //BLC_AG_TH_OFF
+0x96,0xdc, //BLC Outdoor Th On
+0x97,0xfe, //BLC Outdoor Th Off
+0x98,0x38,
+
+//OutDoor BLC
+0x99,0x43, //R,Gr,B,Gb Offset
+
+//Dark BLC
+0xa0,0x02, //R,Gr,B,Gb Offset
+
+//Normal BLC
+0xa8,0x43, //R,Gr,B,Gb Offset
+///// PAGE 0 END /////
+
+///// PAGE 2 START /////
+0x03,0x02,
+0x10,0x00,
+0x13,0x00,
+0x14,0x00,
+0x18,0xcc,
+0x19,0x01, // pmos switch on (for cfpn)
+0x1A,0x39, //20130604 0x09->0xcc
+0x1B,0x00,
+0x1C,0x1a, // for ncp
+0x1D,0x14, // for ncp
+0x1E,0x30, // for ncp
+0x1F,0x10,
+
+0x20,0x77,
+0x21,0xde,
+0x22,0xa7,
+0x23,0x30,
+0x24,0x77,
+0x25,0x10,
+0x26,0x10,
+0x27,0x3c,
+0x2b,0x80,
+0x2c,0x02,
+0x2d,0x58,
+0x2e,0x11,//20130604 0xde->0x11
+0x2f,0x11,//20130604 0xa7->0x11
+
+0x30,0x00,
+0x31,0x99,
+0x32,0x00,
+0x33,0x00,
+0x34,0x22,
+0x36,0x75,
+0x38,0x88,
+0x39,0x88,
+0x3d,0x03,
+0x3f,0x02,
+
+0x49,0xc1,//20130604 0x87->0xd1 --> mode Change Issue modify -> 0xc1
+0x4a,0x10,
+
+0x50,0x21,
+0x53,0xb1,
+0x54,0x10,
+0x55,0x1c, // for ncp
+0x56,0x11,
+0x58,0x3a,//20130604 add
+0x59,0x38,//20130604 add
+0x5d,0xa2,
+0x5e,0x5a,
+
+0x60,0x87,
+0x61,0x98,
+0x62,0x88,
+0x63,0x96,
+0x64,0x88,
+0x65,0x96,
+0x67,0x3f,
+0x68,0x3f,
+0x69,0x3f,
+
+0x72,0x89,
+0x73,0x95,
+0x74,0x89,
+0x75,0x95,
+0x7C,0x84,
+0x7D,0xaf,
+
+0x80,0x01,
+0x81,0x7a,
+0x82,0x13,
+0x83,0x24,
+0x84,0x78,
+0x85,0x7c,
+
+0x92,0x44,
+0x93,0x59,
+0x94,0x78,
+0x95,0x7c,
+
+0xA0,0x02,
+0xA1,0x74,
+0xA4,0x74,
+0xA5,0x02,
+0xA8,0x85,
+0xA9,0x8c,
+0xAC,0x10,
+0xAD,0x16,
+
+0xB0,0x99,
+0xB1,0xa3,
+0xB4,0x9b,
+0xB5,0xa2,
+0xB8,0x9b,
+0xB9,0x9f,
+0xBC,0x9b,
+0xBD,0x9f,
+
+0xc4,0x29,
+0xc5,0x40,
+0xc6,0x5c,
+0xc7,0x72,
+0xc8,0x2a,
+0xc9,0x3f,
+0xcc,0x5d,
+0xcd,0x71,
+
+0xd0,0x10,
+0xd1,0x14,
+0xd2,0x20,
+0xd3,0x00,
+0xd4,0x0c, //DCDC_TIME_TH_ON
+0xd5,0x0c, //DCDC_TIME_TH_OFF
+0xd6,0x58, //DCDC_AG_TH_ON
+0xd7,0x50, //DCDC_AG_TH_OFF
+0xdc,0x00,
+0xdd,0xa3,
+0xde,0x00,
+0xdf,0x84,
+
+0xe0,0xa4,
+0xe1,0xa4,
+0xe2,0xa4,
+0xe3,0xa4,
+0xe4,0xa4,
+0xe5,0x01,
+0xe8,0x00,
+0xe9,0x00,
+0xea,0x77,
+
+0xF0,0x00,
+0xF1,0x00,
+0xF2,0x00,
+
+///// PAGE 2 END /////
+
+///// PAGE 10 START /////
+0x03,0x10, //page 10
+0x10,0x03, //S2D enable _ YUYV Order o??
+0x11,0x03,
+0x12,0xf0,
+0x13,0x01,
+
+0x20,0x00,
+0x21,0x40,
+0x22,0x0f,
+0x24,0x20,
+0x25,0x10,
+0x26,0x01,
+0x27,0x02,
+0x28,0x11,
+
+0x40,0x00,
+0x41,0x00, //D-YOffset Th
+0x42,0x04, //Cb Offset
+0x43,0x04, //Cr Offset
+0x44,0x80,
+0x45,0x80,
+0x46,0xf0,
+0x48,0x80,
+0x4a,0x80,
+
+0x50,0xa0, //D-YOffset AG
+
+0x60,0x0f,
+0x61,0xc0, //Sat B
+0x62,0xc0, //Sat R
+0x63,0x58, //Auto-De Color
+
+0x66,0x42,
+0x67,0x22,
+
+0x6a,0x7c, //White Protection Offset Dark/Indoor
+0x74,0x0c, //White Protection Offset Outdoor
+0x76,0x01, //White Protection Enable
+///// PAGE 10 END /////
+
+///// PAGE 11 START /////
+0x03,0x11, //page 11
+
+//LPF Auto Control
+0x20,0x00,
+0x21,0x00,
+0x26,0x5a, // Double_AG
+0x27,0x58, // Double_AG
+0x28,0x0f,
+0x29,0x10,
+0x2b,0x30,
+0x2c,0x32,
+
+//GBGR
+0x70,0x2b,
+0x74,0x30,
+0x75,0x18,
+0x76,0x30,
+0x77,0xff,
+0x78,0xa0,
+0x79,0xff, //Dark GbGr Th
+0x7a,0x30,
+0x7b,0x20,
+0x7c,0xf4, //Dark Dy Th B[7:4]
+///// PAGE 11 END /////
+
+///// PAGE 12 START /////
+0x03,0x12, //page 11
+
+//YC2D
+0x10,0x03, //Y DPC Enable
+0x11,0x08, //
+0x12,0x10, //0x30 -> 0x10
+0x20,0x53, //Y_lpf_enable
+0x21,0x03, //C_lpf_enable_on
+0x22,0xe6, //YC2D_CrCbY_Dy
+
+0x23,0x14, //Outdoor Dy Th
+0x24,0x20, //Indoor Dy Th // For reso Limit 0x20
+0x25,0x30, //Dark Dy Th
+
+//Outdoor LPF Flat
+0x30,0xff, //Y Hi Th
+0x31,0x00, //Y Lo Th
+0x32,0xf0, //Std Hi Th //Reso Improve Th Low //50
+0x33,0x00, //Std Lo Th
+0x34,0x00, //Median ratio
+
+//Indoor LPF Flat
+0x35,0xff, //Y Hi Th
+0x36,0x00, //Y Lo Th
+0x37,0xff, //Std Hi Th //Reso Improve Th Low //50
+0x38,0x00, //Std Lo Th
+0x39,0x00, //Median ratio
+
+//Dark LPF Flat
+0x3a,0xff, //Y Hi Th
+0x3b,0x00, //Y Lo Th
+0x3c,0x93, //Std Hi Th //Reso Improve Th Low //50
+0x3d,0x00, //Std Lo Th
+0x3e,0x00, //Median ratio
+
+//Outdoor Cindition
+0x46,0xa0, //Out Lum Hi
+0x47,0x40, //Out Lum Lo
+
+//Indoor Cindition
+0x4c,0xb0, //Indoor Lum Hi
+0x4d,0x40, //Indoor Lum Lo
+
+//Dark Cindition
+0x52,0xb0, //Dark Lum Hi
+0x53,0x50, //Dark Lum Lo
+
+//C-Filter
+0x70,0x10, //Outdoor(2:1) AWM Th Horizontal
+0x71,0x0a, //Outdoor(2:1) Diff Th Vertical
+0x72,0x10, //Indoor,Dark1 AWM Th Horizontal
+0x73,0x0a, //Indoor,Dark1 Diff Th Vertical
+0x74,0x18, //Dark(2:3) AWM Th Horizontal
+0x75,0x0f, //Dark(2:3) Diff Th Vertical
+
+//DPC
+0x90,0x7d,
+0x91,0x34,
+0x99,0x28,
+0x9c,0x14,
+0x9d,0x15,
+0x9e,0x28,
+0x9f,0x28,
+0xb0,0x0e, //Zipper noise Detault change (0x75->0x0e)
+0xb8,0x44,
+0xb9,0x15,
+///// PAGE 12 END /////
+
+///// PAGE 13 START /////
+0x03,0x13, //page 13
+
+0x80,0xfd, //Sharp2D enable _ YUYV Order o??
+0x81,0x07, //Sharp2D Clip/Limit
+0x82,0x73, //Sharp2D Filter
+0x83,0x00, //Sharp2D Low Clip
+0x85,0x00,
+
+0x92,0x33, //Sharp2D Slop n/p
+0x93,0x30, //Sharp2D LClip
+0x94,0x02, //Sharp2D HiClip1 Th
+0x95,0xf0, //Sharp2D HiClip2 Th
+0x96,0x1e, //Sharp2D HiClip2 Resolution
+0x97,0x40,
+0x98,0x80,
+0x99,0x40,
+
+//Sharp Lclp
+0xa2,0x04, //Outdoor Lclip_N
+0xa3,0x05, //Outdoor Lclip_P
+0xa4,0x06, //Indoor Lclip_N 0x03 For reso Limit 0x0e
+0xa5,0x07, //Indoor Lclip_P 0x0f For reso Limit 0x0f
+0xa6,0x80, //Dark Lclip_N
+0xa7,0x80, //Dark Lclip_P
+
+//Outdoor Slope
+0xb6,0x28, //Lum negative Hi
+0xb7,0x20, //Lum negative middle
+0xb8,0x24, //Lum negative Low
+0xb9,0x28, //Lum postive Hi
+0xba,0x20, //Lum postive middle
+0xbb,0x24, //Lum postive Low
+
+//Indoor Slope
+0xbc,0x20, //Lum negative Hi
+0xbd,0x20, //Lum negative middle
+0xbe,0x20, //Lum negative Low
+0xbf,0x20, //Lum postive Hi
+0xc0,0x20, //Lum postive middle
+0xc1,0x20, //Lum postive Low
+
+//Dark Slope
+0xc2,0x14, //Lum negative Hi
+0xc3,0x24, //Lum negative middle
+0xc4,0x1d, //Lum negative Low
+0xc5,0x14, //Lum postive Hi
+0xc6,0x24, //Lum postive middle
+0xc7,0x1d, //Lum postive Low
+///// PAGE 13 END /////
+
+///// PAGE 14 START /////
+0x03,0x14, //page 14
+0x10,0x01,
+
+0x20,0xA0,//X-Center
+0x21,0x80,//Y-Center
+
+0x22,0x12, //LSC R 1b->15 20130125
+0x23,0x0f, //LSC G
+0x24,0x0f, //LSC B
+
+0x25,0xf0, //LSC Off
+0x26,0xf0, //LSC On
+///// PAGE 14 END /////
+
+/////// PAGE 15 START ///////
+0x03,0x15, //page 15
+0x10,0x21,
+0x14,0x44,
+0x15,0x34,
+0x16,0x26,
+0x17,0x2f,
+
+//CMC
+0x30,0xdd,
+0x31,0x68,
+0x32,0x0b,
+0x33,0x2c,
+0x34,0xce,
+0x35,0x22,
+0x36,0x0e,
+0x37,0x42,
+0x38,0xd0,
+
+//CMC OFS
+0x40,0x90,
+0x41,0x16,
+0x42,0x86,
+0x43,0x01,
+0x44,0x10,
+0x45,0x91,
+0x46,0x82,
+0x47,0x9c,
+0x48,0x1d,
+
+//CMC POFS
+0x50,0x0d,
+0x51,0x91,
+0x52,0x04,
+0x53,0x07,
+0x54,0x19,
+0x55,0xa0,
+0x56,0x00,
+0x57,0x98,
+0x58,0x18,
+///// PAGE 15 END /////
+
+///// PAGE 16 START /////
+0x03,0x16, //page 16
+0x10,0x31,
+0x18,0x5a,// Double_AG 5e->37
+0x19,0x58,// Double_AG 5e->36
+0x1a,0x0e,
+0x1b,0x01,
+0x1c,0xdc,
+0x1d,0xfe,
+
+//Indoor
+0x30,0x00,
+0x31,0x06,
+0x32,0x12,
+0x33,0x29,
+0x34,0x4d,
+0x35,0x6c,
+0x36,0x81,
+0x37,0x94,
+0x38,0xa4,
+0x39,0xb3,
+0x3a,0xc0,
+0x3b,0xcb,
+0x3c,0xd5,
+0x3d,0xde,
+0x3e,0xe6,
+0x3f,0xee,
+0x40,0xf5,
+0x41,0xfc,
+0x42,0xff,
+
+
+//Outdoor
+0x50,0x00,
+0x51,0x06,
+0x52,0x12,
+0x53,0x29,
+0x54,0x45,
+0x55,0x60,
+0x56,0x7a,
+0x57,0x8e,
+0x58,0xa1,
+0x59,0xac,
+0x5a,0xb8,
+0x5b,0xc5,
+0x5c,0xd0,
+0x5d,0xda,
+0x5e,0xe3,
+0x5f,0xeb,
+0x60,0xf0,
+0x61,0xf4,
+0x62,0xf5,
+
+//Dark
+0x70,0x00,
+0x71,0x0e,
+0x72,0x17,
+0x73,0x26,
+0x74,0x3f,
+0x75,0x56,
+0x76,0x6c,
+0x77,0x81,
+0x78,0x94,
+0x79,0xa5,
+0x7a,0xb3,
+0x7b,0xc4,
+0x7c,0xce,
+0x7d,0xd9,
+0x7e,0xe4,
+0x7f,0xec,
+0x80,0xf5,
+0x81,0xfc,
+0x82,0xff,
+///// PAGE 16 END /////
+
+///// PAGE 17 START /////
+0x03,0x17, //page 17
+0xc1,0x00,
+0xc4,0x4b,
+0xc5,0x3f,
+0xc6,0x02,
+0xc7,0x20,
+///// PAGE 17 END /////
+
+///// PAGE 18 START /////
+0x03,0x18, //page 18
+0x14,0x00, //Cubic Off
+///// PAGE 18 END /////
+
+///// PAGE 19 START /////
+0x03,0x19, //Page 0x18
+0x10,0x7f, //mcmc_ctl1 MCMC Enable B:[0]
+0x11,0x7f, //mcmc_ctl2
+0x12,0x1b, //mcmc_delta1
+0x13,0xac, //mcmc_center1
+0x14,0x1e, //mcmc_delta2
+0x15,0x6e, //mcmc_center2
+0x16,0x0a, //mcmc_delta3
+0x17,0xb8, //mcmc_center3
+0x18,0x1e, //mcmc_delta4
+0x19,0xe6, //mcmc_center4
+0x1a,0x9e, //mcmc_delta5
+0x1b,0x22, //mcmc_center5
+0x1c,0x9e, //mcmc_delta6
+0x1d,0x5e, //mcmc_center6
+0x1e,0x70,//mcmc_sat_gain1
+0x1f,0x37, //mcmc_sat_gain2
+0x20,0x21, //mcmc_sat_gain3
+0x21,0x43, //mcmc_sat_gain4
+0x22,0x2f, //mcmc_sat_gain5
+0x23,0x37, //mcmc_sat_gain6
+0x24,0x00, //mcmc_hue_angle1
+0x25,0x07, //mcmc_hue_angle2
+0x26,0x09, //mcmc_hue_angle3
+0x27,0x04, //mcmc_hue_angle4
+0x28,0x00, //mcmc_hue_angle5
+0x29,0x8c, //mcmc_hue_angle6
+
+0x53,0x10, //mcmc_ctl3
+
+0x6c,0xff, //mcmc_lum_ctl1 sat hue offset
+0x6d,0x3f, //mcmc_lum_ctl2 gain
+0x6e,0x00, //mcmc_lum_ctl3 hue
+0x6f,0x00, //mcmc_lum_ctl4 rgb offset
+0x70,0x00, //mcmc_lum_ctl5 rgb scale
+
+0x71,0x3f, //mcmc_lum_gain_wgt_th1 R1 magenta
+0x72,0x3f, //mcmc_lum_gain_wgt_th2 R1
+0x73,0x3f, //mcmc_lum_gain_wgt_th3 R1
+0x74,0x3f, //mcmc_lum_gain_wgt_th4 R1
+0x75,0x30, //mcmc_rg1_lum_sp1 R1
+0x76,0x50, //mcmc_rg1_lum_sp2 R1
+0x77,0x80, //mcmc_rg1_lum_sp3 R1
+0x78,0xb0, //mcmc_rg1_lum_sp4 R1
+
+0x79,0x3f, //mcmc_lum_gain_wgt_th1 R2 bright green
+0x7a,0x3f, //mcmc_lum_gain_wgt_th2 R2
+0x7b,0x3f, //mcmc_lum_gain_wgt_th3 R2
+0x7c,0x3f, //mcmc_lum_gain_wgt_th4 R2
+0x7d,0x28, //mcmc_rg2_lum_sp1 R2
+0x7e,0x50, //mcmc_rg2_lum_sp2 R2
+0x7f,0x80, //mcmc_rg2_lum_sp3 R2
+0x80,0xb0, //mcmc_rg2_lum_sp4 R2
+
+0x81,0x28, //mcmc_lum_gain_wgt_th1 R3 dark green
+0x82,0x3f, //mcmc_lum_gain_wgt_th2 R3
+0x83,0x3f, //mcmc_lum_gain_wgt_th3 R3
+0x84,0x3f, //mcmc_lum_gain_wgt_th4 R3
+0x85,0x28, //mcmc_rg3_lum_sp1 R3
+0x86,0x50, //mcmc_rg3_lum_sp2 R3
+0x87,0x80, //mcmc_rg3_lum_sp3 R3
+0x88,0xb0, //mcmc_rg3_lum_sp4 R3
+
+0x89,0x1a, //mcmc_lum_gain_wgt_th1 R4 skin
+0x8a,0x28, //mcmc_lum_gain_wgt_th2 R4
+0x8b,0x3f, //mcmc_lum_gain_wgt_th3 R4
+0x8c,0x3f, //mcmc_lum_gain_wgt_th4 R4
+0x8d,0x10, //mcmc_rg3_lum_sp1 R4
+0x8e,0x30, //mcmc_rg3_lum_sp2 R4
+0x8f,0x60, //mcmc_rg3_lum_sp3 R4
+0x90,0x90, //mcmc_rg3_lum_sp4 R4
+
+0x91,0x1a, //mcmc_rg5_gain_wgt_th1 R5 cyan
+0x92,0x28, //mcmc_rg5_gain_wgt_th2 R5
+0x93,0x3f, //mcmc_rg5_gain_wgt_th3 R5
+0x94,0x3f, //mcmc_rg5_gain_wgt_th4 R5
+0x95,0x28, //mcmc_rg5_lum_sp1 R5
+0x96,0x50, //mcmc_rg5_lum_sp2 R5
+0x97,0x80, //mcmc_rg5_lum_sp3 R5
+0x98,0xb0, //mcmc_rg5_lum_sp4 R5
+
+0x99,0x1a, //mcmc_rg6_gain_wgt_th1 R6 blue
+0x9a,0x28, //mcmc_rg6_gain_wgt_th2 R6
+0x9b,0x3f, //mcmc_rg6_gain_wgt_th3 R6
+0x9c,0x3f, //mcmc_rg6_gain_wgt_th4 R6
+0x9d,0x28, //mcmc_rg6_lum_sp1 R6
+0x9e,0x50, //mcmc_rg6_lum_sp2 R6
+0x9f,0x80, //mcmc_rg6_lum_sp3 R6
+0xa0,0xb0, //mcmc_rg6_lum_sp4 R6
+
+0xa2,0x00,
+0xe5,0x80, //add 20120709 Bit[7] On MCMC --> YC2D_LPF
+
+/////// PAGE 20 START ///////
+0x03,0x20,
+0x10,0x1c,
+0x11,0x14,
+0x18,0x30,
+0x20,0x25, //8x8 Ae weight 0~7 Outdoor / Weight Outdoor On B[5]
+0x21,0x30,
+0x22,0x10,
+0x23,0x00,
+
+0x28,0xe7,
+0x29,0x0d,
+0x2a,0xff,
+0x2b,0x04, //Adaptive Off,1/100 Flicker
+
+0x2c,0x83, //AE After CI
+0x2d,0x03,
+0x2e,0x13,
+0x2f,0x0b,
+
+0x30,0x78,
+0x31,0xd7,
+0x32,0x10,
+0x33,0x2e,
+0x34,0x20,
+0x35,0xd4,
+0x36,0xfe,
+0x37,0x32,
+0x38,0x04,
+0x39,0x22,
+0x3a,0xde,
+0x3b,0x22,
+0x3c,0xde,
+0x3d,0xe1,
+
+0x50,0x45,
+0x51,0x88,
+
+0x56,0x1f, // for tracking
+0x57,0xa6, // for tracking
+0x58,0x1a, // for tracking
+0x59,0x7a, // for tracking
+
+0x5a,0x04,
+0x5b,0x04,
+
+0x5e,0xc7,
+0x5f,0x95,
+
+0x62,0x10,
+0x63,0xc0,
+0x64,0x10,
+0x65,0x8a,
+0x66,0x58,
+0x67,0x58,
+
+0x70,0x54, //6c
+0x71,0x80, //81(+4),89(-4)
+
+0x76,0x32,
+0x77,0xb1,
+0x78,0x22, //24
+0x79,0x32, // Y Target 70 => 25,72 => 26 //
+0x7a,0x23, //23
+0x7b,0x22, //22
+0x7d,0x23,
+
+0x83,0x02, //EXP Normal 33.33 fps
+0x84,0xbf,
+0x85,0x20,
+
+0x86,0x01, //EXPMin 12000.00 fps
+0x87,0xf4,
+
+0x88,0x0b, //EXP Max(120Hz) 8.00 fps
+0x89,0x71,
+0x8a,0xb0,
+
+0xa5,0x0b, //EXP Max(100Hz) 7.69 fps
+0xa6,0xe6,
+0xa7,0xe0,
+
+0x8B,0xea, //EXP100
+0x8C,0x60,
+
+0x8D,0xc3, //EXP120
+0x8E,0x50,
+
+0x9c,0x0f, //EXP Limit 1500.00 fps
+0x9d,0xa0,
+0x9e,0x01, //EXP Unit
+0x9f,0xf4,
+
+0xa3,0x00,
+0xa4,0xfd, //Exp 12000
+
+0xb0,0x15,
+0xb1,0x14,
+0xb2,0x60,
+0xb3,0x1a,
+0xb4,0x1c,
+0xb5,0x48,
+0xb6,0x32,
+0xb7,0x2b,
+0xb8,0x27,
+0xb9,0x25,
+0xba,0x23,
+0xbb,0x22,
+0xbc,0x22,
+0xbd,0x21,
+
+0xc0,0x10,
+0xc1,0x40,
+0xc2,0x40,
+0xc3,0x40,
+0xc4,0x06,
+
+0xc8,0x80,
+0xc9,0x80,
+///// PAGE 20 END /////
+
+///// PAGE 21 START /////
+0x03,0x21, //page 21
+
+//Indoor Weight
+0x20,0x11,
+0x21,0x11,
+0x22,0x11,
+0x23,0x11,
+0x24,0x14,
+0x25,0x44,
+0x26,0x44,
+0x27,0x41,
+0x28,0x14,
+0x29,0x44,
+0x2a,0x44,
+0x2b,0x41,
+0x2c,0x14,
+0x2d,0x47,
+0x2e,0x74,
+0x2f,0x41,
+0x30,0x14,
+0x31,0x47,
+0x32,0x74,
+0x33,0x41,
+0x34,0x14,
+0x35,0x44,
+0x36,0x44,
+0x37,0x41,
+0x38,0x14,
+0x39,0x44,
+0x3a,0x44,
+0x3b,0x41,
+0x3c,0x11,
+0x3d,0x11,
+0x3e,0x11,
+0x3f,0x11,
+
+//Outdoor Weight
+0x40,0x11,
+0x41,0x11,
+0x42,0x11,
+0x43,0x11,
+0x44,0x14,
+0x45,0x44,
+0x46,0x44,
+0x47,0x41,
+0x48,0x14,
+0x49,0x44,
+0x4a,0x44,
+0x4b,0x41,
+0x4c,0x14,
+0x4d,0x47,
+0x4e,0x74,
+0x4f,0x41,
+0x50,0x14,
+0x51,0x47,
+0x52,0x74,
+0x53,0x41,
+0x54,0x14,
+0x55,0x44,
+0x56,0x44,
+0x57,0x41,
+0x58,0x14,
+0x59,0x44,
+0x5a,0x44,
+0x5b,0x41,
+0x5c,0x11,
+0x5d,0x11,
+0x5e,0x11,
+0x5f,0x11,
+
+
+///// PAGE 22 START /////
+0x03,0x22, //page 22
+0x10,0xfd,
+0x11,0x2e,
+0x19,0x00, //Low On //
+0x20,0x30, //For AWB Speed
+0x21,0x80,
+0x22,0x00,
+0x23,0x00,
+0x24,0x01,
+0x25,0x7e, //for Tracking setting
+
+0x30,0x80,
+0x31,0x80,
+0x38,0x11,
+0x39,0x34,
+0x40,0xe4, //Stb Yth
+0x41,0x33, //Stb cdiff
+0x42,0x22, //Stb csum
+0x43,0xf3, //Unstb Yth
+0x44,0x55, //Unstb cdiff
+0x45,0x33, //Unstb csum
+0x46,0x00,
+0x47,0xa2,
+0x48,0x02,
+0x49,0x0a,
+
+0x60,0x04,
+0x61,0xc4,
+0x62,0x04,
+0x63,0x92,
+0x66,0x04,
+0x67,0xc4,
+0x68,0x04,
+0x69,0x92,
+
+0x80,0x38,
+0x81,0x20,
+0x82,0x38,
+
+0x83,0x58,
+0x84,0x16,
+0x85,0x4f,
+0x86,0x1a,
+
+0x87,0x42,
+0x88,0x30,
+0x89,0x27,
+0x8a,0x18,
+
+0x8b,0x3d,
+0x8c,0x32,
+0x8d,0x24,
+0x8e,0x1d,
+
+0x8f,0x4d, //4e
+0x90,0x46, //4d
+0x91,0x40, //4c
+0x92,0x3a, //4a
+0x93,0x2f, //46
+0x94,0x21,
+0x95,0x19,
+0x96,0x16,
+0x97,0x13,
+0x98,0x12,
+0x99,0x11,
+0x9a,0x10,
+
+0x9b,0xbb,
+0x9c,0xaa,
+0x9d,0x48,
+0x9e,0x38,
+0x9f,0x30,
+
+0xa0,0x70,
+0xa1,0x54,
+0xa2,0x6f,
+0xa3,0xff,
+
+0xa4,0x14, //1536fps
+0xa5,0x2c, //698fps
+0xa6,0xcf, //148fps
+
+0xad,0x40,
+0xae,0x4a,
+
+0xaf,0x28, //Low temp Rgain
+0xb0,0x26, //Low temp Rgain
+
+0xb1,0x00,
+0xb4,0xbf, //For Tracking AWB Weight
+0xb8,0x91, //(0+,1-)High Cb ,(0+,1-)Low Cr
+0xb9,0x00,
+/////// PAGE 22 END ///////
+
+/////// PAGE 20 ///////
+0x03,0x20,
+0x10,0x9c, //AE On 50hz
+
+/////// PAGE 22 ///////
+0x03,0x22,
+0x10,0xe9, //AWB On
+
+/////// PAGE 0 ///////
+0x03,0x00,
+0x0e,0x03,
+0x0e,0x73,
+
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+0x03,0x00,
+
+0x03,0x18,
+0x12,0x20,
+0x10,0x07,
+0x11,0x00,
+0x20,0x02,
+0x21,0x80,
+0x22,0x03,
+0x23,0xc0,
+0x24,0x00,
+0x25,0x00,
+0x26,0x00,
+0x27,0x00,
+0x28,0x02,
+0x29,0x80,
+0x2a,0x03,
+0x2b,0xc0,
+0x2c,0x0a,
+0x2d,0x00,
+0x2e,0x0a,
+0x2f,0x00,
+0x30,0x24,
+
+0x03,0x00,
+0x01,0x00,
+
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/Makefile b/drivers/media/video/wmt_v4l2/sensors/nmi5625/Makefile
new file mode 100755
index 00000000..f77cbbad
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/Makefile
@@ -0,0 +1,4 @@
+# obj-y += nmidrv_i2c.o
+nmidrv-objs += nmidrv_kernel.o
+obj-y += nmidrv.o
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.c b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.c
new file mode 100755
index 00000000..646d3cfb
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.c
@@ -0,0 +1,158 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "nmidrv_cmos.h"
+
+#define sensor_write_array(sd, arr, sz)
+#define sensor_read(sd, reg)
+#define sensor_write(sd, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x10
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, nmi_320_240_regs),
+// CMOS_WIN_SIZE("VGA", 640, 480, nmi_640_480_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ extern int nmi_running(void);
+ return nmi_running() ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, nmi_default_regs_init,
+ ARRAY_SIZE(nmi_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, nmi_default_regs_exit,
+ ARRAY_SIZE(nmi_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops nmi_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev nmi = {
+ .name = "nmi",
+ .i2c_addr = 0xff,
+ .id = 0xff,
+ .max_width = 320,
+ .max_height = 240,
+ .ops = &nmi_ops,
+};
+
+#if 0
+int nmi_cmos_init(void)
+{
+ return cmos_register_sudbdev(&nmi);
+}
+
+void nmi_cmos_exit(void)
+{
+ return cmos_unregister_subdev(&nmi);
+}
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.h b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.h
new file mode 100755
index 00000000..4b24659c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_cmos.h
@@ -0,0 +1,219 @@
+
+#ifndef __NMI_H_
+#define __NMI_H_
+
+// Scene Mode
+uint8_t nmi_scene_mode_auto[] = {
+};
+
+uint8_t nmi_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t nmi_wb_auto [] = {
+};
+
+uint8_t nmi_wb_incandescent [] = {
+};
+
+uint8_t nmi_wb_fluorescent [] = {
+};
+
+uint8_t nmi_wb_daylight [] = {
+};
+
+uint8_t nmi_wb_cloudy [] = {
+};
+
+uint8_t nmi_wb_tungsten [] = {
+};
+
+
+// Exposure
+uint8_t nmi_exposure_neg6[] = {
+};
+
+uint8_t nmi_exposure_neg3[] = {
+};
+
+uint8_t nmi_exposure_zero[] = {
+};
+
+uint8_t nmi_exposure_pos3[] = {
+};
+
+uint8_t nmi_exposure_pos6[] = {
+};
+
+
+// Color Effect
+uint8_t nmi_colorfx_none[] = {
+};
+
+uint8_t nmi_colorfx_bw[] = {
+};
+
+uint8_t nmi_colorfx_sepia[] = {
+};
+
+uint8_t nmi_colorfx_negative[] = {
+};
+
+uint8_t nmi_colorfx_emboss[] = {
+};
+
+uint8_t nmi_colorfx_sketch[] = {
+};
+
+uint8_t nmi_colorfx_sky_blue[] = {
+};
+
+uint8_t nmi_colorfx_grass_green[] = {
+};
+
+uint8_t nmi_colorfx_skin_whiten[] = {
+};
+
+uint8_t nmi_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t nmi_brightness_neg4[] = {
+};
+
+uint8_t nmi_brightness_neg3[] = {
+};
+
+uint8_t nmi_brightness_neg2[] = {
+};
+
+uint8_t nmi_brightness_neg1[] = {
+};
+
+uint8_t nmi_brightness_zero[] = {
+};
+
+uint8_t nmi_brightness_pos1[] = {
+};
+
+uint8_t nmi_brightness_pos2[] = {
+};
+
+uint8_t nmi_brightness_pos3[] = {
+};
+
+uint8_t nmi_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t nmi_contrast_neg4[] = {
+};
+
+uint8_t nmi_contrast_neg3[] = {
+};
+
+uint8_t nmi_contrast_neg2[] = {
+};
+
+uint8_t nmi_contrast_neg1[] = {
+};
+
+uint8_t nmi_contrast_zero[] = {
+};
+
+uint8_t nmi_contrast_pos1[] = {
+};
+
+uint8_t nmi_contrast_pos2[] = {
+};
+
+uint8_t nmi_contrast_pos3[] = {
+};
+
+uint8_t nmi_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t nmi_saturation_neg4[] = {
+};
+
+uint8_t nmi_saturation_neg3[] = {
+};
+
+uint8_t nmi_saturation_neg2[] = {
+};
+
+uint8_t nmi_saturation_neg1[] = {
+};
+
+uint8_t nmi_saturation_zero[] = {
+};
+
+uint8_t nmi_saturation_pos1[] = {
+};
+
+uint8_t nmi_saturation_pos2[] = {
+};
+
+uint8_t nmi_saturation_pos3[] = {
+};
+
+uint8_t nmi_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t nmi_176_144_regs[]={
+};
+
+// QVGA
+uint8_t nmi_320_240_regs[]={
+};
+
+// CIF
+uint8_t nmi_352_288_regs[]={
+};
+
+// VGA
+uint8_t nmi_640_480_regs[]={
+};
+
+// SVGA
+uint8_t nmi_800_600_regs[]={
+};
+
+// XGA
+uint8_t nmi_1024_768_regs[]={
+};
+
+// 720p
+uint8_t nmi_1280_720_regs[]={
+};
+
+// UXGA
+uint8_t nmi_1600_1200_regs[]={
+};
+
+// 1080p
+uint8_t nmi_1920_1080_regs[]={
+};
+
+// QXGA
+uint8_t nmi_2048_1536_regs[]={
+};
+
+uint8_t nmi_2592_1944_regs[]={
+};
+
+// Initiliztion
+uint8_t nmi_default_regs_init[] = {
+};
+
+// Exit
+uint8_t nmi_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __NMI_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_custom_wmt.h b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_custom_wmt.h
new file mode 100755
index 00000000..0832f3a5
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_custom_wmt.h
@@ -0,0 +1,70 @@
+
+#ifndef _NMIDRV_CUSTOM_H_
+#define _NMIDRV_CUSTOM_H_
+/******************************************************************************
+**
+** Copyright (c) Newport Media Inc. All rights reserved.
+**
+** Module Name: nmidrv_custom.h
+**
+** This module implements the porting interface for the NMI ATV driver.
+** It can be used as an example for the driver porting.
+**
+**
+*******************************************************************************/
+
+#include
+
+//if pin is unuse,please define it as 0xff
+#define NMI_PIN_UNUSE 0xFF
+
+//step 1: configure NMI600 power pin and reset pin .
+//if VDDIO and VCORE use each pin, define NMI_POWER_VDDIO_PIN & NMI_POWER_VCORE_PIN
+//if VDDIO and VCORE use same pin, only define NMI_POWER_VDDIO_PIN,
+//and define NMI_POWER_VCORE_PIN as 0xff !!!
+#define NMI_POWER_VDDIO_PIN NMI_PIN_UNUSE
+#define NMI_POWER_VCORE_PIN WMT_PIN_GP0_GPIO2
+
+#define NMI_RESET_PIN WMT_PIN_GP62_SUSGPIO0
+
+
+// step 2: configure NMI600 i2c bus .
+//if use hardware I2C , please define NMI_HW_I2C
+#define NMI_HW_I2C
+#define NMI_HW_I2C_PORT 4
+#define NMI_I2C_RW_LENGTH 256
+
+//if use gpio i2c , please modify the defination below
+// note: when nmi600 power off, nmi600 iic sda and scl will be set to input mode.
+// so if other devices share iic with nmi600, maybe i2c needs initilize again.
+#define NMI_SCL_PIN NMI_PIN_UNUSE
+#define NMI_SDA_PIN NMI_PIN_UNUSE
+
+/******************************************************************************
+**
+** (B) Nmi Function Prototype (for porting on MTK 65XX)
+**
+*******************************************************************************/
+#define NMI_SET_GPIO_MODE_ENABLE(PIN) if(PIN!=NMI_PIN_UNUSE) \
+ gpio_request(PIN, "ATV,DTV")
+
+#define NMI_SET_GPIO_DIR(PIN,DIR) \
+do { \
+ if (PIN!=NMI_PIN_UNUSE) { \
+ if (DIR) \
+ gpio_direction_output(PIN, 1); \
+ else \
+ gpio_direction_input(PIN); \
+ } \
+} while (0)
+
+#define NMI_SET_GPIO_PULL_DISABLE(PIN) if(PIN!=NMI_PIN_UNUSE) \
+ wmt_gpio_setpull(PIN, WMT_GPIO_PULL_NONE)
+#define NMI_SET_GPIO_PULL_ENABLE(PIN) if(PIN!=NMI_PIN_UNUSE) \
+ wmt_gpio_setpull(PIN, WMT_GPIO_PULL_UP)
+#define NMI_SET_GPIO_LEVEL(PIN,LEVEL) if(PIN!=NMI_PIN_UNUSE) \
+ gpio_set_value(PIN, LEVEL)
+#define NMI_GET_GPIO_LEVEL(PIN) gpio_get_value(PIN)
+
+
+#endif /*_NMIDRV_CUSTOM_H_*/
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.c b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.c
new file mode 100755
index 00000000..55df9fdd
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.c
@@ -0,0 +1,484 @@
+/******************************************************************************
+**
+** Copyright (c) Newport Media Inc. All rights reserved.
+**
+** Module Name: nmidrv_i2c.c
+**
+** This module implements the i2c interface NMI ATV/DTV
+**
+**
+*******************************************************************************/
+#include "nmidrv_i2c.h"
+#include "nmidrv_kernel.h"
+#include "nmidrv_custom_mtk.h"
+
+#ifndef NMI_HW_I2C
+
+#include "mach/mt6516_gpio.h"
+#include
+
+/******************************************************************************
+**
+** I2c Defines
+**
+*******************************************************************************/
+#undef _DRIVE_ //this mode is nmi600 Recommend mode. please don't change it.
+
+#define I2C_DELAY_UNIT 2
+
+#define set_sda_output() NMI_SET_GPIO_DIR(NMI_SDA_PIN,1); \
+ NMI_SET_GPIO_LEVEL(NMI_SDA_PIN,0)
+#define set_sda_input() NMI_SET_GPIO_DIR(NMI_SDA_PIN,0)
+#define set_scl_output() NMI_SET_GPIO_DIR(NMI_SCL_PIN,1); \
+ NMI_SET_GPIO_LEVEL(NMI_SCL_PIN,0)
+#define set_scl_input() NMI_SET_GPIO_DIR(NMI_SCL_PIN,0)
+
+#ifdef _DRIVE_
+#define set_i2c_scl_PIN NMI_SET_GPIO_LEVEL(NMI_SCL_PIN,1)
+#define clr_i2c_scl_PIN NMI_SET_GPIO_LEVEL(NMI_SCL_PIN,0)
+#define set_i2c_sda_PIN NMI_SET_GPIO_LEVEL(NMI_SDA_PIN,1)
+#define clr_i2c_sda_PIN NMI_SET_GPIO_LEVEL(NMI_SDA_PIN,0)
+#else
+#define set_i2c_scl_PIN NMI_SET_GPIO_LEVEL(NMI_SCL_PIN,1)
+#define clr_i2c_scl_PIN NMI_SET_GPIO_LEVEL(NMI_SCL_PIN,0)
+#define set_i2c_sda_PIN NMI_SET_GPIO_DIR(NMI_SDA_PIN,0)
+#define clr_i2c_sda_PIN NMI_SET_GPIO_DIR(NMI_SDA_PIN,1)
+#endif
+
+#define get_i2c_sda_PIN NMI_GET_GPIO_LEVEL(NMI_SDA_PIN)
+#define get_i2c_scl_PIN NMI_GET_GPIO_LEVEL(NMI_SCL_PIN)
+
+
+
+
+/******************************************************************************
+**
+** I2c Platform Functions
+**
+*******************************************************************************/
+
+static void i2c_delay(unsigned int time)
+{
+#if 0
+ while(time--) {
+ ;
+ }
+#else
+ udelay(time);
+#endif
+}
+
+static void i2c_begin(void)
+{
+#ifdef _DRIVE_
+
+ /* set SDA to high */
+ set_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL to high */
+ set_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SDA to low */
+ clr_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL to low */
+ clr_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+#else
+
+ /* set SDA to high */
+ set_sda_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL to high */
+ set_scl_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SDA to low */
+ set_sda_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL to low */
+ set_scl_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+#endif
+
+}
+
+static void i2c_end(void)
+{
+#ifdef _DRIVE_
+ /* set SDA to low */
+ clr_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 2);
+
+ /* set SCL to high */
+ set_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SDA to high */
+ set_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+#else
+ set_sda_output();
+ i2c_delay(I2C_DELAY_UNIT << 2);
+ set_scl_input();
+ i2c_delay(I2C_DELAY_UNIT << 3);
+ set_sda_input();
+ i2c_delay(I2C_DELAY_UNIT << 4);
+#endif
+}
+
+static void i2c_write_ask(unsigned char flag)
+{
+#ifdef _DRIVE_
+ /* set SDA to high to ack */
+ if(flag)
+ set_i2c_sda_PIN;
+ else
+ clr_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* toggle clock */
+ set_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ clr_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SDA to 1 */
+ set_i2c_sda_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+#else
+
+ //set_sda_output();
+
+ if(flag)
+ set_sda_input();
+ //else
+ //set_sda_output();
+
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ set_scl_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ set_scl_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ set_sda_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+#endif
+}
+
+static unsigned char i2c_read_ack(void)
+{
+ unsigned char ret;
+
+#ifdef _DRIVE_
+ /* set SDA to input */
+ set_sda_input();
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* read */
+ if (!get_i2c_sda_PIN) {
+ ret = 1;
+ } else {
+ ret = 0;
+ dPrint(N_ERR,"[MTKI2C] 1. i2c_read_ack (Error.. No Ack received)\n");
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ if (!get_i2c_sda_PIN) {
+ ret = 1;
+ dPrint(N_ERR,"[MTKI2C] 2.i2c_read_ack (Correct after additional delay.)\n");
+ } else {
+ ret = 0;
+ dPrint(N_ERR,"[MTKI2C] 2.i2c_read_ack (Error.. No Ack received)\n");
+ }
+ }
+
+ /* set SCL high */
+ set_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL low */
+ clr_i2c_scl_PIN;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SDA back to output */
+ set_sda_output();
+
+#else
+
+ set_sda_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ if (!get_i2c_sda_PIN) {
+ ret = 1;
+ } else {
+ ret = 0;
+ dPrint(N_ERR,"[MTKI2C] 1. i2c_read_ack (Error.. No Ack received)\n");
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ if (!get_i2c_sda_PIN) {
+ ret = 1;
+ dPrint(N_ERR,"[MTKI2C] 2.i2c_read_ack (Correct after additional delay.)\n");
+ } else {
+ ret = 0;
+ dPrint(N_ERR,"[MTKI2C] 2.i2c_read_ack (Error.. No Ack received)\n");
+ }
+ }
+
+ set_scl_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ set_scl_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+#endif
+ return ret;
+}
+
+static unsigned char i2c_read_byte(void)
+{
+ unsigned char i;
+ unsigned char ret = 0;
+
+#ifdef _DRIVE_
+
+ /* set SDA input */
+ set_sda_input();
+
+ /* loop */
+ for (i = 0; i < 8; i++) {
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL high */
+ set_i2c_scl_PIN;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* read SDA */
+ ret = ret<<1;
+ if (get_i2c_sda_PIN)
+ ret |= 1;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL low */
+ clr_i2c_scl_PIN;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* if end, set SDA output */
+ if (i == 7) {
+ set_sda_output();
+ }
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ }
+
+#else
+ int retry,retry_val = 10000000;
+
+ ret = 0;
+
+ set_sda_input();
+ for (i = 0; i < 8; i++) {
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ set_scl_input();
+
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ ret = ret<<1;
+ if (get_i2c_sda_PIN)
+ ret |= 1;
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ retry = retry_val;
+ while (retry >= 0)
+ {
+ if (get_i2c_scl_PIN)
+ break;
+ else
+ {
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ retry--;
+ }
+ }
+
+ //if (retry != retry_val)
+ if (retry < (retry_val-10000))
+ {
+ //NMI_ERROR("[MTKI2C] i2c_read_byte: retry = %d\n",retry);
+ }
+
+ set_scl_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ if (i==7){
+ set_sda_output();
+ }
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ }
+
+#endif
+
+ return ret;
+}
+
+static unsigned char i2c_write_byte(unsigned char data)
+{
+ unsigned char i;
+
+#ifdef _DRIVE_
+ /* loop */
+ for (i = 0; i < 8; i++) {
+ /* set SDA high or low depend on the data bit */
+ if (data & 0x80)
+ set_i2c_sda_PIN;
+ else
+ clr_i2c_sda_PIN;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ data <<= 1;
+
+ /* set SCL high */
+ set_i2c_scl_PIN;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+
+ /* set SCL low */
+ clr_i2c_scl_PIN;
+ /* delay */
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ }
+#else
+ int retry, retry_val = 10000000;
+
+ //set_sda_output();
+
+ for (i = 0; i < 8; i++) {
+ if (data & 0x80)
+ set_sda_input();
+ else
+ set_sda_output();
+
+ data <<= 1;
+
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ set_scl_input();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ retry = retry_val;
+ while (retry >= 0)
+ {
+ if (get_i2c_scl_PIN)
+ break;
+ else
+ {
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ retry--;
+ }
+ }
+
+ //if (retry != retry_val)
+ if (retry < (retry_val-10000))
+ {
+ dPrint(N_TRACE,"i2c write_byte: retry = %d\n",retry);
+ }
+ set_scl_output();
+ i2c_delay(I2C_DELAY_UNIT << 0);
+ }
+
+#endif
+
+ return i2c_read_ack();
+}
+
+/******************************************************************************
+**
+** I2c Global Functions
+**
+*******************************************************************************/
+
+int nmi_i2c_init(void)
+{
+ dPrint(N_TRACE,"nmi_i2c_init: enter...\n");
+
+ //disable all inside pull( pullup & pulldown)
+ NMI_SET_GPIO_PULL_DISABLE(NMI_SDA_PIN);
+ NMI_SET_GPIO_PULL_DISABLE(NMI_SCL_PIN);
+ //set gpio mode
+ NMI_SET_GPIO_MODE_ENABLE(NMI_SDA_PIN);
+ NMI_SET_GPIO_MODE_ENABLE(NMI_SCL_PIN);
+
+#ifdef _DRIVE_
+ //set output mode
+ NMI_SET_GPIO_DIR( NMI_SDA_PIN,1);
+ NMI_SET_GPIO_DIR( NMI_SCL_PIN,1);
+ //set gpio high
+ NMI_SET_GPIO_LEVEL( NMI_SDA_PIN,1);
+ NMI_SET_GPIO_LEVEL( NMI_SCL_PIN,1);
+#else
+ //set input mode
+ NMI_SET_GPIO_DIR( NMI_SDA_PIN,0);
+ NMI_SET_GPIO_DIR( NMI_SCL_PIN,0);
+#endif
+
+ dPrint(N_TRACE,"nmi_i2c_init: exit...\n");
+
+ return 1;
+}
+
+void nmi_i2c_deinit(void)
+{
+ dPrint(N_TRACE,"nmi_i2c_deinit: enter...\n");
+
+ NMI_SET_GPIO_MODE_ENABLE(NMI_SDA_PIN);
+ NMI_SET_GPIO_MODE_ENABLE(NMI_SCL_PIN);
+
+ //set as input
+ NMI_SET_GPIO_DIR( NMI_SDA_PIN,0);
+ NMI_SET_GPIO_DIR( NMI_SCL_PIN,0);
+
+ dPrint(N_TRACE,"nmi_i2c_deinit: exit...\n");
+
+}
+
+int nmi_i2c_read(unsigned char adr, unsigned char *b, unsigned long sz)
+{
+ int i;
+
+ i2c_begin();
+ i2c_write_byte((adr << 1)|0x1);
+
+ for(i = 0; i < sz; i++) {
+ b[i] = i2c_read_byte();
+
+ if(i == sz-1)
+ i2c_write_ask(1);
+ else
+ i2c_write_ask(0);
+ }
+
+ i2c_end();
+ return 1;
+}
+
+int nmi_i2c_write(unsigned char adr, unsigned char *b, unsigned long sz)
+{
+ int i;
+
+ i2c_begin();
+
+ i2c_write_byte((adr << 1));
+ for(i = 0; i < sz; i++) {
+ i2c_write_byte(b[i]);
+ }
+
+ i2c_end();
+ return 1;
+}
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.h b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.h
new file mode 100755
index 00000000..5640295b
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_i2c.h
@@ -0,0 +1,14 @@
+
+#ifndef _NMIDRV_I2C_H_
+#define _NMIDRV_I2C_H_
+
+#include "nmidrv_custom_mtk.h"
+
+//enternal interface
+#ifndef NMI_HW_I2C
+int nmi_i2c_init(void);
+void nmi_i2c_deinit(void);
+int nmi_i2c_read(unsigned char, unsigned char *, unsigned long);
+int nmi_i2c_write(unsigned char, unsigned char *, unsigned long);
+#endif
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.c b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.c
new file mode 100755
index 00000000..601c2072
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.c
@@ -0,0 +1,435 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "nmidrv_kernel.h"
+#include "nmidrv_custom_wmt.h"
+
+extern int nmi_cmos_init(void);
+extern void nmi_cmos_exit(void);
+
+struct nmi_5625_dev {
+ struct i2c_client *i2c_client_atv;
+
+ struct mutex mu;
+ struct class *tv_class;
+ dev_t devn;
+ struct cdev cdv;
+};
+
+static int already_init = 0;
+static struct nmi_5625_dev nd;
+static u8 i2cBuf[32];
+
+static bool g_bIsAtvStart = false;
+
+int nmi_running(void)
+{
+ return g_bIsAtvStart;
+}
+EXPORT_SYMBOL(nmi_running);
+
+/**************************************************************
+
+ file operation:
+
+ **************************************************************/
+
+static int nmi5625_open(struct inode *inode, struct file *file)
+{
+ int ret = 0;
+
+ func_enter();
+ if (!already_init) {
+ ret = -ENODEV;
+ goto _fail_;
+ }
+
+ /***************************************
+ initialize 2.8V 1.2V RESET GPIO mode for reference
+ ****************************************/
+
+ //PWR Enable
+ NMI_SET_GPIO_MODE_ENABLE(NMI_POWER_VDDIO_PIN);
+ NMI_SET_GPIO_DIR(NMI_POWER_VDDIO_PIN, 1);
+ NMI_SET_GPIO_PULL_DISABLE(NMI_POWER_VDDIO_PIN);
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VDDIO_PIN, 0);
+
+ //LDO_Enable
+ NMI_SET_GPIO_MODE_ENABLE(NMI_POWER_VCORE_PIN);
+ NMI_SET_GPIO_DIR(NMI_POWER_VCORE_PIN, 1);
+ NMI_SET_GPIO_PULL_DISABLE(NMI_POWER_VCORE_PIN);
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VCORE_PIN, 0);
+
+ //Reset
+ NMI_SET_GPIO_MODE_ENABLE(NMI_RESET_PIN);
+ NMI_SET_GPIO_DIR(NMI_RESET_PIN, 1);
+ NMI_SET_GPIO_PULL_DISABLE(NMI_RESET_PIN);
+ NMI_SET_GPIO_LEVEL(NMI_RESET_PIN, 0);
+
+#ifndef NMI_HW_I2C
+ nmi_i2c_init();
+#endif
+ file->private_data = (void *)&nd;
+
+_fail_:
+
+ func_exit();
+ return ret;
+}
+
+static int nmi5625_release(struct inode * inode, struct file * file)
+{
+ int ret = 0;
+ //struct nmi_5625_dev *d = file->private_data;
+
+ /**
+ nothing to do
+ **/
+ func_enter();
+
+#ifndef NMI_HW_I2C
+ nmi_i2c_deinit();
+#endif
+ func_exit();
+ return ret;
+}
+
+static long nmi5625_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct nmi_5625_dev *d = file->private_data;
+ int ret = 0;
+
+ //func_enter();
+
+ switch ((cmd&0xffff0000)) {
+
+ case NMI_POWER_VDDIO_CTL:
+ dPrint(N_TRACE,"NM5625_PWR_2P8_CTL, power %s\n", (arg==1)?"on":"off");
+ if (arg == 1){ /* on */
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VDDIO_PIN, 1);
+ }
+ else{
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VDDIO_PIN, 0);
+ }
+ break;
+
+ case NMI_POWER_VCORE_CTL:
+ dPrint(N_TRACE,"NM5625_PWR_1P2_CTL, power %s\n", (arg==1)?"on":"off");
+ if (arg == 1){ /* on */
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VCORE_PIN, 1);
+ g_bIsAtvStart = 1;
+ }
+ else{
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VCORE_PIN, 0);
+ g_bIsAtvStart = 0;
+ }
+ break;
+
+ case NMI_FM_POWER_VCORE_CTL:
+ dPrint(N_TRACE,"NMI_FM_POWER_VCORE_CTL, power %s\n", (arg==1)?"on":"off");
+ if (arg == 1){ /* on */
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VCORE_PIN, 1);
+ //g_bIsAtvStart = 1;
+ }
+ else{
+ NMI_SET_GPIO_LEVEL(NMI_POWER_VCORE_PIN, 0);
+ //g_bIsAtvStart = 0;
+ }
+ break;
+ case NMI_RESET_CTL:
+ dPrint(N_TRACE,"NM5625_ATV_RESET_CTL, reset %s\n", (arg==1)?"high":"low");
+ if (arg == 1) {
+ NMI_SET_GPIO_LEVEL(NMI_RESET_PIN, 1);
+ }
+ else {
+ NMI_SET_GPIO_LEVEL(NMI_RESET_PIN, 0);
+ }
+ break;
+ case NMI_I2C_READ:
+ {
+ u8 *kbuf = &i2cBuf[0];
+ int size = cmd&0xffff; /* Note: I used the lower 16 bits for size */
+ int len = size;
+
+ dPrint(N_TRACE,"NM5625_ATV_I2C_READ\n");
+ mutex_lock(&d->mu);
+
+#ifdef NMI_HW_I2C
+
+ while(len) {
+ int sz;
+ if (len > NMI_I2C_RW_LENGTH)
+ sz = NMI_I2C_RW_LENGTH;
+ else
+ sz = len;
+ ret = i2c_master_recv(d->i2c_client_atv, kbuf, sz);
+ if (ret < 0) {
+ dPrint(N_ERR, "nmi: failed i2c read...(%d)\n", ret);
+ //kfree(kbuf);
+ mutex_unlock(&d->mu);
+ goto _fail_;
+ }
+ kbuf += NMI_I2C_RW_LENGTH;
+ len -= sz;
+ }
+
+#else
+ ret = nmi_i2c_read(0x60,kbuf,size);
+#endif
+ dPrint(N_TRACE,"kernel:nmi_i2c_read buf is (%p), size is (%d)\n",kbuf,size);
+
+ if (copy_to_user((void *)arg, i2cBuf, size) ) {
+ dPrint(N_ERR, "nmi: failed copy to user...\n");
+ ret = -EFAULT;
+ //kfree(kbuf);
+ mutex_unlock(&d->mu);
+ goto _fail_;
+ }
+ //kfree(kbuf);
+ mutex_unlock(&d->mu);
+ }
+ break;
+ case NMI_I2C_WRITE:
+ {
+ u8 *kbuf = &i2cBuf[0];
+ int size = cmd&0xffff; /* Note: I used the lower 16 bits for size */
+ int len = size;
+ dPrint(N_TRACE,"NM5625_ATV_I2C_WRITE\n");
+ if (copy_from_user((void *)kbuf, (void *)arg, size)) {
+ dPrint(N_ERR, "nmi: failed copy from user...\n");
+ ret = -EFAULT;
+ goto _fail_;
+ }
+ mutex_lock(&d->mu);
+
+#ifdef NMI_HW_I2C
+
+ while (len) {
+ int sz;
+ if (len > NMI_I2C_RW_LENGTH)
+ sz = NMI_I2C_RW_LENGTH;
+ else
+ sz = len;
+
+ ret = i2c_master_send(d->i2c_client_atv, kbuf, sz);
+
+ if (ret < 0) {
+ dPrint(N_ERR, "nmi: failed i2c write...(%d)\n", ret);
+ //kfree(kbuf);
+ mutex_unlock(&d->mu);
+ goto _fail_;
+ }
+ kbuf += NMI_I2C_RW_LENGTH;
+ len -= sz;
+ }
+
+#else
+ ret = nmi_i2c_write(0x60,kbuf,size);
+#endif
+ dPrint(N_TRACE,"kernel:nmi_i2c_write buf is (%p), size is (%d)\n",kbuf,size);
+
+ mutex_unlock(&d->mu);
+ }
+ break;
+ default:
+ break;
+ }
+
+_fail_:
+ //func_exit();
+ dPrint(N_TRACE, "nmi_ioctl return value...(%d)\n", ret);
+ return ret;
+}
+
+static const struct file_operations nmi5625_fops = {
+ .owner = THIS_MODULE,
+ .unlocked_ioctl = nmi5625_ioctl,
+ .open = nmi5625_open,
+ .release = nmi5625_release,
+};
+
+/**************************************************************
+
+i2c:
+
+ **************************************************************/
+
+static int nmi5625_remove(struct i2c_client *client)
+{
+ return 0;
+}
+
+static int nmi5625_detect(struct i2c_client *client, int kind, struct i2c_board_info *info)
+{
+ strcpy(info->type, "nmiatv");
+ return 0;
+}
+
+static int nmi5625_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+ int ret = 0;
+ struct device *dev;
+ func_enter();
+
+ if (!already_init) {
+ memset(&nd, 0, sizeof(struct nmi_5625_dev));
+
+ /**
+ initialize mutex
+ **/
+ mutex_init(&nd.mu);
+
+ /**
+ register our driver
+ **/
+ if ((ret = alloc_chrdev_region (&nd.devn, 0, 1, "nmi")) < 0) {
+ dPrint(N_ERR, "nmi: failed unable to get major...%d\n", ret);
+ goto _fail_;
+ }
+ dPrint(N_INFO, "nmi:dynamic major(%d),minor(%d)\n", MAJOR(nd.devn), MINOR(nd.devn));
+
+ cdev_init(&nd.cdv, &nmi5625_fops);
+ nd.cdv.owner = THIS_MODULE;
+ ret = cdev_add(&nd.cdv, nd.devn, 1);
+ if (ret) {
+ dPrint(N_ERR, "nmi: failed to add device...%d\n", ret);
+ goto _fail_;
+ }
+
+
+ nd.tv_class = class_create(THIS_MODULE, "atv");
+ if (IS_ERR(nd.tv_class)) {
+ dPrint(N_ERR, "nmi: failed to create the atv class\n");
+ }
+
+ dev = device_create(nd.tv_class, NULL, nd.devn, NULL, "nmi");
+ if (IS_ERR(dev)) {
+ dPrint(N_ERR, "nmi: failed to create device\n");
+ }
+ /*User interface end */
+
+ already_init = 1;
+ }
+
+ nd.i2c_client_atv = client;
+
+_fail_:
+
+ func_exit();
+ return ret;
+}
+
+static const struct i2c_device_id nmi5625_id[] = {
+ {"nmiatv", 0},
+ {},
+};
+
+//static unsigned short force[] = {2, 0xc0, I2C_CLIENT_END, I2C_CLIENT_END};
+//static const unsigned short * const forces[] = { force, NULL };
+//static struct i2c_client_address_data addr_data = { .forces = forces,};
+
+static struct i2c_driver nmi5625_i2c_driver = {
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "nmiatv",
+ },
+ .probe = nmi5625_probe,
+ .detect = nmi5625_detect,
+ .remove = nmi5625_remove,
+ .id_table = nmi5625_id,
+ // .address_data =&addr_data,
+};
+
+static struct i2c_board_info nmi5625_i2c_dev = {
+ I2C_BOARD_INFO("nmiatv", 0x60),
+};
+
+/**************************************************************
+
+Module:
+
+ **************************************************************/
+
+static int parse_nmi_param(void)
+{
+ char env[] = "wmt.nmi.param";
+ char buf[64];
+ size_t l = sizeof(buf);
+ int nr = -EINVAL;
+
+ if (wmt_getsyspara(env, buf, &l) == 0) {
+ sscanf(buf, "i2c-%d", &nr);
+ pr_info("nmi5625 i2c adapter %d\n", nr);
+ }
+
+ return nr;
+}
+
+static __init int nmi5625_init(void)
+{
+ int ret;
+ struct i2c_adapter *adapter;
+ struct i2c_client *client;
+ int nr;
+ func_enter();
+
+ nr = parse_nmi_param();
+ if (nr < 0)
+ return nr;
+
+ adapter = i2c_get_adapter(nr);
+ client = i2c_new_device(adapter, &nmi5625_i2c_dev);
+ i2c_put_adapter(adapter);
+ if (!client) {
+ printk("nmi i2c_new_device failed\n");
+ return -EINVAL;
+ }
+
+ ret = i2c_add_driver(&nmi5625_i2c_driver);
+ if (ret < 0) {
+ dPrint(N_ERR, "nmi: failed register i2c driver...(%d)\n", ret);
+ }
+
+ func_exit();
+
+ return ret;
+}
+
+static __exit void nmi5625_clean(void)
+{
+ func_enter();
+
+ i2c_del_driver(&nmi5625_i2c_driver);
+
+ if (already_init) {
+ device_destroy(nd.tv_class, nd.devn);
+ class_destroy(nd.tv_class);
+ cdev_del(&nd.cdv);
+ unregister_chrdev_region(nd.devn, 1);
+ already_init = 0;
+ i2c_unregister_device(nd.i2c_client_atv);
+ nd.i2c_client_atv = NULL;
+ }
+
+ func_exit();
+}
+
+module_init(nmi5625_init);
+module_exit(nmi5625_clean);
+
+MODULE_AUTHOR("nmi");
+MODULE_DESCRIPTION("nmi TV 5625 driver");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.h b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.h
new file mode 100755
index 00000000..1b9f116a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nmi5625/nmidrv_kernel.h
@@ -0,0 +1,42 @@
+#ifndef _NMIDRV_KERNEL_H_
+#define _NMIDRV_KERNEL_H_
+
+/**************************************************************
+ IO Control Command defination:
+**************************************************************/
+#define NMI_POWER_VDDIO_CTL 0x10000000
+#define NMI_POWER_VCORE_CTL 0x20000000
+#define NMI_RESET_CTL 0x30000000
+#define NMI_I2C_READ 0x40000000
+#define NMI_I2C_WRITE 0x50000000
+#define NMI_FM_POWER_VCORE_CTL 0x60000000
+
+/**************************************************************
+ Debug Trace Defination:
+**************************************************************/
+
+#define DEBUG
+
+#define N_INIT 0x00000001
+#define N_ERR 0x00000002
+#define N_FUNC 0x00000004
+#define N_TRACE 0x00000008
+#define N_INFO 0x00000010
+
+static unsigned int dflag = N_INIT|N_ERR|N_FUNC|N_INFO;
+
+#ifdef DEBUG
+#define dPrint(f, str...) if (dflag & f) printk (str)
+#else
+#define dPrint(f, str...) /* nothing */
+#endif
+
+#define func_enter() dPrint (N_TRACE, "nmi: %s...enter\n", __func__)
+#define func_exit() dPrint(N_TRACE, "nmi: %s...exit\n", __func__)
+
+
+#ifdef NMI_HW_I2C
+#define NMI_I2C_RW_LENGTH 256
+#endif
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c
new file mode 100755
index 00000000..cfd725ec
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.c
@@ -0,0 +1,448 @@
+/*
+ * Driver for nt99141 CMOS Image Sensor from Novatek
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "nt99141.h"
+
+//#define sensor_write_array(sd, arr, sz) cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16addr(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val)
+
+static int sensor_fps;
+static int sensor_set_fps(struct cmos_subdev *sd, int fps);
+static struct timer_list day_night_timer;
+static struct cmos_subdev *day_night_sd;
+static struct work_struct day_night_work;
+
+static void sensor_write_array(struct cmos_subdev *sd, uint32_t *arr, size_t sz)
+{
+ uint32_t reg, data;
+ int i;
+
+ for (i = 0; i < sz; i += 2) {
+ reg = arr[i];
+ data = arr[i+1];
+
+ if (reg == 0xffff)
+ msleep(data);
+ else
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg ,data);
+ }
+}
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, nt99141_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, nt99141_640_480_regs),
+ CMOS_WIN_SIZE("720p", 1280, 720, nt99141_1280_720_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = nt99141_wb_auto;
+ size = ARRAY_SIZE(nt99141_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = nt99141_wb_incandescent;
+ size = ARRAY_SIZE(nt99141_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = nt99141_wb_daylight;
+ size = ARRAY_SIZE(nt99141_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = nt99141_wb_cloudy;
+ size = ARRAY_SIZE(nt99141_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = nt99141_wb_fluorescent;
+ size = ARRAY_SIZE(nt99141_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ msleep(100);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = nt99141_scene_mode_auto;
+ size = ARRAY_SIZE(nt99141_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = nt99141_scene_mode_night;
+ size = ARRAY_SIZE(nt99141_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = nt99141_exposure_neg6;
+ size = ARRAY_SIZE(nt99141_exposure_neg6);
+ break;
+ case -1:
+ regs = nt99141_exposure_neg3;
+ size = ARRAY_SIZE(nt99141_exposure_neg3);
+ break;
+ case 0:
+ regs = nt99141_exposure_zero;
+ size = ARRAY_SIZE(nt99141_exposure_zero);
+ break;
+ case 1:
+ regs = nt99141_exposure_pos3;
+ size = ARRAY_SIZE(nt99141_exposure_pos3);
+ break;
+ case 2:
+ regs = nt99141_exposure_pos6;
+ size = ARRAY_SIZE(nt99141_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3022);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3022, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3022);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3022, data);
+}
+
+
+static int sensor_s_DayNightMode(struct cmos_subdev *sd)
+{
+ uint32_t Data_EV = 0 ;
+
+ Data_EV = sensor_read(sd, 0x32d6);
+
+ if(Data_EV > 0x9A)
+ {
+ sensor_write(sd, 0x302a, 0x08);
+ }
+ else
+ {
+ sensor_write(sd, 0x302a, 0x04);
+ }
+
+ return 0;
+
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_FLASH:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ sensor_set_fps(sd,sensor_fps);
+ msleep(200);
+
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_set_fps(struct cmos_subdev *sd, int fps)
+{
+ switch(fps){
+ case 5:
+ sensor_write_array(sd, nt99141_5fps_regs,
+ ARRAY_SIZE(nt99141_5fps_regs));
+ break;
+ case 10:
+ sensor_write_array(sd, nt99141_10fps_regs,
+ ARRAY_SIZE(nt99141_10fps_regs));
+ break;
+ case 15:
+ sensor_write_array(sd, nt99141_15fps_regs,
+ ARRAY_SIZE(nt99141_15fps_regs));
+ break;
+ case 20:
+ sensor_write_array(sd, nt99141_20fps_regs,
+ ARRAY_SIZE(nt99141_20fps_regs));
+ case 25:
+ sensor_write_array(sd, nt99141_25fps_regs,
+ ARRAY_SIZE(nt99141_25fps_regs));
+ case 30:
+ sensor_write_array(sd, nt99141_30fps_regs,
+ ARRAY_SIZE(nt99141_30fps_regs));
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+static int sensor_g_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms)
+{
+ return 0;
+}
+
+static int sensor_s_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms)
+{
+ struct v4l2_captureparm *cp = &parms->parm.capture;
+ struct v4l2_fract *tpf = &cp->timeperframe;
+
+ if (tpf->numerator == 0 || tpf->denominator == 0) {
+ return 0;
+ }
+
+ sensor_fps = tpf->denominator;//cause tpf->numerator == 1 in HAL
+
+
+ return 0;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0x3000) & 0xff) << 8;
+ data |= (sensor_read(sd, 0x3001) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static void day_night_do_work(struct work_struct *work)
+{
+ sensor_s_DayNightMode(day_night_sd);
+}
+
+static void day_night_timer_func(unsigned long __data)
+{
+ schedule_work(&day_night_work);
+ mod_timer(&day_night_timer, jiffies + msecs_to_jiffies(3000));
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd))
+ return -1;
+
+ sensor_write_array(sd, nt99141_default_regs_init,
+ ARRAY_SIZE(nt99141_default_regs_init));
+
+ day_night_sd = sd;
+ INIT_WORK(&day_night_work, day_night_do_work);
+ setup_timer(&day_night_timer, day_night_timer_func, (unsigned long)sd);
+ mod_timer(&day_night_timer, jiffies + msecs_to_jiffies(3000));
+
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, nt99141_default_regs_exit,
+ ARRAY_SIZE(nt99141_default_regs_exit));
+ cancel_work_sync(&day_night_work);
+ del_timer_sync(&day_night_timer);
+
+ return 0;
+}
+
+static struct cmos_subdev_ops nt99141_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+ .g_parm = sensor_g_parm,
+ .s_parm = sensor_s_parm,
+
+};
+
+struct cmos_subdev nt99141 = {
+ .name = "nt99141",
+ .i2c_addr = 0x2a,
+ .id = 0x1410,
+ .max_width = 1280,
+ .max_height = 720,
+ .ops = &nt99141_ops,
+};
+
+#if 0
+static int __init nt99141_init(void)
+{
+ return cmos_register_sudbdev(&nt99141);
+}
+
+static void __exit nt99141_exit(void)
+{
+ cmos_unregister_subdev(&nt99141);
+ return;
+}
+
+module_init(nt99141_init);
+module_exit(nt99141_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h
new file mode 100755
index 00000000..be3b87c0
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/nt99141/nt99141.h
@@ -0,0 +1,537 @@
+#ifndef NT99141_H
+#define NT99141_H
+
+// Scene Mode
+uint32_t nt99141_scene_mode_auto[] = {
+ 0x32C4,0x28,
+ 0x302a,0x04,
+};
+
+uint32_t nt99141_scene_mode_night[] = {
+ 0x32C4,0x30,
+ 0x302a,0x08,
+};
+
+
+// White Balance
+uint32_t nt99141_wb_auto [] = {
+ 0x3201, 0x7F,
+};
+
+uint32_t nt99141_wb_incandescent [] = {
+ 0x3201, 0x6F,
+ 0x3290, 0x01, // 304 / 256 = 1.187
+ 0x3291, 0x30,
+ 0x3296, 0x01, // 459 / 256 = 1.793
+ 0x3297, 0xCB,
+ 0x3060, 0x01,
+};
+
+uint32_t nt99141_wb_fluorescent [] = {
+ 0x3201, 0x6F,
+ 0x3290, 0x01, // 368 / 256 = 1.437
+ 0x3291, 0x70,
+ 0x3296, 0x01, // 511 / 256 = 1.996
+ 0x3297, 0xFF,
+ 0x3060, 0x01,
+};
+
+uint32_t nt99141_wb_daylight [] = {
+ 0x3201, 0x6F,
+ 0x3290, 0x01, // 312 / 256 = 1.218
+ 0x3291, 0x38,
+ 0x3296, 0x01, // 360 / 256 = 1.406
+ 0x3297, 0x68,
+ 0x3060, 0x01,
+};
+
+uint32_t nt99141_wb_cloudy [] = {
+ 0x3201, 0x6F,
+ 0x3290, 0x01, // 337 / 256 = 1.316
+ 0x3291, 0x51,
+ 0x3296, 0x01, // 256 / 256 = 1.0
+ 0x3297, 0x00,
+ 0x3060, 0x01,
+};
+
+uint32_t nt99141_wb_tungsten [] = {
+ 0x3201, 0x6F,
+ 0x3290, 0x01, // 256 / 256 = 1.0
+ 0x3291, 0x00,
+ 0x3296, 0x02, // 560 / 256 = 2.1875
+ 0x3297, 0x30,
+ 0x3060, 0x01,
+};
+
+
+// Exposure
+uint32_t nt99141_exposure_neg6[] = {
+ 0x32F2, 0x40,
+};
+
+uint32_t nt99141_exposure_neg3[] = {
+ 0x32F2, 0x60,
+};
+
+uint32_t nt99141_exposure_zero[] = {
+ 0x32F2, 0x80,
+};
+
+uint32_t nt99141_exposure_pos3[] = {
+ 0x32F2, 0xA0,
+};
+
+uint32_t nt99141_exposure_pos6[] = {
+ 0x32F2, 0xC0,
+};
+
+// Resolution
+uint32_t nt99141_320_240_regs[] = {
+ //[YUYV_320x240_PCLK_74MHZ_15.00_30.03_Fps]
+ 0x32BF, 0x60,
+ 0x32C0, 0x6A,
+ 0x32C1, 0x6A,
+ 0x32C2, 0x6A,
+ 0x32C3, 0x00,
+ 0x32C4, 0x2F,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x6A,
+ 0x32CA, 0x8A,
+ 0x32CB, 0x8A,
+ 0x32CC, 0x8A,
+ 0x32CD, 0x8A,
+ 0x32DB, 0x7B,
+ 0x32E0, 0x01,
+ 0x32E1, 0x40,
+ 0x32E2, 0x00,
+ 0x32E3, 0xF0,
+ 0x32E4, 0x02,
+ 0x32E5, 0x02,
+ 0x32E6, 0x02,
+ 0x32E7, 0x03,
+ 0x3200, 0x3E,
+ 0x3201, 0x0F,
+ 0x3028, 0x24,
+ 0x3029, 0x20,
+ 0x302A, 0x04,
+ 0x3022, 0x24,
+ 0x3023, 0x24,
+ 0x3002, 0x00,
+ 0x3003, 0xA4,
+ 0x3004, 0x00,
+ 0x3005, 0x04,
+ 0x3006, 0x04,
+ 0x3007, 0x63,
+ 0x3008, 0x02,
+ 0x3009, 0xD3,
+ 0x300A, 0x06,
+ 0x300B, 0x8A,
+ 0x300C, 0x02,
+ 0x300D, 0xE0,
+ 0x300E, 0x03,
+ 0x300F, 0xC0,
+ 0x3010, 0x02,
+ 0x3011, 0xD0,
+ 0x32B8, 0x43,
+ 0x32B9, 0x35,
+ 0x32BB, 0x87,
+ 0x32BC, 0x3C,
+ 0x32BD, 0x40,
+ 0x32BE, 0x38,
+ 0x320A, 0xB2,
+ 0x3201, 0x7F,
+ 0x3021, 0x06,
+ 0x3060, 0x01,
+
+};
+
+uint32_t nt99141_640_480_regs[] = {
+ //[YUYV_640x480__PCLK_74MHZ_15.00_30.03_Fps]
+ 0x32BF, 0x60,
+ 0x32C0, 0x6A,
+ 0x32C1, 0x6A,
+ 0x32C2, 0x6A,
+ 0x32C3, 0x00,
+ 0x32C4, 0x2F,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x6A,
+ 0x32CA, 0x8A,
+ 0x32CB, 0x8A,
+ 0x32CC, 0x8A,
+ 0x32CD, 0x8A,
+ 0x32DB, 0x7B,
+ 0x32E0, 0x02,
+ 0x32E1, 0x80,
+ 0x32E2, 0x01,
+ 0x32E3, 0xE0,
+ 0x32E4, 0x00,
+ 0x32E5, 0x80,
+ 0x32E6, 0x00,
+ 0x32E7, 0x80,
+ 0x3200, 0x3E,
+ 0x3201, 0x0F,
+ 0x3028, 0x24,
+ 0x3029, 0x20,
+ 0x302A, 0x04,
+ 0x3022, 0x24,
+ 0x3023, 0x24,
+ 0x3002, 0x00,
+ 0x3003, 0xA4,
+ 0x3004, 0x00,
+ 0x3005, 0x04,
+ 0x3006, 0x04,
+ 0x3007, 0x63,
+ 0x3008, 0x02,
+ 0x3009, 0xD3,
+ 0x300A, 0x06,
+ 0x300B, 0x8A,
+ 0x300C, 0x02,
+ 0x300D, 0xE0,
+ 0x300E, 0x03,
+ 0x300F, 0xC0,
+ 0x3010, 0x02,
+ 0x3011, 0xD0,
+ 0x32B8, 0x3F,
+ 0x32B9, 0x31,
+ 0x32BB, 0x87,
+ 0x32BC, 0x38,
+ 0x32BD, 0x3C,
+ 0x32BE, 0x34,
+ 0x3201, 0x7F,
+ 0x320A, 0xB2,
+ 0x3021, 0x06,
+ 0x3060, 0x01,
+ 0x320A, 0xB2,
+};
+
+uint32_t nt99141_1280_720_regs[] = {
+ //[YUYV_1280x720_PCLK_74mhz_15.00_30.03_Fps]
+
+ 0x32BF, 0x60,
+ 0x32C0, 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0x32CA, 0xA4,
+ 0x32CB, 0xA4,
+ 0x32CC, 0xA4,
+ 0x32CD, 0xA4,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+uint32_t nt99141_10fps_regs[] = {
+ 0x32BF, 0x60,
+ 0x32C0, 0x74,
+ 0x32C1, 0x74,
+ 0x32C2, 0x74,
+ 0x32C3, 0x00,
+ //0x32C4, 0x20,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x74,
+ 0x32CA, 0x94,
+ 0x32CB, 0x94,
+ 0x32CC, 0x94,
+ 0x32CD, 0x94,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+uint32_t nt99141_15fps_regs[] = {
+ 0x32BF, 0x60,
+ 0x32C0, 0x6A,
+ 0x32C1, 0x6A,
+ 0x32C2, 0x6A,
+ 0x32C3, 0x00,
+ //0x32C4, 0x20,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x6A,
+ 0x32CA, 0x8A,
+ 0x32CB, 0x8A,
+ 0x32CC, 0x8A,
+ 0x32CD, 0x8A,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+
+uint32_t nt99141_20fps_regs[] = {
+ 0x32BF, 0x60,
+ 0x32C0, 0x64,
+ 0x32C1, 0x64,
+ 0x32C2, 0x64,
+ 0x32C3, 0x00,
+ //0x32C4, 0x20,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x64,
+ 0x32CA, 0x84,
+ 0x32CB, 0x84,
+ 0x32CC, 0x84,
+ 0x32CD, 0x84,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+
+uint32_t nt99141_25fps_regs[] = {
+ 0x32BF, 0x60,
+ 0x32C0, 0x60,
+ 0x32C1, 0x60,
+ 0x32C2, 0x60,
+ 0x32C3, 0x00,
+ //0x32C4, 0x20,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x60,
+ 0x32CA, 0x80,
+ 0x32CB, 0x80,
+ 0x32CC, 0x80,
+ 0x32CD, 0x80,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+
+uint32_t nt99141_30fps_regs[] = {
+ 0x32BF, 0x60,
+ 0x32C0, 0x5A,
+ 0x32C1, 0x5A,
+ 0x32C2, 0x5A,
+ 0x32C3, 0x00,
+ //0x32C4, 0x20,
+ 0x32C5, 0x20,
+ 0x32C6, 0x20,
+ 0x32C7, 0x00,
+ 0x32C8, 0xDD,
+ 0x32C9, 0x5A,
+ 0x32CA, 0x7A,
+ 0x32CB, 0x7A,
+ 0x32CC, 0x7A,
+ 0x32CD, 0x7A,
+ 0x32DB, 0x7B,
+ 0x32D0, 0x01,
+};
+
+// init
+uint32_t nt99141_default_regs_init[]= {
+ 0x3109,0x04,
+ 0x3040,0x04,
+ 0x3041,0x02,
+ 0x3042,0xFF,
+ 0x3043,0x08,
+ 0x3052,0xE0,
+ 0x305F,0x33,
+ 0x3100,0x07,
+ 0x3106,0x03,
+ 0x3105,0x01,
+ 0x3108,0x05,
+ 0x3110,0x22,
+ 0x3111,0x57,
+ 0x3112,0x22,
+ 0x3113,0x55,
+ 0x3114,0x05,
+ 0x3135,0x00,
+ 0x32F0,0x01,
+ 0x3210,0x05,
+ 0x3211,0x05,
+ 0x3212,0x05,
+ 0x3213,0x05,
+ 0x3214,0x05,
+ 0x3215,0x05,
+ 0x3216,0x05,
+ 0x3217,0x05,
+ 0x3218,0x05,
+ 0x3219,0x05,
+ 0x321A,0x05,
+ 0x321B,0x05,
+ 0x321C,0x05,
+ 0x321D,0x05,
+ 0x321E,0x05,
+ 0x321F,0x05,
+ 0x3231,0xFF,
+ 0x3290,0x01,
+ 0x3291,0x80,
+ 0x3296,0x01,
+ 0x3297,0x73,
+ 0x3250,0x80,
+ 0x3251,0x03,
+ 0x3252,0xFF,
+ 0x3253,0x00,
+ 0x3254,0x03,
+ 0x3255,0xFF,
+ 0x3256,0x00,
+ 0x3257,0x50,
+ 0x3270,0x00,
+ 0x3271,0x14,
+ 0x3272,0x22,
+ 0x3273,0x36,
+ 0x3274,0x4A,
+ 0x3275,0x5A,
+ 0x3276,0x73,
+ 0x3277,0x88,
+ 0x3278,0x98,
+ 0x3279,0xA7,
+ 0x327A,0xC0,
+ 0x327B,0xD4,
+ 0x327C,0xE6,
+ 0x327D,0xF5,
+ 0x327E,0xFF,
+ 0x3302,0x00,
+ 0x3303,0x40,
+ 0x3304,0x00,
+ 0x3305,0x96,
+ 0x3306,0x00,
+ 0x3307,0x29,
+ 0x3308,0x07,
+ 0x3309,0xBA,
+ 0x330A,0x06,
+ 0x330B,0xF5,
+ 0x330C,0x01,
+ 0x330D,0x51,
+ 0x330E,0x01,
+ 0x330F,0x30,
+ 0x3310,0x07,
+ 0x3311,0x16,
+ 0x3312,0x07,
+ 0x3313,0xBA,
+ 0x3326,0x02,
+ 0x32F6,0x0F,
+ 0x32F9,0x42,
+ 0x32FA,0x24,
+ 0x3325,0x4A,
+ 0x3330,0x00,
+ 0x3331,0x0A,
+ 0x3332,0xFF,
+ 0x3338,0x30,
+ 0x3339,0x84,
+ 0x333A,0x00,
+ 0x333F,0x07,
+ 0x3360,0x10,
+ 0x3361,0x18,
+ 0x3362,0x1f,
+ 0x3363,0x37,
+ 0x3364,0x80,
+ 0x3365,0x76,
+ 0x3366,0x70,
+ 0x3367,0x68,
+ 0x3368,0x30,
+ 0x3369,0x28,
+ 0x336A,0x20,
+ 0x336B,0x10,
+ 0x336C,0x00,
+ 0x336D,0x20,
+ 0x336E,0x1C,
+ 0x336F,0x18,
+ 0x3370,0x0E,
+ 0x3371,0x38,
+ 0x3372,0x3C,
+ 0x3373,0x3F,
+ 0x3374,0x3F,
+ 0x338A,0x34,
+ 0x338B,0x7F,
+ 0x338C,0x10,
+ 0x338D,0x23,
+ 0x338E,0x7F,
+ 0x338F,0x14,
+ 0x3375,0x10,
+ 0x3376,0x12,
+ 0x3377,0x14,
+ 0x3378,0x16,
+
+ 0x3012,0x02,
+ 0x3013,0xD0,
+ 0x3024,0x0a,
+ 0x3069,0x01,
+ 0x306A,0x03,
+};
+
+uint32_t nt99141_default_regs_exit[]={
+
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov2640/ov2640.h b/drivers/media/video/wmt_v4l2/sensors/ov2640/ov2640.h
new file mode 100755
index 00000000..534302c3
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov2640/ov2640.h
@@ -0,0 +1,66 @@
+#ifndef OV2640_H
+#define OV2640_H
+
+unsigned char ov2640_800_600_cfg_0[]={
+0xFF,0x1 ,0x12,0x80,0xFF,0x0 ,0x2C,0xFF,0x2E,0xDF,0xFF,0x1 ,0x12,0x80,0x3C,0x35,
+0x11,0xFF,0x4 ,0x28,0x13,0xE5,0x14,0x48,0x2C,0x0C,0x33,0x78,0x3B,0xF7,0x3E,0x0 ,
+0x43,0x11,0x16,0x10,0x39,0x82,0x35,0x88,0x22,0x0A,0x37,0x40,0x23,0x0 ,0x34,0xA0,
+0x36,0x1A,0x6 ,0x2 ,0x7 ,0xC0,0x0D,0xB7,0x0E,0x1 ,0x4C,0x0 ,0x4A,0x81,0x21,0x99,
+0x9 ,0x2 ,0x24,0x3E,0x25,0x34,0x26,0x81,0x5C,0x0 ,0x63,0x0 ,0x7C,0x0 ,0x61,0x70,
+0x62,0x80,0x20,0x80,0x28,0x30,0x6C,0x0 ,0x6E,0x0 ,0x70,0x2 ,0x71,0x94,0x73,0xC1,
+0x3D,0x34,0x5A,0x57,0x4F,0xBB,0x50,0x9C,0x6D,0x80,0x39,0x2 ,0x3A,0x33,0x3B,0xFB,
+0x3C,0x32,0xFF,0x0 ,0xE0,0x14,0x76,0xFF,0x33,0xA0,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,0x6D,0x80,0xFF,0x0 ,0xC0,0xC8,0xC1,0x96,0x8C,0x0 ,
+0x86,0x3D,0x50,0x89,0x51,0x90,0x52,0x2C,0x53,0x0 ,0x54,0x0 ,0x55,0x88,0x57,0x0 ,
+0x5A,0xC8,0x5B,0x96,0x5C,0x0 ,0xD3,0x4 ,0xE0,0x0 ,0xDD,0xFF,0xFF,0x1 ,0x0C,0x38,
+0xFF,0x0 ,0xDD,0xF1,0xE0,0x4 ,0xFF,0x1 ,0x12,0x0 ,0x11,0x1 ,0x17,0x11,0x18,0x75,
+0x19,0x1 ,0x1A,0x97,0x32,0x36,0x4F,0xBB,0x5A,0x57,0x50,0x9C,0x6D,0x80,0xFF,0x0 ,
+0xC0,0xC8,0xC1,0x96,0x8C,0x0 ,0x86,0x3D,0x50,0x89,0x51,0x90,0x52,0x2C,0x53,0x0 ,
+0x54,0x0 ,0x55,0x88,0x57,0x0 ,0x5A,0xC8,0x5B,0x96,0x5C,0x0 ,0xD3,0x4 ,0xE0,0x0 ,
+0xDD,0xFF,0xd3,0x2,0xFF,0x1 ,0x0C,0x38,0X11,0X0
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.c b/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.c
new file mode 100755
index 00000000..53731fae
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.c
@@ -0,0 +1,329 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov2643.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, ov2643_640_480_regs),
+ CMOS_WIN_SIZE("720p", 1280, 720, ov2643_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, ov2643_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov2643_wb_auto;
+ size = ARRAY_SIZE(ov2643_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov2643_wb_incandescent;
+ size = ARRAY_SIZE(ov2643_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov2643_wb_daylight;
+ size = ARRAY_SIZE(ov2643_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov2643_wb_cloudy;
+ size = ARRAY_SIZE(ov2643_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov2643_wb_fluorescent;
+ size = ARRAY_SIZE(ov2643_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = ov2643_scene_mode_auto;
+ size = ARRAY_SIZE(ov2643_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = ov2643_scene_mode_night;
+ size = ARRAY_SIZE(ov2643_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = ov2643_exposure_neg6;
+ size = ARRAY_SIZE(ov2643_exposure_neg6);
+ break;
+ case -1:
+ regs = ov2643_exposure_neg3;
+ size = ARRAY_SIZE(ov2643_exposure_neg3);
+ break;
+ case 0:
+ regs = ov2643_exposure_zero;
+ size = ARRAY_SIZE(ov2643_exposure_zero);
+ break;
+ case 1:
+ regs = ov2643_exposure_pos3;
+ size = ARRAY_SIZE(ov2643_exposure_pos3);
+ break;
+ case 2:
+ regs = ov2643_exposure_pos6;
+ size = ARRAY_SIZE(ov2643_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x12);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x12, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x12);
+
+ switch (value) {
+ case 0:
+ data &= ~0x10;
+ break;
+ case 1:
+ data |= 0x10;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x12, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ msleep(300);
+
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ data = sensor_read(sd, 0xa);
+ data <<=8;
+ data += sensor_read(sd ,0xb);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, ov2643_default_regs_init,
+ ARRAY_SIZE(ov2643_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops ov2643_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev ov2643 = {
+ .name = "ov2643",
+ .i2c_addr = 0x30,
+ .id = 0x2643,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &ov2643_ops,
+};
+
+#if 0
+static int __init ov2643_init(void)
+{
+ return cmos_register_sudbdev(&ov2643);
+}
+
+static void __exit ov2643_exit(void)
+{
+ return cmos_unregister_subdev(&ov2643);
+}
+
+module_init(ov2643_init);
+module_exit(ov2643_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.h b/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.h
new file mode 100755
index 00000000..b041bf32
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov2643/ov2643.h
@@ -0,0 +1,380 @@
+#ifndef OV2643_H
+#define OV2643_H
+
+// Scene Mode
+uint8_t ov2643_scene_mode_auto[] = {
+ 0x03,0x10,
+ 0x41,0x00,
+ 0x03,0x20,
+ 0xb2,0x80,
+ 0xff,0xff,
+};
+
+uint8_t ov2643_scene_mode_night[] = {
+ 0x03,0x10,
+ 0x41,0x15,
+ 0x03,0x20,
+ 0xb2,0xf0,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t ov2643_wb_auto [] = {
+
+};
+
+uint8_t ov2643_wb_incandescent [] = {
+
+};
+
+uint8_t ov2643_wb_fluorescent [] = {
+
+};
+
+uint8_t ov2643_wb_daylight [] = {
+
+};
+
+uint8_t ov2643_wb_cloudy [] = {
+
+};
+
+
+// Exposure
+uint8_t ov2643_exposure_neg6[] = {
+
+};
+
+uint8_t ov2643_exposure_neg3[] = {
+
+};
+
+uint8_t ov2643_exposure_zero[] = {
+
+};
+
+uint8_t ov2643_exposure_pos3[] = {
+
+};
+
+uint8_t ov2643_exposure_pos6[] = {
+
+};
+
+
+// Resolution
+uint8_t ov2643_1600_1200_regs[]={
+ //;pclk=72mhz,30fps/pclk=36mhz,15fps
+ //0x12,0x80,
+ 0xc3,0x1f,
+ 0xc4,0xff,
+ 0x3d,0x48,
+ 0xdd,0xa5,
+ //;windows setup
+ 0x20,0x01,
+ 0x21,0x25,
+ 0x22,0x00,
+ 0x23,0x0c,
+ 0x24,0x64,//;0x640=1600
+ 0x25,0x08,
+ 0x26,0x4b,//;0x4b0=1200
+ 0x27,0x06,
+ 0x28,0x42,
+ //;format setting
+ 0x12,0x08,//+MIRROR*0x20+FLIP*0x10,//mirror and flip
+ 0x39,0x10,
+ 0xcd,0x12,
+ 0x3d,0x08,
+ //;frame setting
+ 0x0e,0x10,//clock 48Mhz PCLK
+ 0x0f,0x14,
+ 0x10,0x0a,
+ 0x11,0x00,
+
+ 0x29,0x07,//;dummy pixels
+ 0x2a,0x9a,
+ 0x2b,0x04,//;dummy lines//0x04
+ 0x2c,0xd4,// //0xd4
+ //for 12.5fps 0x4d4*1.2=0x5cb
+ 0x2d,0x00,
+ 0x2e,0x00,
+
+ 0x1c,0x25,//vsync width
+ 0x1d,0x06,//;banding
+ 0x1e,0x00,
+ 0x1f,0xb9,//0xba,//0x5d,
+
+ 0xde,0xc4,//added 2011-9-2 9:21:54
+ //0x75,0x6a,//advanced AWB for 2M
+};
+
+uint8_t ov2643_1280_720_regs[]={
+ //;pclk=72mhz,30fps/pclk=36mhz,15fps
+ //0x12,0x80,
+ 0xc3,0x1f,
+ 0xc4,0xff,
+ 0x3d,0x48,
+ 0xdd,0xa5,
+ //;windows setup
+ 0x20,0x01,//0x01,//
+ 0x21,0x25,//0x60,//
+ 0x22,0x00,
+ 0x23,0x0c,
+ 0x24,0x50,//;0x500=1280
+ 0x25,0x04,
+ 0x26,0x2d,//;0x2d0=720
+ 0x27,0x04,
+ 0x28,0x42,
+
+ //format
+ 0x12,0x48,//+MIRROR*0x20+FLIP*0x10,//mirror and flip
+ 0x39,0x10,
+ 0xcd,0x12,
+
+ //;frame setting
+ 0x0e,0x10,//0x10,//0xb4,//clock 48Mhz PCLK
+ 0x0f,0x14,
+ 0x10,0x0a,
+ 0x11,0x00,
+
+ 0x29,0x06,//;dummy pixels //24.75M 0x29,0x06//24M 0x29,0x06,//
+ 0x2a,0x40, //24.75M 0x2a,0x72//24M 0x2a,0x40,//
+ 0x2b,0x02,//;dummy lines //24.75M 0x2b,0x02//24M 0x2b,0x02,//
+ 0x2c,0xee, //24.75M 0x2c,0xee//24M 0x2c,0xee,//
+ //for 25fps 0x2ee*1.2=0x384
+
+ 0x1c,0x25,//vsync width
+ 0x1d,0x02,//0x04,//0x02,
+ 0x1e,0x00,
+ 0x1f,0xe1,
+
+ 0xde,0x7c,
+ 0x3d,0x08,
+};
+
+uint8_t ov2643_640_480_regs[]={
+ //;pclk=72mhz,30fps/pclk=36mhz,15fps
+ //0x12,0x80,
+ 0xc3,0x1f,
+ 0xc4,0xff,
+ 0x3d,0x48,
+ 0xdd,0xa5,
+ //;windows setup
+ 0x20,0x01,
+ 0x21,0x98,
+ 0x22,0x00,
+ 0x23,0x06,
+ 0x24,0x28,//;0x280=640
+ 0x25,0x04,
+ 0x26,0x1e,//;0x1e0=480
+ 0x27,0x04,
+ 0x28,0x40,
+
+ //format
+ 0x12,0x09,
+ 0x39,0xd0,
+ 0xcd,0x13,
+ 0x3d,0x08,
+
+ //;frame setting
+ 0x0e,0x10,//clock 48Mhz PCLK
+ 0x0f,0x14,
+ 0x10,0x0a,
+ 0x11,0x00,
+ 0x29,0x07,//;dummy pixels//24.75M 0x29,0x07//24M 0x29,0x07,//->ov setting
+ 0x2a,0x93, //24.75M 0x2a,0xd0//24M 0x2a,0x93,//->ov setting
+ 0x2b,0x02,//;dummy lines //24.75M 0x2b,0x02//24M 0x2b,0x02,//->ov setting
+ 0x2c,0x6a, //24.75M 0x2c,0x6a//24M 0x2c,0x6a,//->ov setting
+ //for 25fps 0x26a*1.2=0x2e6
+ 0x1c,0x25,//vsync width
+ 0x1d,0x02,
+ 0x1e,0x00,
+ 0x1f,0xb9,
+
+ 0xde,0x7c,
+ 0x3d,0x08,
+};
+
+
+uint8_t ov2643_default_regs_init[]={
+ 0x12,0x80, //reset
+ 0x13,0xff,
+ //;pclk=72mhz,30fps/pclk=36mhz,15fps
+ 0xc3,0x1f,
+ 0xc4,0xff,
+ 0x3d,0x48,
+ 0xdd,0xa5,
+ //;windows setup
+ 0x20,0x01,
+ 0x21,0x98,
+ 0x22,0x00,
+ 0x23,0x06,
+ 0x24,0x28,//;0x280=640
+ 0x25,0x04,
+ 0x26,0x1e,//;0x1e0=480
+ 0x27,0x04,
+ 0x28,0x40,
+ //;format setting
+ 0x12,0x09,
+ 0x39,0xd0,
+ 0xcd,0x13,
+ 0x3d,0x08,
+ //;frame setting
+ 0x0e,0x10,//clock 48Mhz PCLK
+ 0x0f,0x14,
+ 0x10,0x0a,
+ 0x11,0x00,
+ 0x29,0x07,//;dummy pixels//24.75M 0x29,0x07//24M 0x29,0x07,//->ov setting
+ 0x2a,0x93, //24.75M 0x2a,0xd0//24M 0x2a,0x93,//->ov setting
+ 0x2b,0x02,//;dummy lines //24.75M 0x2b,0x02//24M 0x2b,0x02,//->ov setting
+ 0x2c,0x6a, //24.75M 0x2c,0x6a//24M 0x2c,0x6a,//->ov setting
+ //for 25fps 0x26a*1.2=0x2e6
+ 0x1c,0x25,//vsync width
+ 0x1d,0x02,
+ 0x1e,0x00,
+ 0x1f,0xb9,
+
+ //common part except 0x3d,0xde
+ 0x14,0x87, //band filter bit7: 1:50Hz 0:60Hz bit4:
+ 0x15,0x42,
+ 0x3c,0xa4,
+ 0x18,0x78,//set to default then set to csi_ae value to wake up quickly
+ 0x19,0x68,//
+ 0x1a,0x71,
+ 0x37,0xe8,
+ 0x16,0x90,
+ 0x43,0x00,
+ 0x40,0xfb,
+ 0xa9,0x44,
+ 0x2f,0xec,
+ 0x35,0x10,
+ 0x36,0x10,
+ 0x0c,0x00,
+ 0x0d,0x00,
+ 0xd0,0x93,
+ 0xdc,0x2b,
+ 0xd9,0x41,
+ 0xd3,0x02,
+ 0xde,0x7c,
+ 0x3d,0x08,
+ 0x0c,0x00,
+ 0x9b,0x69,
+ 0x9c,0x7d,
+ 0x9d,0x7d,
+ 0x9e,0x69,
+ 0x35,0x04,
+ 0x36,0x04,
+ //;gamma
+ //normal ////enhanced////zqh3 ////zqh2 ////zqh1 ////reset //
+ 0x65,0x04,//0x65,0x12,//0x65,0x04,//0x65,0x04,//0x65,0x07,//0x65,0x05,//
+ 0x66,0x07,//0x66,0x20,//0x66,0x07,//0x66,0x07,//0x66,0x12,//0x66,0x0c,//
+ 0x67,0x19,//0x67,0x39,//0x67,0x19,//0x67,0x19,//0x67,0x1f,//0x67,0x1c,//
+ 0x68,0x34,//0x68,0x4e,//0x68,0x34,//0x68,0x34,//0x68,0x35,//0x68,0x2a,//
+ 0x69,0x4a,//0x69,0x62,//0x69,0x4a,//0x69,0x4a,//0x69,0x4a,//0x69,0x39,//
+ 0x6a,0x5a,//0x6a,0x74,//0x6a,0x5a,//0x6a,0x5a,//0x6a,0x5d,//0x6a,0x45,//
+ 0x6b,0x67,//0x6b,0x85,//0x6b,0x67,//0x6b,0x6b,//0x6b,0x6f,//0x6b,0x52,//
+ 0x6c,0x71,//0x6c,0x92,//0x6c,0x71,//0x6c,0x78,//0x6c,0x7d,//0x6c,0x5d,//
+ 0x6d,0x7c,//0x6d,0x9e,//0x6d,0x7c,//0x6d,0x84,//0x6d,0x8a,//0x6d,0x68,//
+ 0x6e,0x8c,//0x6e,0xb2,//0x6e,0x8c,//0x6e,0x98,//0x6e,0x9f,//0x6e,0x7f,//
+ 0x6f,0x9b,//0x6f,0xc0,//0x6f,0x9b,//0x6f,0xa6,//0x6f,0xae,//0x6f,0x91,//
+ 0x70,0xa9,//0x70,0xcc,//0x70,0xa9,//0x70,0xb2,//0x70,0xbb,//0x70,0xa5,//
+ 0x71,0xc0,//0x71,0xe0,//0x71,0xc0,//0x71,0xc6,//0x71,0xd0,//0x71,0xc6,//
+ 0x72,0xd5,//0x72,0xee,//0x72,0xd5,//0x72,0xd5,//0x72,0xdf,//0x72,0xde,//
+ 0x73,0xe8,//0x73,0xf6,//0x73,0xe8,//0x73,0xe8,//0x73,0xe8,//0x73,0xef,//
+ 0x74,0x20,//0x74,0x11,//0x74,0x20,//0x74,0x20,//0x74,0x20,//0x74,0x16,//
+ //;color matrix
+ //ttune //ov seeting //
+ 0xab,0x20,//0xab,0x28,//
+ 0xac,0x5b,//0xac,0x48,//
+ 0xad,0x05,//0xad,0x10,//
+ 0xae,0x1b,//0xae,0x18,//
+ 0xaf,0x76,//0xaf,0x75,//
+ 0xb0,0x90,//0xb0,0x8c,//
+ 0xb1,0x90,//0xb1,0x8d,//
+ 0xb2,0x8c,//0xb2,0x8c,//
+ 0xb3,0x04,//0xb3,0x00,//
+ 0xb4,0x98,//0xb4,0x98,//
+ 0xb5,0x00,//0xb5,0x00,//
+ //;lens shading
+ 0x40,0xFB,//0x40,0x08,//
+ 0x4c,0x03,//0x4c,0x03,//
+ 0x4d,0x30,//0x4d,0xd0,//
+ 0x4e,0x02,//0x4e,0x02,//
+ 0x4f,0x5c,//0x4f,0x5c,//
+ 0x50,0x3e,//0x50,0x3e,//
+ 0x51,0x00,//0x51,0x00,//
+ 0x52,0x66,//0x52,0x66,//
+ 0x53,0x03,//0x53,0x03,//
+ 0x54,0x30,//0x54,0xd0,//
+ 0x55,0x02,//0x55,0x02,//
+ 0x56,0x5c,//0x56,0x5c,//
+ 0x57,0x47,//0x57,0x47,//
+ 0x58,0x00,//0x58,0x00,//
+ 0x59,0x66,//0x59,0x66,//
+ 0x5a,0x03,//0x5a,0x03,//
+ 0x5b,0x20,//0x5b,0xd0,//
+ 0x5c,0x02,//0x5c,0x02,//
+ 0x5d,0x5c,//0x5d,0x5c,/
+ 0x5e,0x3e,//0x5e,0x3e,//
+ 0x5f,0x00,//0x5f,0x00,//
+ 0x60,0x66,//0x60,0x66,//
+
+ 0x41,0x1f,
+ 0xb5,0x01,
+ 0xb6,0x07,
+ 0xb9,0x3c,
+ 0xba,0x28,
+ 0xb7,0x90,
+ 0xb8,0x08,
+ 0xbf,0x0c,
+ 0xc0,0x3e,
+ 0xa3,0x0a,
+ 0xa4,0x0f,
+ 0xa5,0x09,//denoise threshold
+ 0xa6,0x16,
+ 0x9f,0x0a,
+ 0xa0,0x0f,
+ 0xa7,0x0a,
+ 0xa8,0x0f,
+ 0xa1,0x18,//0xa1,0x10,
+ 0xa2,0x10,//0xa2,0x04,
+ 0xa9,0x00,//0xa9,0x04,
+ 0xaa,0xa6,
+ //;awb
+ 0x75,0x68,//0x75,0x6a,//
+ 0x76,0x11,//0x76,0x11,//
+ 0x77,0x92,//0x77,0x92,//
+ 0x78,0xa1,//0x78,0xa1,//
+ 0x79,0xe1,//0x79,0xe1,//
+ 0x7a,0x02,//0x7a,0x02,//
+ 0x7c,0x0e,//0x7c,0x05,//
+ 0x7d,0x12,//0x7d,0x08,//
+ 0x7e,0x12,//0x7e,0x08,//
+ 0x7f,0x54,//0x7f,0x7c,//
+ 0x80,0x78,//0x80,0x58,//
+ 0x81,0xa2,//0x81,0x2a,//
+ 0x82,0x80,//0x82,0xc5,//
+ 0x83,0x4e,//0x83,0x46,//
+ 0x84,0x40,//0x84,0x3a,//
+ 0x85,0x4c,//0x85,0x54,//
+ 0x86,0x43,//0x86,0x44,//
+ 0x87,0xf8,//0x87,0xf8,//
+ 0x88,0x08,//0x88,0x08,//
+ 0x89,0x70,//0x89,0x70,//
+ 0x8a,0xf0,//0x8a,0xf0,//
+ 0x8b,0xf0,//0x8b,0xf0,//
+
+ 0x90,0xe3,
+ 0x93,0x10,
+ 0x94,0x20,
+ 0x95,0x10,
+ 0x96,0x18,
+
+ 0xff,0xff,//delay 255ms
+ 0xff,0xff,//delay 255ms
+};
+;
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.c b/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.c
new file mode 100755
index 00000000..b6e2d636
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.c
@@ -0,0 +1,346 @@
+/*
+ * Driver for ov2659 CMOS Image Sensor from Omnivision
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov2659.h"
+
+//#define sensor_write_array(sd, arr, sz) cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16addr(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val)
+
+static void sensor_write_array(struct cmos_subdev *sd, uint32_t *arr, size_t sz)
+{
+ uint32_t reg, data;
+ int i;
+
+ for (i = 0; i < sz; i += 2) {
+ reg = arr[i];
+ data = arr[i+1];
+
+ if (reg == 0xffff)
+ msleep(data);
+ else
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg ,data);
+ }
+}
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, ov2659_640_480_regs),
+ CMOS_WIN_SIZE("SVGA", 800, 600, ov2659_800_600_regs),
+ CMOS_WIN_SIZE("720p", 1280, 720, ov2659_1280_720_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, ov2659_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov2659_wb_auto;
+ size = ARRAY_SIZE(ov2659_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov2659_wb_incandescent;
+ size = ARRAY_SIZE(ov2659_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov2659_wb_daylight;
+ size = ARRAY_SIZE(ov2659_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov2659_wb_cloudy;
+ size = ARRAY_SIZE(ov2659_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov2659_wb_fluorescent;
+ size = ARRAY_SIZE(ov2659_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ msleep(100);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = ov2659_scene_mode_auto;
+ size = ARRAY_SIZE(ov2659_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = ov2659_scene_mode_night;
+ size = ARRAY_SIZE(ov2659_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = ov2659_exposure_neg6;
+ size = ARRAY_SIZE(ov2659_exposure_neg6);
+ break;
+ case -1:
+ regs = ov2659_exposure_neg3;
+ size = ARRAY_SIZE(ov2659_exposure_neg3);
+ break;
+ case 0:
+ regs = ov2659_exposure_zero;
+ size = ARRAY_SIZE(ov2659_exposure_zero);
+ break;
+ case 1:
+ regs = ov2659_exposure_pos3;
+ size = ARRAY_SIZE(ov2659_exposure_pos3);
+ break;
+ case 2:
+ regs = ov2659_exposure_pos6;
+ size = ARRAY_SIZE(ov2659_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3821);
+
+ switch (value) {
+ case 0:
+ data &= ~0x06;
+ break;
+ case 1:
+ data |= 0x06;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3821, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3820);
+
+ switch (value) {
+ case 0:
+ data &= ~0x06;
+ break;
+ case 1:
+ data |= 0x06;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3820, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_FLASH:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0x300a) & 0xff) << 8;
+ data |= (sensor_read(sd, 0x300b) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd))
+ return -1;
+
+ sensor_write_array(sd, ov2659_default_regs_init,
+ ARRAY_SIZE(ov2659_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, ov2659_default_regs_exit,
+ ARRAY_SIZE(ov2659_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops ov2659_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev ov2659 = {
+ .name = "ov2659",
+ .i2c_addr = 0x30,
+ .id = 0x2656,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &ov2659_ops,
+};
+
+#if 0
+static int __init ov2659_init(void)
+{
+ return cmos_register_sudbdev(&ov2659);
+}
+
+static void __exit ov2659_exit(void)
+{
+ cmos_unregister_subdev(&ov2659);
+ return;
+}
+
+module_init(ov2659_init);
+module_exit(ov2659_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.h b/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.h
new file mode 100755
index 00000000..c5c8b8f3
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov2659/ov2659.h
@@ -0,0 +1,1197 @@
+#ifndef OV2659_H
+#define OV2659_H
+
+#define STREAMING_DELAY_MS 300
+
+// Scene Mode
+uint32_t ov2659_scene_mode_auto[] = {
+// 0x3208, 0x00,
+
+ 0x3A00, 0x3c,
+ 0x3a02, 0x03,
+ 0x3a03, 0x9c,
+ 0x3a14, 0x03,
+ 0x3a15, 0x9c,
+
+// 0x3208, 0x10,
+// 0x3208, 0xa0,
+
+};
+
+uint32_t ov2659_scene_mode_night[] = {
+// 0x3208, 0x00,
+
+ 0x3A00, 0x3c,
+ 0x3a02, 0x0e,
+ 0x3a03, 0x70,
+ 0x3a14, 0x0e,
+ 0x3a15, 0x70,
+
+// 0x3208, 0x10,
+// 0x3208, 0xa0,
+};
+
+
+// White Balance
+uint32_t ov2659_wb_auto [] = {
+ 0x3406, 0x00,
+};
+
+uint32_t ov2659_wb_incandescent [] = {
+ 0x3208, 0x00,
+
+ 0x3406, 0x01,
+
+ 0x3400, 0x04,
+ 0x3401, 0xe0,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x05,
+ 0x3405, 0xa0,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_wb_fluorescent [] = {
+ 0x3208, 0x00,
+
+ 0x3406, 0x01,
+
+ 0x3400, 0x04,
+ 0x3401, 0x00,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x06,
+ 0x3405, 0x50,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_wb_daylight [] = {
+ 0x3208, 0x00,
+
+ 0x3406, 0x01,
+
+ 0x3400, 0x06,
+ 0x3401, 0x10,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0x48,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_wb_cloudy [] = {
+ 0x3208, 0x00,
+
+ 0x3406, 0x01,
+
+ 0x3400, 0x06,
+ 0x3401, 0x30,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0x30,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_wb_tungsten [] = {
+ 0x3208, 0x00,
+
+ 0x3406, 0x01,
+
+ 0x3400, 0x05,
+ 0x3401, 0x48,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x05,
+ 0x3405, 0xe0,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+
+// Exposure
+uint32_t ov2659_exposure_neg6[] = {
+ 0x3208, 0x00,
+
+ 0x3a0f, 0x18,
+ 0x3a10, 0x10,
+ 0x3a11, 0x30,
+ 0x3a1b, 0x18,
+ 0x3a1e, 0x10,
+ 0x3a1f, 0x08,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_exposure_neg3[] = {
+ 0x3208, 0x00,
+
+ 0x3a0f, 0x28,
+ 0x3a10, 0x20,
+ 0x3a11, 0x50,
+ 0x3a1b, 0x28,
+ 0x3a1e, 0x20,
+ 0x3a1f, 0x10,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_exposure_zero[] = {
+ 0x3208, 0x00,
+
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a1f, 0x14,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_exposure_pos3[] = {
+ 0x3208, 0x00,
+
+ 0x3a0f, 0x38,
+ 0x3a10, 0x30,
+ 0x3a11, 0x80,
+ 0x3a1b, 0x38,
+ 0x3a1e, 0x30,
+ 0x3a1f, 0x18,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_exposure_pos6[] = {
+ 0x3208, 0x00,
+
+ 0x3a0f, 0x58,
+ 0x3a10, 0x68,
+ 0x3a11, 0xb0,
+ 0x3a1b, 0xa8,
+ 0x3a1e, 0x60,
+ 0x3a1f, 0x40,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+/*
+ * The color effect settings
+ */
+uint32_t ov2659_colorfx_none[] = {
+ 0x3208, 0x00,
+
+ 0x5001, 0x1f,
+ 0x507B, 0x06,
+ 0x507e, 0x3a,
+ 0x507f, 0x10,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_colorfx_bw[] = {
+ 0x3208, 0x00,
+
+ 0x5001, 0x1f,
+ 0x507B, 0x26,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_colorfx_sepia[] = {
+ 0x3208, 0x00,
+
+ 0x5001, 0x1f,
+ 0x507B, 0x1e,
+ 0x507e, 0x40,
+ 0x507f, 0xa0,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_colorfx_negative[] = {
+ 0x3208, 0x00,
+
+ 0x5001, 0x1f,
+ 0x507B, 0x46,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_colorfx_emboss[] = {
+
+};
+
+uint32_t ov2659_colorfx_sketch[] = {
+};
+
+uint32_t ov2659_colorfx_sky_blue[] = {
+};
+
+uint32_t ov2659_colorfx_grass_green[] = {
+};
+
+uint32_t ov2659_colorfx_skin_whiten[] = {
+};
+
+uint32_t ov2659_colorfx_vivid[] = {
+};
+
+// Brightness
+uint32_t ov2659_brightness_neg4[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x40,
+ 0x5083, 0x09,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_neg3[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x30,
+ 0x5083, 0x09,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_neg2[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x20,
+ 0x5083, 0x09,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_neg1[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x10,
+ 0x5083, 0x09,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_zero[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x00,
+ 0x5083, 0x01,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_pos1[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x10,
+ 0x5083, 0x01,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+
+};
+
+uint32_t ov2659_brightness_pos2[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x20,
+ 0x5083, 0x01,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_pos3[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x30,
+ 0x5083, 0x01,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_brightness_pos4[] = {
+ 0x3208, 0x00,
+
+ 0x5082, 0x40,
+ 0x5083, 0x01,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+// Contrast
+uint32_t ov2659_contrast_neg4[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x10,
+ 0x5081, 0x10,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_neg3[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x14,
+ 0x5081, 0x14,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_neg2[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x18,
+ 0x5081, 0x18,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_neg1[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x1c,
+ 0x5081, 0x1c,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_zero[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x20,
+ 0x5081, 0x20,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_pos1[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x24,
+ 0x5081, 0x24,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_pos2[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x28,
+ 0x5081, 0x28,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_pos3[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x2c,
+ 0x5081, 0x2c,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_contrast_pos4[] = {
+ 0x3208, 0x00,
+
+ 0x5080, 0x30,
+ 0x5081, 0x30,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+// Saturation
+uint32_t ov2659_saturation_neg4[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//0.6
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_neg3[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//0.7
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_neg2[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//0.8
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_neg1[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//0.9
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_zero[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//1.0
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_pos1[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//1.1
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_pos2[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//1.2
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_pos3[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//1.3
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+uint32_t ov2659_saturation_pos4[] = {
+ 0x3208, 0x00,
+
+ 0x5073, 0x1a,//1.4
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+
+ 0x3208, 0x10,
+ 0x3208, 0xa0,
+};
+
+
+// Resolution
+uint32_t ov2659_640_480_regs[]={
+ 0x0100, 0x00,
+
+ 0x3a00, 0x3c,
+// 0x3406, 0x00,
+ 0x3503, 0x00,
+
+ 0x5066, 0x28,
+ 0x5067, 0x10,
+ 0x506a, 0x0c,
+ 0x506b, 0x1c,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x06,
+ 0x3805, 0x5f,
+ 0x3806, 0x04,
+ 0x3807, 0xb7,
+ 0x3808, 0x02,
+ 0x3809, 0x80,
+ 0x380a, 0x01,
+ 0x380b, 0xe0,
+ 0x3811, 0x08,
+ 0x3813, 0x02,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3820, 0x81,
+ 0x3821, 0x01,
+ 0x5002, 0x10,
+ 0x4608, 0x00,
+ 0x4609, 0xa0,
+
+ 0x3623, 0x00,
+ 0x3634, 0x76,
+ 0x3701, 0x44,
+ 0x3208, 0xa1,
+ 0x3705, 0x0c,
+ 0x370a, 0x52,
+
+ 0x3003, 0x80,
+ 0x3004, 0x10,
+ 0x3005, 0x18,
+ 0x3006, 0x0d,
+
+ 0x380c, 0x05,
+ 0x380d, 0x14,
+ 0x380e, 0x02,
+ 0x380f, 0x68,
+
+ 0x3a08, 0x00,
+ 0x3a09, 0xb9,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0x9a,
+ 0x3a0d, 0x04,
+
+ 0x0100, 0x01,
+
+ 0x301d, 0x08,
+ //delay 10ms
+ 0xffff, 10,
+
+ 0x301d, 0x00,
+
+ 0xffff, STREAMING_DELAY_MS,
+
+ //必须重新调用白平衡菜单
+};
+
+uint32_t ov2659_800_600_regs[]={
+ 0x0100, 0x00,
+
+ 0x3a00, 0x3c,
+ 0x3406, 0x00,
+ 0x3503, 0x00,
+
+ 0x5066, 0x28,
+ 0x5067, 0x10,
+ 0x506a, 0x0c,
+ 0x506b, 0x1c,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x06,
+ 0x3805, 0x5f,
+ 0x3806, 0x04,
+ 0x3807, 0xb7,
+ 0x3808, 0x03,
+ 0x3809, 0x20,
+ 0x380a, 0x02,
+ 0x380b, 0x58,
+ 0x3811, 0x08,
+ 0x3813, 0x02,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3820, 0x81,
+ 0x3821, 0x01,
+ 0x5002, 0x00,
+ 0x4608, 0x00,
+ 0x4609, 0x80,
+
+ 0x3623, 0x00,
+ 0x3634, 0x76,
+ 0x3701, 0x44,
+ 0x3208, 0xa1,
+ 0x3705, 0x0c,
+ 0x370a, 0x52,
+
+ 0x3003, 0x80,
+ 0x3004, 0x10,
+ 0x3005, 0x18,
+ 0x3006, 0x0d,
+
+ 0x380c, 0x05,
+ 0x380d, 0x14,
+ 0x380e, 0x02,
+ 0x380f, 0x68,
+
+ 0x3a08, 0x00,
+ 0x3a09, 0xb9,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0x9a,
+ 0x3a0d, 0x04,
+
+ 0x0100, 0x01,
+
+ 0x301d, 0x08,
+ //delay 10ms
+ 0xffff, 10,
+
+ 0x301d, 0x00,
+
+ 0xffff, STREAMING_DELAY_MS,
+ //必须重新调用白平衡菜单
+};
+
+uint32_t ov2659_1280_720_regs[]={
+ 0x0103, 0x01,
+ //delay 5ms
+ 0xffff, 5,
+
+ 0x3000, 0x0f,
+ 0x3001, 0xff,
+ 0x3002, 0xff,
+ 0x0100, 0x01,
+ 0x3633, 0x3d,
+ 0x3620, 0x02,
+ 0x3631, 0x11,
+ 0x3612, 0x04,
+ 0x3630, 0x20,
+ 0x4702, 0x02,
+ 0x370c, 0x34,
+
+ 0x4003, 0x88,
+
+ 0x3800, 0x00,
+ 0x3801, 0xa0,
+ 0x3802, 0x00,
+ 0x3803, 0xf0,
+ 0x3804, 0x05,
+ 0x3805, 0xbf,
+ 0x3806, 0x03,
+ 0x3807, 0xcb,
+ 0x3808, 0x05,
+ 0x3809, 0x00,
+ 0x380a, 0x02,
+ 0x380b, 0xd0,
+ 0x3811, 0x10,
+ 0x3813, 0x06,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3820, 0x80,
+ 0x3821, 0x00,
+ 0x5002, 0x00,
+ 0x4608, 0x00,
+ 0x4609, 0x80,
+
+ 0x3623, 0x02,
+ 0x3634, 0x44,
+ 0x3701, 0x41,
+ 0x3208, 0xa1,
+
+ 0x3208, 0x02,
+ 0x3702, 0x30,
+ 0x3703, 0x48,
+ 0x3704, 0x48,
+ 0x3208, 0x12,
+ 0x3208, 0xa2,
+
+ 0x3705, 0x18,
+ 0x370a, 0x12,
+
+ 0x3003, 0x80,
+ 0x3004, 0x10,//30fps
+ 0x3005, 0x24,
+ 0x3006, 0x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x504b, 0xf0,
+
+ 0x5000, 0xfb,
+ 0x500c, 0x03,
+ 0x500d, 0x22,
+ 0x500e, 0x02,
+ 0x500f, 0x64,
+ 0x5010, 0x5a,
+ 0x5011, 0x18,
+ 0x5012, 0x66,
+ 0x5013, 0x03,
+ 0x5014, 0x24,
+ 0x5015, 0x02,
+ 0x5016, 0x60,
+ 0x5017, 0x58,
+ 0x5018, 0x10,
+ 0x5019, 0x66,
+ 0x501a, 0x03,
+ 0x501b, 0x16,
+ 0x501c, 0x02,
+ 0x501d, 0x68,
+ 0x501e, 0x50,
+ 0x501f, 0x10,
+ 0x5020, 0x66,
+
+ 0x506e, 0x44,
+ 0x5064, 0x08,
+ 0x5065, 0x10,
+ 0x5066, 0x16,
+ 0x5067, 0x10,
+ 0x506c, 0x08,
+ 0x506d, 0x10,
+ 0x506f, 0xa6,
+ 0x5068, 0x08,
+ 0x5069, 0x10,
+ 0x506a, 0x18,
+ 0x506b, 0x28,
+ 0x5084, 0x10,
+ 0x5085, 0x3c,
+ 0x5005, 0x80,
+
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a1f, 0x14,
+
+ 0x5060, 0x69,
+ 0x5061, 0xbe,
+ 0x5062, 0xbe,
+ 0x5063, 0x69,
+
+ 0x3a19, 0x38,
+ 0x4009, 0x02,
+
+ 0x3503, 0x00,
+
+ 0x3a00, 0x38,
+ 0x3a05, 0x30,
+ 0x3a14, 0x02,
+ 0x3a15, 0xe8,
+ 0x3a02, 0x02,
+ 0x3a03, 0xe8,
+
+ 0x3011, 0x82,
+};
+
+uint32_t ov2659_1600_1200_regs[]={
+ 0x0100, 0x00,
+
+ 0x3a00, 0x38,
+ 0x3406, 0x01,
+ 0x3503, 0x07,
+
+ 0x5066, 0x20,
+ 0x5067, 0x08,
+ 0x506a, 0x0c,
+ 0x506b, 0x1c,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x06,
+ 0x3805, 0x5f,
+ 0x3806, 0x04,
+ 0x3807, 0xbb,
+ 0x3808, 0x06,
+ 0x3809, 0x40,
+ 0x380a, 0x04,
+ 0x380b, 0xb0,
+ 0x3811, 0x10,
+ 0x3813, 0x06,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3820, 0x80,
+ 0x3821, 0x00,
+ 0x5002, 0x00,
+ 0x4608, 0x00,
+ 0x4609, 0x80,
+
+ 0x3623, 0x00,
+ 0x3634, 0x44,
+ 0x3701, 0x44,
+ 0x3208, 0xa2,
+ 0x3705, 0x18,
+ 0x370a, 0x12,
+
+ 0x3003, 0x80,
+ 0x3004, 0x20,
+ 0x3005, 0x24,
+ 0x3006, 0x0d,
+
+ 0x380c, 0x07,
+ 0x380d, 0x9f,
+ 0x380e, 0x04,
+ 0x380f, 0xd0,
+
+ 0x3a08, 0x00,
+ 0x3a09, 0x5c,
+ 0x3a0e, 0x0d,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0x4d,
+ 0x3a0d, 0x10,
+
+ 0x4003, 0x88,
+
+ 0x0100, 0x01,
+ 0xffff, STREAMING_DELAY_MS,
+};
+
+// init
+uint32_t ov2659_default_regs_init[]={
+ 0x0103, 0x01,
+ //delay 5ms
+ 0xffff, 5,
+
+ 0x3000, 0x0f,
+ 0x3001, 0xff,
+ 0x3002, 0xff,
+ 0x0100, 0x01,
+ 0x3633, 0x3d,
+ 0x3620, 0x02,
+ 0x3631, 0x11,
+ 0x3612, 0x04,
+ 0x3630, 0x20,
+ 0x4702, 0x02,
+ 0x370c, 0x34,
+
+ 0x4003, 0x88,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x06,
+ 0x3805, 0x5f,
+ 0x3806, 0x04,
+ 0x3807, 0xb7,
+ 0x3808, 0x03,
+ 0x3809, 0x20,
+ 0x380a, 0x02,
+ 0x380b, 0x58,
+ 0x3811, 0x08,
+ 0x3813, 0x02,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3820, 0x81,
+ 0x3821, 0x01,
+ 0x5002, 0x00,
+ 0x4608, 0x00,
+ 0x4609, 0x80,
+
+ 0x3623, 0x00,
+ 0x3634, 0x76,
+ 0x3701, 0x44,
+
+ 0x3208, 0x01,
+ 0x3702, 0x18,
+ 0x3703, 0x24,
+ 0x3704, 0x24,
+ 0x3208, 0x11,
+
+ 0x3208, 0x02,
+ 0x3702, 0x30,
+ 0x3703, 0x48,
+ 0x3704, 0x48,
+ 0x3208, 0x12,
+
+ 0x3705, 0x0c,
+ 0x370a, 0x52,
+
+ 0x3003, 0x80,
+ 0x3004, 0x10,
+ 0x3005, 0x18,
+ 0x3006, 0x0d,
+
+ 0x380c, 0x05,
+ 0x380d, 0x14,
+ 0x380e, 0x02,
+ 0x380f, 0x68,
+
+ 0x3a08, 0x00,
+ 0x3a09, 0xb9,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0x9a,
+ 0x3a0d, 0x04,
+
+ 0x3a00, 0x3c,
+ 0x3a02, 0x03,
+ 0x3a03, 0x9c,
+ 0x3a14, 0x03,
+ 0x3a15, 0x9c,
+
+ 0x350c, 0x00,
+ 0x350d, 0x00,
+ 0x4300, 0x30,
+ 0x5086, 0x02,
+ 0x5000, 0xfb,
+ 0x5001, 0x1f,
+ 0x507e, 0x3a,
+ 0x507f, 0x10,
+ 0x507c, 0x80,
+ 0x507d, 0x00,
+ 0x507b, 0x06,
+
+ 0x5025, 0x06,
+ 0x5026, 0x0c,
+ 0x5027, 0x1c,
+ 0x5028, 0x36,
+ 0x5029, 0x4e,
+ 0x502a, 0x5f,
+ 0x502b, 0x6d,
+ 0x502c, 0x78,
+ 0x502d, 0x84,
+ 0x502e, 0x95,
+ 0x502f, 0xa5,
+ 0x5030, 0xb4,
+ 0x5031, 0xc8,
+ 0x5032, 0xde,
+ 0x5033, 0xf0,
+ 0x5034, 0x15,
+
+ 0x5070, 0x28,
+ 0x5071, 0x48,
+ 0x5072, 0x10,
+ 0x5073, 0x1a,
+ 0x5074, 0xc8,
+ 0x5075, 0xe2,
+ 0x5076, 0xe2,
+ 0x5077, 0xd8,
+ 0x5078, 0x0a,
+ 0x5079, 0x98,
+ 0x507a, 0x01,
+
+ 0x5035, 0x6a,
+ 0x5036, 0x11,
+ 0x5037, 0x92,
+ 0x5038, 0x25,
+ 0x5039, 0xe1,
+ 0x503a, 0x01,
+ 0x503c, 0x11,
+ 0x503d, 0x10,
+ 0x503e, 0x10,
+ 0x503f, 0x5a,
+ 0x5040, 0x51,
+ 0x5041, 0x0e,
+ 0x5042, 0xa0,
+ 0x5043, 0x49,
+ 0x5044, 0x34,
+ 0x5045, 0x22,
+ 0x5046, 0x3f,
+ 0x5047, 0xf8,
+ 0x5048, 0x08,
+ 0x5049, 0x70,
+ 0x504a, 0xf0,
+ 0x504b, 0xf0,
+
+ 0x5000, 0xfb,
+ 0x500c, 0x03,
+ 0x500d, 0x1d,
+ 0x500e, 0x02,
+ 0x500f, 0x63,
+ 0x5010, 0x60,
+ 0x5011, 0x00,
+ 0x5012, 0x66,
+ 0x5013, 0x03,
+ 0x5014, 0x24,
+ 0x5015, 0x02,
+ 0x5016, 0x66,
+ 0x5017, 0x62,
+ 0x5018, 0x00,
+ 0x5019, 0x66,
+ 0x501a, 0x03,
+ 0x501b, 0x16,
+ 0x501c, 0x02,
+ 0x501d, 0x76,
+ 0x501e, 0x5d,
+ 0x501f, 0x00,
+ 0x5020, 0x66,
+
+ 0x506e, 0x44,
+ 0x5064, 0x08,
+ 0x5065, 0x10,
+ 0x5066, 0x16,
+ 0x5067, 0x10,
+ 0x506c, 0x08,
+ 0x506d, 0x10,
+ 0x506f, 0xa6,
+ 0x5068, 0x08,
+ 0x5069, 0x10,
+ 0x506a, 0x18,
+ 0x506b, 0x28,
+ 0x5084, 0x10,
+ 0x5085, 0x3c,
+ 0x5005, 0x80,
+
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a1f, 0x14,
+
+ 0x5060, 0x69,
+ 0x5061, 0xbe,
+ 0x5062, 0xbe,
+ 0x5063, 0x69,
+
+ 0x3a19, 0x38,
+ 0x4009, 0x02,
+
+ 0x3503, 0x00,
+
+ 0x3011, 0x82,
+};
+
+uint32_t ov2659_default_regs_exit[]={
+ 0x0100, 0x00,
+ 0x3000, 0x0c,
+ 0x3001, 0x00,
+ 0x3002, 0x1f,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov3640/ov3640.h b/drivers/media/video/wmt_v4l2/sensors/ov3640/ov3640.h
new file mode 100755
index 00000000..0851a1a7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov3640/ov3640.h
@@ -0,0 +1,3620 @@
+#ifndef OV3640_H
+#define OV3640_H
+
+unsigned int ov3640_640x480[]={
+
+0x304d, 0x45,
+0x30a7, 0x5e,
+0x3087, 0x16,
+0x309c, 0x1a,
+0x30a2, 0xe4,
+0x30aa, 0x42,
+0x30b0, 0xff,
+0x30b1, 0xff,
+0x30b2, 0x10,
+0x300e, 0x32,
+0x300f, 0x21,
+0x3010, 0x20,
+0x3011, 0x04,
+0x304c, 0x81,
+0x30d7, 0x10,
+0x30d9, 0x0d,
+0x30db, 0x08,
+0x3016, 0x82,
+0x3018, 0x38,
+0x3019, 0x30,
+0x301a, 0x61,
+0x307d, 0x00,
+0x3087, 0x02,
+0x3082, 0x20,
+0x3015, 0x12,
+0x3014, 0x04,
+0x3013, 0xf7,
+0x303c, 0x08,
+0x303d, 0x18,
+0x303e, 0x06,
+0x303f, 0x0c,
+0x3030, 0x62,
+0x3031, 0x26,
+0x3032, 0xe6,
+0x3033, 0x6e,
+0x3034, 0xea,
+0x3035, 0xae,
+0x3036, 0xa6,
+0x3037, 0x6a,
+0x3104, 0x02,
+0x3105, 0xfd,
+0x3106, 0x00,
+0x3107, 0xff,
+0x3300, 0x12,
+0x3301, 0xde,
+0x3302, 0xef,
+0x336a, 0x52,
+0x3370, 0x46,
+0x3376, 0x38,
+0x3300, 0x13,
+0x30b8, 0x20,
+0x30b9, 0x17,
+0x30ba, 0x04,
+0x30bb, 0x08,
+0x3507, 0x06,
+0x350a, 0x4f,
+0x3100, 0x02,
+0x3301, 0xde,
+0x3304, 0x00,
+0x3400, 0x00,
+0x3404, 0x00,
+0x335f, 0x68,
+0x3360, 0x18,
+0x3361, 0x0c,
+0x3362, 0x12,
+0x3363, 0x88,
+0x3364, 0xe4,
+0x3403, 0x42,
+0x3088, 0x02,
+0x3089, 0x80,
+0x308a, 0x01,
+0x308b, 0xe0,
+0x308d, 0x04,
+0x3086, 0x03,
+0x3086, 0x00,
+0x3011, 0x01,
+0x304c, 0x85,
+0x3300, 0x13,
+0x3367, 0x34,
+0x3368, 0x44,
+0x3369, 0x00,
+0x336A, 0x3F,
+0x336B, 0x07,
+0x336C, 0x00,
+0x336D, 0x34,
+0x336E, 0x5E,
+0x336F, 0x00,
+0x3370, 0x37,
+0x3371, 0x07,
+0x3372, 0x00,
+0x3373, 0x34,
+0x3374, 0x56,
+0x3375, 0x20,
+0x3376, 0x34,
+0x3377, 0x07,
+0x3378, 0x00,
+0x3317, 0x04,
+0x3316, 0xf8,
+0x3312, 0x0f,
+0x3314, 0x23,
+0x3313, 0x1f,
+0x3315, 0x33,
+0x3311, 0xb1,
+0x3310, 0xda,
+0x330c, 0x18,
+0x330d, 0x18,
+0x330e, 0x4c,
+0x330f, 0x6a,
+0x330b, 0x1c,
+0x3306, 0x5c,
+0x3307, 0x11,
+0x3308, 0x25,
+0x3340, 0x0E,
+0x3341, 0x4D,
+0x3342, 0x2C,
+0x3343, 0x2C,
+0x3344, 0x8A,
+0x3345, 0xB4,
+0x3346, 0xAA,
+0x3347, 0xB6,
+0x3348, 0x0C,
+0x3349, 0x98,
+0x333F, 0x04,
+0x3355, 0x02,
+0x3358, 0x46,
+0x3359, 0x46,
+0x331b, 0x08,
+0x331c, 0x16,
+0x331d, 0x2d,
+0x331e, 0x54,
+0x331f, 0x66,
+0x3320, 0x73,
+0x3321, 0x80,
+0x3322, 0x8c,
+0x3323, 0x95,
+0x3324, 0x9d,
+0x3325, 0xac,
+0x3326, 0xb8,
+0x3327, 0xcc,
+0x3328, 0xdd,
+0x3329, 0xee,
+0x332a, 0x1d,
+0x3018, 0x40,
+0x3019, 0x38,
+0x332e, 0x04,
+0x332f, 0x04,
+0x3331, 0x02,
+0x3014, 0x84,
+0x3013, 0xe7,
+0x3070, 0x00,
+0x3071, 0xeb,
+0x3072, 0x00,
+0x3073, 0xc4,
+0x301c, 0x05,
+0x301d, 0x06,
+
+//the following is from ovt file
+
+0x308c,0x00,
+0x3104,0x02,
+0x3105,0xff,
+0x3106,0x00,
+0x3107,0xff,
+0x8000,0x02,
+0x8001,0x00,
+0x8002,0x06,
+0x8003,0x02,
+0x8004,0x07,
+0x8005,0xa9,
+0x8006,0x78,
+0x8007,0x7f,
+0x8008,0xe4,
+0x8009,0xf6,
+0x800a,0xd8,
+0x800b,0xfd,
+0x800c,0x75,
+0x800d,0x81,
+0x800e,0x45,
+0x800f,0x02,
+0x8010,0x0a,
+0x8011,0xdf,
+0x8012,0x32,
+0x8013,0x02,
+0x8014,0x00,
+0x8015,0x12,
+0x8016,0xe8,
+0x8017,0x8f,
+0x8018,0xf0,
+0x8019,0xa4,
+0x801a,0xcc,
+0x801b,0x8b,
+0x801c,0xf0,
+0x801d,0xa4,
+0x801e,0x2c,
+0x801f,0xfc,
+0x8020,0xe9,
+0x8021,0x8e,
+0x8022,0xf0,
+0x8023,0xa4,
+0x8024,0x2c,
+0x8025,0xfc,
+0x8026,0x8a,
+0x8027,0xf0,
+0x8028,0xed,
+0x8029,0xa4,
+0x802a,0x2c,
+0x802b,0xfc,
+0x802c,0xea,
+0x802d,0x8e,
+0x802e,0xf0,
+0x802f,0xa4,
+0x8030,0xcd,
+0x8031,0xa8,
+0x8032,0xf0,
+0x8033,0x8b,
+0x8034,0xf0,
+0x8035,0xa4,
+0x8036,0x2d,
+0x8037,0xcc,
+0x8038,0x38,
+0x8039,0x25,
+0x803a,0xf0,
+0x803b,0xfd,
+0x803c,0xe9,
+0x803d,0x8f,
+0x803e,0xf0,
+0x803f,0xa4,
+0x8040,0x2c,
+0x8041,0xcd,
+0x8042,0x35,
+0x8043,0xf0,
+0x8044,0xfc,
+0x8045,0xeb,
+0x8046,0x8e,
+0x8047,0xf0,
+0x8048,0xa4,
+0x8049,0xfe,
+0x804a,0xa9,
+0x804b,0xf0,
+0x804c,0xeb,
+0x804d,0x8f,
+0x804e,0xf0,
+0x804f,0xa4,
+0x8050,0xcf,
+0x8051,0xc5,
+0x8052,0xf0,
+0x8053,0x2e,
+0x8054,0xcd,
+0x8055,0x39,
+0x8056,0xfe,
+0x8057,0xe4,
+0x8058,0x3c,
+0x8059,0xfc,
+0x805a,0xea,
+0x805b,0xa4,
+0x805c,0x2d,
+0x805d,0xce,
+0x805e,0x35,
+0x805f,0xf0,
+0x8060,0xfd,
+0x8061,0xe4,
+0x8062,0x3c,
+0x8063,0xfc,
+0x8064,0x22,
+0x8065,0x75,
+0x8066,0xf0,
+0x8067,0x08,
+0x8068,0x75,
+0x8069,0x82,
+0x806a,0x00,
+0x806b,0xef,
+0x806c,0x2f,
+0x806d,0xff,
+0x806e,0xee,
+0x806f,0x33,
+0x8070,0xfe,
+0x8071,0xcd,
+0x8072,0x33,
+0x8073,0xcd,
+0x8074,0xcc,
+0x8075,0x33,
+0x8076,0xcc,
+0x8077,0xc5,
+0x8078,0x82,
+0x8079,0x33,
+0x807a,0xc5,
+0x807b,0x82,
+0x807c,0x9b,
+0x807d,0xed,
+0x807e,0x9a,
+0x807f,0xec,
+0x8080,0x99,
+0x8081,0xe5,
+0x8082,0x82,
+0x8083,0x98,
+0x8084,0x40,
+0x8085,0x0c,
+0x8086,0xf5,
+0x8087,0x82,
+0x8088,0xee,
+0x8089,0x9b,
+0x808a,0xfe,
+0x808b,0xed,
+0x808c,0x9a,
+0x808d,0xfd,
+0x808e,0xec,
+0x808f,0x99,
+0x8090,0xfc,
+0x8091,0x0f,
+0x8092,0xd5,
+0x8093,0xf0,
+0x8094,0xd6,
+0x8095,0xe4,
+0x8096,0xce,
+0x8097,0xfb,
+0x8098,0xe4,
+0x8099,0xcd,
+0x809a,0xfa,
+0x809b,0xe4,
+0x809c,0xcc,
+0x809d,0xf9,
+0x809e,0xa8,
+0x809f,0x82,
+0x80a0,0x22,
+0x80a1,0xb8,
+0x80a2,0x00,
+0x80a3,0xc1,
+0x80a4,0xb9,
+0x80a5,0x00,
+0x80a6,0x59,
+0x80a7,0xba,
+0x80a8,0x00,
+0x80a9,0x2d,
+0x80aa,0xec,
+0x80ab,0x8b,
+0x80ac,0xf0,
+0x80ad,0x84,
+0x80ae,0xcf,
+0x80af,0xce,
+0x80b0,0xcd,
+0x80b1,0xfc,
+0x80b2,0xe5,
+0x80b3,0xf0,
+0x80b4,0xcb,
+0x80b5,0xf9,
+0x80b6,0x78,
+0x80b7,0x18,
+0x80b8,0xef,
+0x80b9,0x2f,
+0x80ba,0xff,
+0x80bb,0xee,
+0x80bc,0x33,
+0x80bd,0xfe,
+0x80be,0xed,
+0x80bf,0x33,
+0x80c0,0xfd,
+0x80c1,0xec,
+0x80c2,0x33,
+0x80c3,0xfc,
+0x80c4,0xeb,
+0x80c5,0x33,
+0x80c6,0xfb,
+0x80c7,0x10,
+0x80c8,0xd7,
+0x80c9,0x03,
+0x80ca,0x99,
+0x80cb,0x40,
+0x80cc,0x04,
+0x80cd,0xeb,
+0x80ce,0x99,
+0x80cf,0xfb,
+0x80d0,0x0f,
+0x80d1,0xd8,
+0x80d2,0xe5,
+0x80d3,0xe4,
+0x80d4,0xf9,
+0x80d5,0xfa,
+0x80d6,0x22,
+0x80d7,0x78,
+0x80d8,0x18,
+0x80d9,0xef,
+0x80da,0x2f,
+0x80db,0xff,
+0x80dc,0xee,
+0x80dd,0x33,
+0x80de,0xfe,
+0x80df,0xed,
+0x80e0,0x33,
+0x80e1,0xfd,
+0x80e2,0xec,
+0x80e3,0x33,
+0x80e4,0xfc,
+0x80e5,0xc9,
+0x80e6,0x33,
+0x80e7,0xc9,
+0x80e8,0x10,
+0x80e9,0xd7,
+0x80ea,0x05,
+0x80eb,0x9b,
+0x80ec,0xe9,
+0x80ed,0x9a,
+0x80ee,0x40,
+0x80ef,0x07,
+0x80f0,0xec,
+0x80f1,0x9b,
+0x80f2,0xfc,
+0x80f3,0xe9,
+0x80f4,0x9a,
+0x80f5,0xf9,
+0x80f6,0x0f,
+0x80f7,0xd8,
+0x80f8,0xe0,
+0x80f9,0xe4,
+0x80fa,0xc9,
+0x80fb,0xfa,
+0x80fc,0xe4,
+0x80fd,0xcc,
+0x80fe,0xfb,
+0x80ff,0x22,
+0x8100,0x75,
+0x8101,0xf0,
+0x8102,0x10,
+0x8103,0xef,
+0x8104,0x2f,
+0x8105,0xff,
+0x8106,0xee,
+0x8107,0x33,
+0x8108,0xfe,
+0x8109,0xed,
+0x810a,0x33,
+0x810b,0xfd,
+0x810c,0xcc,
+0x810d,0x33,
+0x810e,0xcc,
+0x810f,0xc8,
+0x8110,0x33,
+0x8111,0xc8,
+0x8112,0x10,
+0x8113,0xd7,
+0x8114,0x07,
+0x8115,0x9b,
+0x8116,0xec,
+0x8117,0x9a,
+0x8118,0xe8,
+0x8119,0x99,
+0x811a,0x40,
+0x811b,0x0a,
+0x811c,0xed,
+0x811d,0x9b,
+0x811e,0xfd,
+0x811f,0xec,
+0x8120,0x9a,
+0x8121,0xfc,
+0x8122,0xe8,
+0x8123,0x99,
+0x8124,0xf8,
+0x8125,0x0f,
+0x8126,0xd5,
+0x8127,0xf0,
+0x8128,0xda,
+0x8129,0xe4,
+0x812a,0xcd,
+0x812b,0xfb,
+0x812c,0xe4,
+0x812d,0xcc,
+0x812e,0xfa,
+0x812f,0xe4,
+0x8130,0xc8,
+0x8131,0xf9,
+0x8132,0x22,
+0x8133,0xe8,
+0x8134,0x60,
+0x8135,0x0f,
+0x8136,0xef,
+0x8137,0xc3,
+0x8138,0x33,
+0x8139,0xff,
+0x813a,0xee,
+0x813b,0x33,
+0x813c,0xfe,
+0x813d,0xed,
+0x813e,0x33,
+0x813f,0xfd,
+0x8140,0xec,
+0x8141,0x33,
+0x8142,0xfc,
+0x8143,0xd8,
+0x8144,0xf1,
+0x8145,0x22,
+0x8146,0xa4,
+0x8147,0x25,
+0x8148,0x82,
+0x8149,0xf5,
+0x814a,0x82,
+0x814b,0xe5,
+0x814c,0xf0,
+0x814d,0x35,
+0x814e,0x83,
+0x814f,0xf5,
+0x8150,0x83,
+0x8151,0x22,
+0x8152,0xd0,
+0x8153,0x83,
+0x8154,0xd0,
+0x8155,0x82,
+0x8156,0xf8,
+0x8157,0xe4,
+0x8158,0x93,
+0x8159,0x70,
+0x815a,0x12,
+0x815b,0x74,
+0x815c,0x01,
+0x815d,0x93,
+0x815e,0x70,
+0x815f,0x0d,
+0x8160,0xa3,
+0x8161,0xa3,
+0x8162,0x93,
+0x8163,0xf8,
+0x8164,0x74,
+0x8165,0x01,
+0x8166,0x93,
+0x8167,0xf5,
+0x8168,0x82,
+0x8169,0x88,
+0x816a,0x83,
+0x816b,0xe4,
+0x816c,0x73,
+0x816d,0x74,
+0x816e,0x02,
+0x816f,0x93,
+0x8170,0x68,
+0x8171,0x60,
+0x8172,0xef,
+0x8173,0xa3,
+0x8174,0xa3,
+0x8175,0xa3,
+0x8176,0x80,
+0x8177,0xdf,
+0x8178,0x75,
+0x8179,0x0c,
+0x817a,0x0a,
+0x817b,0xa2,
+0x817c,0xaf,
+0x817d,0x92,
+0x817e,0x22,
+0x817f,0xc2,
+0x8180,0xaf,
+0x8181,0xc2,
+0x8182,0x23,
+0x8183,0x12,
+0x8184,0x04,
+0x8185,0x07,
+0x8186,0x12,
+0x8187,0x04,
+0x8188,0x4d,
+0x8189,0x12,
+0x818a,0x04,
+0x818b,0x07,
+0x818c,0x75,
+0x818d,0x32,
+0x818e,0x05,
+0x818f,0xaf,
+0x8190,0x32,
+0x8191,0x15,
+0x8192,0x32,
+0x8193,0xef,
+0x8194,0x70,
+0x8195,0xf9,
+0x8196,0xd2,
+0x8197,0x18,
+0x8198,0x12,
+0x8199,0x04,
+0x819a,0x09,
+0x819b,0x75,
+0x819c,0x32,
+0x819d,0x0a,
+0x819e,0xaf,
+0x819f,0x32,
+0x81a0,0x15,
+0x81a1,0x32,
+0x81a2,0xef,
+0x81a3,0x70,
+0x81a4,0xf9,
+0x81a5,0xc2,
+0x81a6,0x19,
+0x81a7,0x12,
+0x81a8,0x04,
+0x81a9,0x09,
+0x81aa,0x75,
+0x81ab,0x32,
+0x81ac,0x05,
+0x81ad,0xaf,
+0x81ae,0x32,
+0x81af,0x15,
+0x81b0,0x32,
+0x81b1,0xef,
+0x81b2,0x70,
+0x81b3,0xf9,
+0x81b4,0xc2,
+0x81b5,0x18,
+0x81b6,0x12,
+0x81b7,0x04,
+0x81b8,0x09,
+0x81b9,0x75,
+0x81ba,0x32,
+0x81bb,0x05,
+0x81bc,0xaf,
+0x81bd,0x32,
+0x81be,0x15,
+0x81bf,0x32,
+0x81c0,0xef,
+0x81c1,0x70,
+0x81c2,0xf9,
+0x81c3,0x75,
+0x81c4,0x0d,
+0x81c5,0x18,
+0x81c6,0x12,
+0x81c7,0x02,
+0x81c8,0xb8,
+0x81c9,0x75,
+0x81ca,0x32,
+0x81cb,0x0a,
+0x81cc,0xaf,
+0x81cd,0x32,
+0x81ce,0x15,
+0x81cf,0x32,
+0x81d0,0xef,
+0x81d1,0x70,
+0x81d2,0xf9,
+0x81d3,0xd2,
+0x81d4,0x18,
+0x81d5,0x12,
+0x81d6,0x04,
+0x81d7,0x09,
+0x81d8,0x12,
+0x81d9,0x04,
+0x81da,0x97,
+0x81db,0xaf,
+0x81dc,0x32,
+0x81dd,0x15,
+0x81de,0x32,
+0x81df,0xef,
+0x81e0,0x70,
+0x81e1,0xf9,
+0x81e2,0xc2,
+0x81e3,0x18,
+0x81e4,0x12,
+0x81e5,0x04,
+0x81e6,0x09,
+0x81e7,0x75,
+0x81e8,0x32,
+0x81e9,0x0a,
+0x81ea,0xaf,
+0x81eb,0x32,
+0x81ec,0x15,
+0x81ed,0x32,
+0x81ee,0xef,
+0x81ef,0x70,
+0x81f0,0xf9,
+0x81f1,0x30,
+0x81f2,0x11,
+0x81f3,0x03,
+0x81f4,0x02,
+0x81f5,0x02,
+0x81f6,0x6f,
+0x81f7,0x12,
+0x81f8,0x04,
+0x81f9,0x07,
+0x81fa,0x12,
+0x81fb,0x04,
+0x81fc,0x4d,
+0x81fd,0xe5,
+0x81fe,0x0a,
+0x81ff,0xf5,
+0x8200,0x0d,
+0x8201,0x12,
+0x8202,0x02,
+0x8203,0xb8,
+0x8204,0x75,
+0x8205,0x32,
+0x8206,0x0a,
+0x8207,0xaf,
+0x8208,0x32,
+0x8209,0x15,
+0x820a,0x32,
+0x820b,0xef,
+0x820c,0x70,
+0x820d,0xf9,
+0x820e,0xd2,
+0x820f,0x18,
+0x8210,0x12,
+0x8211,0x04,
+0x8212,0x09,
+0x8213,0x12,
+0x8214,0x04,
+0x8215,0x97,
+0x8216,0xaf,
+0x8217,0x32,
+0x8218,0x15,
+0x8219,0x32,
+0x821a,0xef,
+0x821b,0x70,
+0x821c,0xf9,
+0x821d,0xc2,
+0x821e,0x18,
+0x821f,0x12,
+0x8220,0x04,
+0x8221,0x09,
+0x8222,0x75,
+0x8223,0x32,
+0x8224,0x0a,
+0x8225,0xaf,
+0x8226,0x32,
+0x8227,0x15,
+0x8228,0x32,
+0x8229,0xef,
+0x822a,0x70,
+0x822b,0xf9,
+0x822c,0x30,
+0x822d,0x11,
+0x822e,0x04,
+0x822f,0x15,
+0x8230,0x0c,
+0x8231,0x80,
+0x8232,0x45,
+0x8233,0x12,
+0x8234,0x04,
+0x8235,0x07,
+0x8236,0x12,
+0x8237,0x04,
+0x8238,0x4d,
+0x8239,0x85,
+0x823a,0x0b,
+0x823b,0x0d,
+0x823c,0x12,
+0x823d,0x0a,
+0x823e,0x9b,
+0x823f,0xc2,
+0x8240,0x0f,
+0x8241,0x12,
+0x8242,0x04,
+0x8243,0x4f,
+0x8244,0x75,
+0x8245,0x32,
+0x8246,0x0a,
+0x8247,0xaf,
+0x8248,0x32,
+0x8249,0x15,
+0x824a,0x32,
+0x824b,0xef,
+0x824c,0x70,
+0x824d,0xf9,
+0x824e,0xd2,
+0x824f,0x18,
+0x8250,0x12,
+0x8251,0x04,
+0x8252,0x09,
+0x8253,0x12,
+0x8254,0x04,
+0x8255,0x97,
+0x8256,0xaf,
+0x8257,0x32,
+0x8258,0x15,
+0x8259,0x32,
+0x825a,0xef,
+0x825b,0x70,
+0x825c,0xf9,
+0x825d,0xc2,
+0x825e,0x18,
+0x825f,0x12,
+0x8260,0x04,
+0x8261,0x09,
+0x8262,0x75,
+0x8263,0x32,
+0x8264,0x0a,
+0x8265,0xaf,
+0x8266,0x32,
+0x8267,0x15,
+0x8268,0x32,
+0x8269,0xef,
+0x826a,0x70,
+0x826b,0xf9,
+0x826c,0x30,
+0x826d,0x11,
+0x826e,0x06,
+0x826f,0x15,
+0x8270,0x0c,
+0x8271,0xd2,
+0x8272,0x23,
+0x8273,0x80,
+0x8274,0x03,
+0x8275,0xe4,
+0x8276,0xf5,
+0x8277,0x0c,
+0x8278,0x12,
+0x8279,0x04,
+0x827a,0x07,
+0x827b,0x12,
+0x827c,0x04,
+0x827d,0x4d,
+0x827e,0xc2,
+0x827f,0x19,
+0x8280,0x12,
+0x8281,0x04,
+0x8282,0x09,
+0x8283,0x75,
+0x8284,0x32,
+0x8285,0x05,
+0x8286,0xaf,
+0x8287,0x32,
+0x8288,0x15,
+0x8289,0x32,
+0x828a,0xef,
+0x828b,0x70,
+0x828c,0xf9,
+0x828d,0xd2,
+0x828e,0x18,
+0x828f,0x12,
+0x8290,0x04,
+0x8291,0x09,
+0x8292,0x75,
+0x8293,0x32,
+0x8294,0x05,
+0x8295,0xaf,
+0x8296,0x32,
+0x8297,0x15,
+0x8298,0x32,
+0x8299,0xef,
+0x829a,0x70,
+0x829b,0xf9,
+0x829c,0x12,
+0x829d,0x04,
+0x829e,0x07,
+0x829f,0x75,
+0x82a0,0x32,
+0x82a1,0x05,
+0x82a2,0xaf,
+0x82a3,0x32,
+0x82a4,0x15,
+0x82a5,0x32,
+0x82a6,0xef,
+0x82a7,0x70,
+0x82a8,0xf9,
+0x82a9,0xa2,
+0x82aa,0x22,
+0x82ab,0x92,
+0x82ac,0xaf,
+0x82ad,0xe5,
+0x82ae,0x0c,
+0x82af,0xd3,
+0x82b0,0x94,
+0x82b1,0x00,
+0x82b2,0x40,
+0x82b3,0x03,
+0x82b4,0x02,
+0x82b5,0x01,
+0x82b6,0x7f,
+0x82b7,0x22,
+0x82b8,0x12,
+0x82b9,0x0a,
+0x82ba,0x9b,
+0x82bb,0xc2,
+0x82bc,0x0f,
+0x82bd,0x90,
+0x82be,0x30,
+0x82bf,0xb1,
+0x82c0,0xe5,
+0x82c1,0x21,
+0x82c2,0xf0,
+0x82c3,0x22,
+0x82c4,0x90,
+0x82c5,0x33,
+0x82c6,0x5f,
+0x82c7,0xe0,
+0x82c8,0x54,
+0x82c9,0x0f,
+0x82ca,0xfe,
+0x82cb,0xa3,
+0x82cc,0xe0,
+0x82cd,0xfd,
+0x82ce,0xed,
+0x82cf,0xff,
+0x82d0,0xee,
+0x82d1,0x54,
+0x82d2,0x0f,
+0x82d3,0xf5,
+0x82d4,0x0d,
+0x82d5,0x8f,
+0x82d6,0x0e,
+0x82d7,0x90,
+0x82d8,0x33,
+0x82d9,0x5f,
+0x82da,0xe0,
+0x82db,0x54,
+0x82dc,0x70,
+0x82dd,0x75,
+0x82de,0xf0,
+0x82df,0x10,
+0x82e0,0xa4,
+0x82e1,0xff,
+0x82e2,0x90,
+0x82e3,0x33,
+0x82e4,0x61,
+0x82e5,0xe0,
+0x82e6,0xfd,
+0x82e7,0xef,
+0x82e8,0x4d,
+0x82e9,0xff,
+0x82ea,0xe5,
+0x82eb,0xf0,
+0x82ec,0x54,
+0x82ed,0x07,
+0x82ee,0xf5,
+0x82ef,0x0f,
+0x82f0,0x8f,
+0x82f1,0x10,
+0x82f2,0xe5,
+0x82f3,0x0e,
+0x82f4,0xae,
+0x82f5,0x0d,
+0x82f6,0x78,
+0x82f7,0x05,
+0x82f8,0xce,
+0x82f9,0xc3,
+0x82fa,0x13,
+0x82fb,0xce,
+0x82fc,0x13,
+0x82fd,0xd8,
+0x82fe,0xf9,
+0x82ff,0xf5,
+0x8300,0x0e,
+0x8301,0x8e,
+0x8302,0x0d,
+0x8303,0xe5,
+0x8304,0x10,
+0x8305,0xae,
+0x8306,0x0f,
+0x8307,0x78,
+0x8308,0x03,
+0x8309,0xce,
+0x830a,0xc3,
+0x830b,0x13,
+0x830c,0xce,
+0x830d,0x13,
+0x830e,0xd8,
+0x830f,0xf9,
+0x8310,0xf5,
+0x8311,0x10,
+0x8312,0x8e,
+0x8313,0x0f,
+0x8314,0x85,
+0x8315,0x2a,
+0x8316,0x11,
+0x8317,0x85,
+0x8318,0x2b,
+0x8319,0x13,
+0x831a,0x85,
+0x831b,0x2c,
+0x831c,0x12,
+0x831d,0x85,
+0x831e,0x2d,
+0x831f,0x14,
+0x8320,0x12,
+0x8321,0x04,
+0x8322,0xab,
+0x8323,0xaf,
+0x8324,0x11,
+0x8325,0x12,
+0x8326,0x03,
+0x8327,0xdf,
+0x8328,0x8f,
+0x8329,0x11,
+0x832a,0x12,
+0x832b,0x04,
+0x832c,0xab,
+0x832d,0xaf,
+0x832e,0x12,
+0x832f,0x12,
+0x8330,0x03,
+0x8331,0xdf,
+0x8332,0x8f,
+0x8333,0x12,
+0x8334,0x12,
+0x8335,0x04,
+0x8336,0x56,
+0x8337,0xaf,
+0x8338,0x13,
+0x8339,0xfc,
+0x833a,0xfd,
+0x833b,0xfe,
+0x833c,0x12,
+0x833d,0x00,
+0x833e,0x16,
+0x833f,0x12,
+0x8340,0x03,
+0x8341,0xfe,
+0x8342,0x7b,
+0x8343,0x1e,
+0x8344,0x12,
+0x8345,0x03,
+0x8346,0xf7,
+0x8347,0x8f,
+0x8348,0x13,
+0x8349,0x12,
+0x834a,0x04,
+0x834b,0x56,
+0x834c,0xaf,
+0x834d,0x14,
+0x834e,0xfc,
+0x834f,0xfd,
+0x8350,0xfe,
+0x8351,0x12,
+0x8352,0x00,
+0x8353,0x16,
+0x8354,0x12,
+0x8355,0x03,
+0x8356,0xfe,
+0x8357,0xe4,
+0x8358,0x7b,
+0x8359,0x1e,
+0x835a,0x12,
+0x835b,0x03,
+0x835c,0xf8,
+0x835d,0x8f,
+0x835e,0x14,
+0x835f,0xc3,
+0x8360,0xe5,
+0x8361,0x12,
+0x8362,0x95,
+0x8363,0x11,
+0x8364,0xff,
+0x8365,0x0f,
+0x8366,0xef,
+0x8367,0xc3,
+0x8368,0x13,
+0x8369,0xff,
+0x836a,0xc3,
+0x836b,0x94,
+0x836c,0x02,
+0x836d,0x50,
+0x836e,0x27,
+0x836f,0xe5,
+0x8370,0x11,
+0x8371,0x9f,
+0x8372,0x40,
+0x8373,0x06,
+0x8374,0xe5,
+0x8375,0x11,
+0x8376,0x9f,
+0x8377,0xfe,
+0x8378,0x80,
+0x8379,0x02,
+0x837a,0x7e,
+0x837b,0x00,
+0x837c,0x8e,
+0x837d,0x11,
+0x837e,0xef,
+0x837f,0xfd,
+0x8380,0xe5,
+0x8381,0x12,
+0x8382,0x2d,
+0x8383,0xfd,
+0x8384,0xe4,
+0x8385,0x33,
+0x8386,0xfc,
+0x8387,0xc3,
+0x8388,0xed,
+0x8389,0x95,
+0x838a,0x0e,
+0x838b,0xec,
+0x838c,0x95,
+0x838d,0x0d,
+0x838e,0x50,
+0x838f,0x02,
+0x8390,0x80,
+0x8391,0x02,
+0x8392,0xad,
+0x8393,0x0e,
+0x8394,0x8d,
+0x8395,0x12,
+0x8396,0xc3,
+0x8397,0xe5,
+0x8398,0x14,
+0x8399,0x95,
+0x839a,0x13,
+0x839b,0xff,
+0x839c,0xc3,
+0x839d,0x94,
+0x839e,0x08,
+0x839f,0x50,
+0x83a0,0x29,
+0x83a1,0xe5,
+0x83a2,0x13,
+0x83a3,0x9f,
+0x83a4,0x40,
+0x83a5,0x06,
+0x83a6,0xe5,
+0x83a7,0x13,
+0x83a8,0x9f,
+0x83a9,0xfe,
+0x83aa,0x80,
+0x83ab,0x02,
+0x83ac,0x7e,
+0x83ad,0x00,
+0x83ae,0x8e,
+0x83af,0x13,
+0x83b0,0xef,
+0x83b1,0xfd,
+0x83b2,0xe5,
+0x83b3,0x14,
+0x83b4,0x2d,
+0x83b5,0xfd,
+0x83b6,0xe4,
+0x83b7,0x33,
+0x83b8,0xfc,
+0x83b9,0xc3,
+0x83ba,0xed,
+0x83bb,0x95,
+0x83bc,0x10,
+0x83bd,0xec,
+0x83be,0x95,
+0x83bf,0x0f,
+0x83c0,0x50,
+0x83c1,0x04,
+0x83c2,0xaf,
+0x83c3,0x05,
+0x83c4,0x80,
+0x83c5,0x02,
+0x83c6,0xaf,
+0x83c7,0x10,
+0x83c8,0x8f,
+0x83c9,0x14,
+0x83ca,0x90,
+0x83cb,0x39,
+0x83cc,0x0a,
+0x83cd,0xe5,
+0x83ce,0x11,
+0x83cf,0xf0,
+0x83d0,0xa3,
+0x83d1,0xe5,
+0x83d2,0x13,
+0x83d3,0xf0,
+0x83d4,0xa3,
+0x83d5,0xe5,
+0x83d6,0x12,
+0x83d7,0xf0,
+0x83d8,0xa3,
+0x83d9,0xe5,
+0x83da,0x14,
+0x83db,0xf0,
+0x83dc,0xc2,
+0x83dd,0x20,
+0x83de,0x22,
+0x83df,0xab,
+0x83e0,0x0c,
+0x83e1,0xaa,
+0x83e2,0x0b,
+0x83e3,0xa9,
+0x83e4,0x0a,
+0x83e5,0xa8,
+0x83e6,0x09,
+0x83e7,0xfc,
+0x83e8,0xfd,
+0x83e9,0xfe,
+0x83ea,0x12,
+0x83eb,0x00,
+0x83ec,0x16,
+0x83ed,0x8f,
+0x83ee,0x0c,
+0x83ef,0x8e,
+0x83f0,0x0b,
+0x83f1,0x8d,
+0x83f2,0x0a,
+0x83f3,0x8c,
+0x83f4,0x09,
+0x83f5,0x7b,
+0x83f6,0x28,
+0x83f7,0xe4,
+0x83f8,0xfa,
+0x83f9,0xf9,
+0x83fa,0xf8,
+0x83fb,0x12,
+0x83fc,0x00,
+0x83fd,0xa1,
+0x83fe,0x8f,
+0x83ff,0x0c,
+0x8400,0x8e,
+0x8401,0x0b,
+0x8402,0x8d,
+0x8403,0x0a,
+0x8404,0x8c,
+0x8405,0x09,
+0x8406,0x22,
+0x8407,0xd2,
+0x8408,0x19,
+0x8409,0x90,
+0x840a,0x30,
+0x840b,0xb4,
+0x840c,0xe5,
+0x840d,0x23,
+0x840e,0xf0,
+0x840f,0x22,
+0x8410,0x85,
+0x8411,0x2f,
+0x8412,0x82,
+0x8413,0x85,
+0x8414,0x2e,
+0x8415,0x83,
+0x8416,0xe5,
+0x8417,0x43,
+0x8418,0x75,
+0x8419,0xf0,
+0x841a,0x02,
+0x841b,0x12,
+0x841c,0x01,
+0x841d,0x46,
+0x841e,0xe4,
+0x841f,0x93,
+0x8420,0xfe,
+0x8421,0x74,
+0x8422,0x01,
+0x8423,0x93,
+0x8424,0xff,
+0x8425,0x85,
+0x8426,0x2f,
+0x8427,0x82,
+0x8428,0x85,
+0x8429,0x2e,
+0x842a,0x83,
+0x842b,0xe4,
+0x842c,0x93,
+0x842d,0xfc,
+0x842e,0x74,
+0x842f,0x01,
+0x8430,0x93,
+0x8431,0xfd,
+0x8432,0xc3,
+0x8433,0xef,
+0x8434,0x9d,
+0x8435,0xff,
+0x8436,0xee,
+0x8437,0x9c,
+0x8438,0x22,
+0x8439,0x12,
+0x843a,0x00,
+0x843b,0x16,
+0x843c,0x8f,
+0x843d,0x3c,
+0x843e,0x8e,
+0x843f,0x3b,
+0x8440,0x8d,
+0x8441,0x3a,
+0x8442,0x8c,
+0x8443,0x39,
+0x8444,0xaf,
+0x8445,0x3c,
+0x8446,0xae,
+0x8447,0x3b,
+0x8448,0xad,
+0x8449,0x3a,
+0x844a,0xac,
+0x844b,0x39,
+0x844c,0x22,
+0x844d,0xd2,
+0x844e,0x0f,
+0x844f,0x90,
+0x8450,0x30,
+0x8451,0xb1,
+0x8452,0xe5,
+0x8453,0x21,
+0x8454,0xf0,
+0x8455,0x22,
+0x8456,0xe4,
+0x8457,0x85,
+0x8458,0x10,
+0x8459,0x0c,
+0x845a,0x85,
+0x845b,0x0f,
+0x845c,0x0b,
+0x845d,0xf5,
+0x845e,0x0a,
+0x845f,0xf5,
+0x8460,0x09,
+0x8461,0xab,
+0x8462,0x0c,
+0x8463,0xaa,
+0x8464,0x0b,
+0x8465,0xa9,
+0x8466,0x0a,
+0x8467,0xa8,
+0x8468,0x09,
+0x8469,0x22,
+0x846a,0x85,
+0x846b,0x2f,
+0x846c,0x82,
+0x846d,0x85,
+0x846e,0x2e,
+0x846f,0x83,
+0x8470,0x22,
+0x8471,0xff,
+0x8472,0xe4,
+0x8473,0x94,
+0x8474,0x00,
+0x8475,0xfe,
+0x8476,0xe4,
+0x8477,0xfc,
+0x8478,0xfd,
+0x8479,0x02,
+0x847a,0x01,
+0x847b,0x33,
+0x847c,0xc2,
+0x847d,0x07,
+0x847e,0xc2,
+0x847f,0x06,
+0x8480,0xc2,
+0x8481,0x02,
+0x8482,0xc2,
+0x8483,0x01,
+0x8484,0xc2,
+0x8485,0x00,
+0x8486,0xc2,
+0x8487,0x03,
+0x8488,0xd2,
+0x8489,0x04,
+0x848a,0x22,
+0x848b,0x90,
+0x848c,0x33,
+0x848d,0xb3,
+0x848e,0xe4,
+0x848f,0xf0,
+0x8490,0xa3,
+0x8491,0xf0,
+0x8492,0xa3,
+0x8493,0xf0,
+0x8494,0xa3,
+0x8495,0xf0,
+0x8496,0x22,
+0x8497,0xa3,
+0x8498,0xe0,
+0x8499,0xf5,
+0x849a,0x22,
+0x849b,0x75,
+0x849c,0x32,
+0x849d,0x0a,
+0x849e,0x22,
+0x849f,0x12,
+0x84a0,0x00,
+0x84a1,0xa1,
+0x84a2,0x8f,
+0x84a3,0x3c,
+0x84a4,0x8e,
+0x84a5,0x3b,
+0x84a6,0x8d,
+0x84a7,0x3a,
+0x84a8,0x8c,
+0x84a9,0x39,
+0x84aa,0x22,
+0x84ab,0xe4,
+0x84ac,0x85,
+0x84ad,0x0e,
+0x84ae,0x0c,
+0x84af,0x85,
+0x84b0,0x0d,
+0x84b1,0x0b,
+0x84b2,0xf5,
+0x84b3,0x0a,
+0x84b4,0xf5,
+0x84b5,0x09,
+0x84b6,0x22,
+0x84b7,0xe4,
+0x84b8,0xfc,
+0x84b9,0xfd,
+0x84ba,0xfe,
+0x84bb,0x02,
+0x84bc,0x01,
+0x84bd,0x33,
+0x84be,0x90,
+0x84bf,0x0b,
+0x84c0,0x4c,
+0x84c1,0xe4,
+0x84c2,0x93,
+0x84c3,0xff,
+0x84c4,0x90,
+0x84c5,0x30,
+0x84c6,0x0a,
+0x84c7,0xe0,
+0x84c8,0x22,
+0x84c9,0xc2,
+0x84ca,0x02,
+0x84cb,0xc2,
+0x84cc,0x01,
+0x84cd,0xd2,
+0x84ce,0x00,
+0x84cf,0xc2,
+0x84d0,0x03,
+0x84d1,0xc2,
+0x84d2,0x04,
+0x84d3,0x22,
+0x84d4,0x75,
+0x84d5,0xf0,
+0x84d6,0x02,
+0x84d7,0x02,
+0x84d8,0x01,
+0x84d9,0x46,
+0x84da,0xe4,
+0x84db,0x93,
+0x84dc,0xf5,
+0x84dd,0x43,
+0x84de,0xa3,
+0x84df,0xe4,
+0x84e0,0x93,
+0x84e1,0xf5,
+0x84e2,0x28,
+0x84e3,0x22,
+0x84e4,0xd2,
+0x84e5,0x02,
+0x84e6,0xd2,
+0x84e7,0x01,
+0x84e8,0xc2,
+0x84e9,0x00,
+0x84ea,0x22,
+0x84eb,0xd3,
+0x84ec,0xe5,
+0x84ed,0x3c,
+0x84ee,0x94,
+0x84ef,0xff,
+0x84f0,0xe5,
+0x84f1,0x3b,
+0x84f2,0x94,
+0x84f3,0x03,
+0x84f4,0x22,
+0x84f5,0x30,
+0x84f6,0x04,
+0x84f7,0x03,
+0x84f8,0x02,
+0x84f9,0x05,
+0x84fa,0xd5,
+0x84fb,0xd2,
+0x84fc,0x04,
+0x84fd,0xe5,
+0x84fe,0x45,
+0x84ff,0xb4,
+0x8500,0x01,
+0x8501,0x06,
+0x8502,0x12,
+0x8503,0x0c,
+0x8504,0xfe,
+0x8505,0x02,
+0x8506,0x05,
+0x8507,0xce,
+0x8508,0xe5,
+0x8509,0x45,
+0x850a,0xb4,
+0x850b,0x02,
+0x850c,0x06,
+0x850d,0x12,
+0x850e,0x0d,
+0x850f,0x0f,
+0x8510,0x02,
+0x8511,0x05,
+0x8512,0xce,
+0x8513,0xe5,
+0x8514,0x45,
+0x8515,0xb4,
+0x8516,0x03,
+0x8517,0x05,
+0x8518,0xe4,
+0x8519,0xf5,
+0x851a,0x09,
+0x851b,0x80,
+0x851c,0x08,
+0x851d,0xe5,
+0x851e,0x45,
+0x851f,0xb4,
+0x8520,0x04,
+0x8521,0x09,
+0x8522,0x85,
+0x8523,0x43,
+0x8524,0x09,
+0x8525,0x12,
+0x8526,0x09,
+0x8527,0xee,
+0x8528,0x02,
+0x8529,0x05,
+0x852a,0xce,
+0x852b,0xe5,
+0x852c,0x45,
+0x852d,0x64,
+0x852e,0x0f,
+0x852f,0x70,
+0x8530,0x15,
+0x8531,0x12,
+0x8532,0x04,
+0x8533,0xeb,
+0x8534,0x40,
+0x8535,0x06,
+0x8536,0x7e,
+0x8537,0x03,
+0x8538,0x7f,
+0x8539,0xff,
+0x853a,0x80,
+0x853b,0x04,
+0x853c,0xae,
+0x853d,0x3b,
+0x853e,0xaf,
+0x853f,0x3c,
+0x8540,0x12,
+0x8541,0x05,
+0x8542,0xd6,
+0x8543,0x02,
+0x8544,0x05,
+0x8545,0xce,
+0x8546,0xe5,
+0x8547,0x45,
+0x8548,0x64,
+0x8549,0x10,
+0x854a,0x60,
+0x854b,0x03,
+0x854c,0x02,
+0x854d,0x05,
+0x854e,0xce,
+0x854f,0xf5,
+0x8550,0x39,
+0x8551,0xf5,
+0x8552,0x3a,
+0x8553,0xf5,
+0x8554,0x3b,
+0x8555,0xab,
+0x8556,0x3c,
+0x8557,0xaa,
+0x8558,0x3b,
+0x8559,0xa9,
+0x855a,0x3a,
+0x855b,0xa8,
+0x855c,0x39,
+0x855d,0x12,
+0x855e,0x04,
+0x855f,0x10,
+0x8560,0xfe,
+0x8561,0xe4,
+0x8562,0xfc,
+0x8563,0xfd,
+0x8564,0x12,
+0x8565,0x04,
+0x8566,0x39,
+0x8567,0xe4,
+0x8568,0x7b,
+0x8569,0xff,
+0x856a,0xfa,
+0x856b,0xf9,
+0x856c,0xf8,
+0x856d,0x12,
+0x856e,0x04,
+0x856f,0x9f,
+0x8570,0x12,
+0x8571,0x04,
+0x8572,0x6a,
+0x8573,0xe4,
+0x8574,0x93,
+0x8575,0xfe,
+0x8576,0x74,
+0x8577,0x01,
+0x8578,0x93,
+0x8579,0xff,
+0x857a,0xe4,
+0x857b,0xfc,
+0x857c,0xfd,
+0x857d,0xe5,
+0x857e,0x3c,
+0x857f,0x2f,
+0x8580,0xf5,
+0x8581,0x3c,
+0x8582,0xe5,
+0x8583,0x3b,
+0x8584,0x3e,
+0x8585,0xf5,
+0x8586,0x3b,
+0x8587,0xed,
+0x8588,0x35,
+0x8589,0x3a,
+0x858a,0xf5,
+0x858b,0x3a,
+0x858c,0xec,
+0x858d,0x35,
+0x858e,0x39,
+0x858f,0xf5,
+0x8590,0x39,
+0x8591,0x12,
+0x8592,0x04,
+0x8593,0xeb,
+0x8594,0x40,
+0x8595,0x06,
+0x8596,0x7e,
+0x8597,0x03,
+0x8598,0x7f,
+0x8599,0xff,
+0x859a,0x80,
+0x859b,0x04,
+0x859c,0xae,
+0x859d,0x3b,
+0x859e,0xaf,
+0x859f,0x3c,
+0x85a0,0x12,
+0x85a1,0x05,
+0x85a2,0xd6,
+0x85a3,0xe4,
+0x85a4,0xf5,
+0x85a5,0x3a,
+0x85a6,0xf5,
+0x85a7,0x3a,
+0x85a8,0xe5,
+0x85a9,0x3a,
+0x85aa,0xd3,
+0x85ab,0x95,
+0x85ac,0x43,
+0x85ad,0x50,
+0x85ae,0x1c,
+0x85af,0x12,
+0x85b0,0x04,
+0x85b1,0x6a,
+0x85b2,0xaf,
+0x85b3,0x3a,
+0x85b4,0x75,
+0x85b5,0xf0,
+0x85b6,0x02,
+0x85b7,0xef,
+0x85b8,0x12,
+0x85b9,0x01,
+0x85ba,0x46,
+0x85bb,0xc3,
+0x85bc,0x74,
+0x85bd,0x01,
+0x85be,0x93,
+0x85bf,0x95,
+0x85c0,0x3c,
+0x85c1,0xe4,
+0x85c2,0x93,
+0x85c3,0x95,
+0x85c4,0x3b,
+0x85c5,0x50,
+0x85c6,0x04,
+0x85c7,0x05,
+0x85c8,0x3a,
+0x85c9,0x80,
+0x85ca,0xdd,
+0x85cb,0x85,
+0x85cc,0x3a,
+0x85cd,0x44,
+0x85ce,0x90,
+0x85cf,0x3f,
+0x85d0,0x01,
+0x85d1,0xe4,
+0x85d2,0xf0,
+0x85d3,0xd2,
+0x85d4,0x25,
+0x85d5,0x22,
+0x85d6,0x8e,
+0x85d7,0x3b,
+0x85d8,0x8f,
+0x85d9,0x3c,
+0x85da,0x85,
+0x85db,0x3b,
+0x85dc,0x37,
+0x85dd,0x85,
+0x85de,0x3c,
+0x85df,0x38,
+0x85e0,0xe5,
+0x85e1,0x3c,
+0x85e2,0xc4,
+0x85e3,0xf8,
+0x85e4,0x54,
+0x85e5,0x0f,
+0x85e6,0xc8,
+0x85e7,0x68,
+0x85e8,0xf5,
+0x85e9,0x3c,
+0x85ea,0xe5,
+0x85eb,0x3b,
+0x85ec,0xc4,
+0x85ed,0x54,
+0x85ee,0xf0,
+0x85ef,0x48,
+0x85f0,0xf5,
+0x85f1,0x3b,
+0x85f2,0x85,
+0x85f3,0x3b,
+0x85f4,0x0a,
+0x85f5,0x85,
+0x85f6,0x3c,
+0x85f7,0x0b,
+0x85f8,0x12,
+0x85f9,0x01,
+0x85fa,0x78,
+0x85fb,0x22,
+0x85fc,0xe5,
+0x85fd,0x29,
+0x85fe,0x70,
+0x85ff,0x03,
+0x8600,0x02,
+0x8601,0x06,
+0x8602,0xd4,
+0x8603,0xc2,
+0x8604,0xaf,
+0x8605,0xaf,
+0x8606,0x29,
+0x8607,0xe4,
+0x8608,0xf5,
+0x8609,0x29,
+0x860a,0xd2,
+0x860b,0xaf,
+0x860c,0x90,
+0x860d,0x3f,
+0x860e,0x01,
+0x860f,0xe0,
+0x8610,0xf5,
+0x8611,0x45,
+0x8612,0xa3,
+0x8613,0xe0,
+0x8614,0xf5,
+0x8615,0x39,
+0x8616,0xa3,
+0x8617,0xe0,
+0x8618,0xf5,
+0x8619,0x3a,
+0x861a,0xa3,
+0x861b,0xe0,
+0x861c,0xf5,
+0x861d,0x3b,
+0x861e,0xa3,
+0x861f,0xe0,
+0x8620,0xf5,
+0x8621,0x3c,
+0x8622,0xef,
+0x8623,0x12,
+0x8624,0x01,
+0x8625,0x52,
+0x8626,0x06,
+0x8627,0x4b,
+0x8628,0x03,
+0x8629,0x06,
+0x862a,0x5a,
+0x862b,0x05,
+0x862c,0x06,
+0x862d,0x81,
+0x862e,0x06,
+0x862f,0x06,
+0x8630,0x6f,
+0x8631,0x08,
+0x8632,0x06,
+0x8633,0xa2,
+0x8634,0x09,
+0x8635,0x06,
+0x8636,0x8e,
+0x8637,0x10,
+0x8638,0x06,
+0x8639,0xa2,
+0x863a,0x12,
+0x863b,0x06,
+0x863c,0xa7,
+0x863d,0x20,
+0x863e,0x06,
+0x863f,0xb5,
+0x8640,0x21,
+0x8641,0x06,
+0x8642,0xba,
+0x8643,0x30,
+0x8644,0x06,
+0x8645,0xc5,
+0x8646,0xd0,
+0x8647,0x00,
+0x8648,0x00,
+0x8649,0x06,
+0x864a,0xc9,
+0x864b,0x30,
+0x864c,0x05,
+0x864d,0x7b,
+0x864e,0x20,
+0x864f,0x00,
+0x8650,0x78,
+0x8651,0xd2,
+0x8652,0x07,
+0x8653,0xc2,
+0x8654,0x06,
+0x8655,0x12,
+0x8656,0x04,
+0x8657,0xc9,
+0x8658,0x80,
+0x8659,0x21,
+0x865a,0x30,
+0x865b,0x05,
+0x865c,0x6c,
+0x865d,0x20,
+0x865e,0x00,
+0x865f,0x69,
+0x8660,0xc2,
+0x8661,0x07,
+0x8662,0xd2,
+0x8663,0x06,
+0x8664,0xc2,
+0x8665,0x03,
+0x8666,0x12,
+0x8667,0x04,
+0x8668,0xe4,
+0x8669,0xc2,
+0x866a,0x04,
+0x866b,0xc2,
+0x866c,0x21,
+0x866d,0x80,
+0x866e,0x5a,
+0x866f,0x12,
+0x8670,0x04,
+0x8671,0x7c,
+0x8672,0x30,
+0x8673,0x05,
+0x8674,0x06,
+0x8675,0xe4,
+0x8676,0xf5,
+0x8677,0x09,
+0x8678,0x12,
+0x8679,0x09,
+0x867a,0xee,
+0x867b,0xc2,
+0x867c,0x21,
+0x867d,0xd2,
+0x867e,0x25,
+0x867f,0x80,
+0x8680,0x48,
+0x8681,0x30,
+0x8682,0x07,
+0x8683,0x45,
+0x8684,0x30,
+0x8685,0x06,
+0x8686,0x42,
+0x8687,0x12,
+0x8688,0x04,
+0x8689,0xc9,
+0x868a,0xd2,
+0x868b,0x21,
+0x868c,0x80,
+0x868d,0x3b,
+0x868e,0x20,
+0x868f,0x07,
+0x8690,0x03,
+0x8691,0x30,
+0x8692,0x06,
+0x8693,0x09,
+0x8694,0xe5,
+0x8695,0x45,
+0x8696,0x64,
+0x8697,0x0e,
+0x8698,0x70,
+0x8699,0x2f,
+0x869a,0x20,
+0x869b,0x00,
+0x869c,0x2c,
+0x869d,0x12,
+0x869e,0x06,
+0x869f,0xd5,
+0x86a0,0x80,
+0x86a1,0x27,
+0x86a2,0x12,
+0x86a3,0x02,
+0x86a4,0xc4,
+0x86a5,0x80,
+0x86a6,0x22,
+0x86a7,0x30,
+0x86a8,0x05,
+0x86a9,0x1f,
+0x86aa,0x20,
+0x86ab,0x07,
+0x86ac,0x1c,
+0x86ad,0x20,
+0x86ae,0x06,
+0x86af,0x19,
+0x86b0,0x12,
+0x86b1,0x0c,
+0x86b2,0xa6,
+0x86b3,0x80,
+0x86b4,0x14,
+0x86b5,0x12,
+0x86b6,0x09,
+0x86b7,0x85,
+0x86b8,0x80,
+0x86b9,0x0f,
+0x86ba,0x20,
+0x86bb,0x07,
+0x86bc,0x0c,
+0x86bd,0x20,
+0x86be,0x06,
+0x86bf,0x09,
+0x86c0,0x12,
+0x86c1,0x0d,
+0x86c2,0x3c,
+0x86c3,0x80,
+0x86c4,0x04,
+0x86c5,0xd2,
+0x86c6,0x26,
+0x86c7,0xc2,
+0x86c8,0x26,
+0x86c9,0x20,
+0x86ca,0x07,
+0x86cb,0x03,
+0x86cc,0x20,
+0x86cd,0x06,
+0x86ce,0x05,
+0x86cf,0x90,
+0x86d0,0x3f,
+0x86d1,0x01,
+0x86d2,0xe4,
+0x86d3,0xf0,
+0x86d4,0x22,
+0x86d5,0xe5,
+0x86d6,0x45,
+0x86d7,0x24,
+0x86d8,0xfe,
+0x86d9,0x60,
+0x86da,0x19,
+0x86db,0x14,
+0x86dc,0x60,
+0x86dd,0x2c,
+0x86de,0x24,
+0x86df,0x02,
+0x86e0,0x60,
+0x86e1,0x03,
+0x86e2,0x02,
+0x86e3,0x07,
+0x86e4,0xa8,
+0x86e5,0xe5,
+0x86e6,0x3c,
+0x86e7,0xd3,
+0x86e8,0x94,
+0x86e9,0x03,
+0x86ea,0x40,
+0x86eb,0x03,
+0x86ec,0x75,
+0x86ed,0x3c,
+0x86ee,0x03,
+0x86ef,0xe4,
+0x86f0,0xf5,
+0x86f1,0x09,
+0x86f2,0x80,
+0x86f3,0x0d,
+0x86f4,0xe5,
+0x86f5,0x3c,
+0x86f6,0xd3,
+0x86f7,0x94,
+0x86f8,0x05,
+0x86f9,0x40,
+0x86fa,0x03,
+0x86fb,0x75,
+0x86fc,0x3c,
+0x86fd,0x05,
+0x86fe,0x75,
+0x86ff,0x09,
+0x8700,0x01,
+0x8701,0x85,
+0x8702,0x3c,
+0x8703,0x0a,
+0x8704,0x12,
+0x8705,0x08,
+0x8706,0xfa,
+0x8707,0xd2,
+0x8708,0x20,
+0x8709,0x22,
+0x870a,0xe5,
+0x870b,0x39,
+0x870c,0xd3,
+0x870d,0x94,
+0x870e,0x28,
+0x870f,0x40,
+0x8710,0x04,
+0x8711,0x7f,
+0x8712,0x28,
+0x8713,0x80,
+0x8714,0x02,
+0x8715,0xaf,
+0x8716,0x39,
+0x8717,0x8f,
+0x8718,0x39,
+0x8719,0xe5,
+0x871a,0x3a,
+0x871b,0xd3,
+0x871c,0x94,
+0x871d,0x1e,
+0x871e,0x40,
+0x871f,0x04,
+0x8720,0x7f,
+0x8721,0x1e,
+0x8722,0x80,
+0x8723,0x02,
+0x8724,0xaf,
+0x8725,0x3a,
+0x8726,0x8f,
+0x8727,0x3a,
+0x8728,0xe5,
+0x8729,0x3b,
+0x872a,0xd3,
+0x872b,0x94,
+0x872c,0x28,
+0x872d,0x40,
+0x872e,0x04,
+0x872f,0x7f,
+0x8730,0x28,
+0x8731,0x80,
+0x8732,0x02,
+0x8733,0xaf,
+0x8734,0x3b,
+0x8735,0x8f,
+0x8736,0x3b,
+0x8737,0xe5,
+0x8738,0x3c,
+0x8739,0xd3,
+0x873a,0x94,
+0x873b,0x1e,
+0x873c,0x40,
+0x873d,0x04,
+0x873e,0x7f,
+0x873f,0x1e,
+0x8740,0x80,
+0x8741,0x02,
+0x8742,0xaf,
+0x8743,0x3c,
+0x8744,0x8f,
+0x8745,0x3c,
+0x8746,0xaf,
+0x8747,0x3a,
+0x8748,0x78,
+0x8749,0x10,
+0x874a,0x12,
+0x874b,0x04,
+0x874c,0xb7,
+0x874d,0xc0,
+0x874e,0x04,
+0x874f,0xc0,
+0x8750,0x05,
+0x8751,0xc0,
+0x8752,0x06,
+0x8753,0xc0,
+0x8754,0x07,
+0x8755,0xaf,
+0x8756,0x39,
+0x8757,0x78,
+0x8758,0x18,
+0x8759,0x12,
+0x875a,0x04,
+0x875b,0xb7,
+0x875c,0xd0,
+0x875d,0x03,
+0x875e,0xd0,
+0x875f,0x02,
+0x8760,0xd0,
+0x8761,0x01,
+0x8762,0xd0,
+0x8763,0x00,
+0x8764,0xef,
+0x8765,0x4b,
+0x8766,0xff,
+0x8767,0xee,
+0x8768,0x4a,
+0x8769,0xfe,
+0x876a,0xed,
+0x876b,0x49,
+0x876c,0xfd,
+0x876d,0xec,
+0x876e,0x48,
+0x876f,0xfc,
+0x8770,0xc0,
+0x8771,0x04,
+0x8772,0xc0,
+0x8773,0x05,
+0x8774,0xc0,
+0x8775,0x06,
+0x8776,0xc0,
+0x8777,0x07,
+0x8778,0xaf,
+0x8779,0x3b,
+0x877a,0xe4,
+0x877b,0xfc,
+0x877c,0xfd,
+0x877d,0xfe,
+0x877e,0x78,
+0x877f,0x08,
+0x8780,0x12,
+0x8781,0x01,
+0x8782,0x33,
+0x8783,0xd0,
+0x8784,0x03,
+0x8785,0xd0,
+0x8786,0x02,
+0x8787,0xd0,
+0x8788,0x01,
+0x8789,0xd0,
+0x878a,0x00,
+0x878b,0xef,
+0x878c,0x4b,
+0x878d,0xfb,
+0x878e,0xee,
+0x878f,0x4a,
+0x8790,0xfa,
+0x8791,0xed,
+0x8792,0x49,
+0x8793,0xf9,
+0x8794,0xec,
+0x8795,0x48,
+0x8796,0xf8,
+0x8797,0xaf,
+0x8798,0x3c,
+0x8799,0xeb,
+0x879a,0x4f,
+0x879b,0xf5,
+0x879c,0x2d,
+0x879d,0xea,
+0x879e,0xf5,
+0x879f,0x2c,
+0x87a0,0xe9,
+0x87a1,0xf5,
+0x87a2,0x2b,
+0x87a3,0xe8,
+0x87a4,0xf5,
+0x87a5,0x2a,
+0x87a6,0xd2,
+0x87a7,0x20,
+0x87a8,0x22,
+0x87a9,0xc0,
+0x87aa,0xe0,
+0x87ab,0xc0,
+0x87ac,0x83,
+0x87ad,0xc0,
+0x87ae,0x82,
+0x87af,0xc0,
+0x87b0,0xd0,
+0x87b1,0x75,
+0x87b2,0xd0,
+0x87b3,0x00,
+0x87b4,0xc0,
+0x87b5,0x00,
+0x87b6,0xc0,
+0x87b7,0x06,
+0x87b8,0xc0,
+0x87b9,0x07,
+0x87ba,0x90,
+0x87bb,0x37,
+0x87bc,0x08,
+0x87bd,0xe0,
+0x87be,0xf5,
+0x87bf,0x08,
+0x87c0,0xe5,
+0x87c1,0x08,
+0x87c2,0x30,
+0x87c3,0xe3,
+0x87c4,0x23,
+0x87c5,0x20,
+0x87c6,0x26,
+0x87c7,0x20,
+0x87c8,0x90,
+0x87c9,0x3a,
+0x87ca,0x00,
+0x87cb,0x74,
+0x87cc,0x81,
+0x87cd,0xf0,
+0x87ce,0x90,
+0x87cf,0x3a,
+0x87d0,0x03,
+0x87d1,0xe0,
+0x87d2,0xf5,
+0x87d3,0x3e,
+0x87d4,0xe0,
+0x87d5,0xf5,
+0x87d6,0x3d,
+0x87d7,0x90,
+0x87d8,0x3a,
+0x87d9,0x00,
+0x87da,0x74,
+0x87db,0x85,
+0x87dc,0xf0,
+0x87dd,0x90,
+0x87de,0x3a,
+0x87df,0x03,
+0x87e0,0xe0,
+0x87e1,0xf5,
+0x87e2,0x40,
+0x87e3,0xe0,
+0x87e4,0xf5,
+0x87e5,0x3f,
+0x87e6,0xd2,
+0x87e7,0x2f,
+0x87e8,0xe5,
+0x87e9,0x08,
+0x87ea,0x30,
+0x87eb,0xe5,
+0x87ec,0x56,
+0x87ed,0x90,
+0x87ee,0x30,
+0x87ef,0x1b,
+0x87f0,0xe0,
+0x87f1,0xf5,
+0x87f2,0x42,
+0x87f3,0xe5,
+0x87f4,0x41,
+0x87f5,0x24,
+0x87f6,0x02,
+0x87f7,0xff,
+0x87f8,0xe4,
+0x87f9,0x33,
+0x87fa,0xfe,
+0x87fb,0xc3,
+0x87fc,0xef,
+0x87fd,0x95,
+0x87fe,0x42,
+0x87ff,0x74,
+0x8800,0x80,
+0x8801,0xf8,
+0x8802,0x6e,
+0x8803,0x98,
+0x8804,0x50,
+0x8805,0x02,
+0x8806,0x80,
+0x8807,0x01,
+0x8808,0xc3,
+0x8809,0x92,
+0x880a,0x24,
+0x880b,0xe5,
+0x880c,0x42,
+0x880d,0x24,
+0x880e,0x02,
+0x880f,0xff,
+0x8810,0xe4,
+0x8811,0x33,
+0x8812,0xfe,
+0x8813,0xc3,
+0x8814,0xef,
+0x8815,0x95,
+0x8816,0x41,
+0x8817,0x74,
+0x8818,0x80,
+0x8819,0xf8,
+0x881a,0x6e,
+0x881b,0x98,
+0x881c,0x50,
+0x881d,0x02,
+0x881e,0x80,
+0x881f,0x02,
+0x8820,0xa2,
+0x8821,0x24,
+0x8822,0x92,
+0x8823,0x24,
+0x8824,0x30,
+0x8825,0x24,
+0x8826,0x04,
+0x8827,0xaf,
+0x8828,0x42,
+0x8829,0x80,
+0x882a,0x02,
+0x882b,0xaf,
+0x882c,0x41,
+0x882d,0x8f,
+0x882e,0x41,
+0x882f,0x30,
+0x8830,0x27,
+0x8831,0x11,
+0x8832,0x90,
+0x8833,0x33,
+0x8834,0x00,
+0x8835,0xe0,
+0x8836,0x30,
+0x8837,0x29,
+0x8838,0x05,
+0x8839,0x44,
+0x883a,0x40,
+0x883b,0xf0,
+0x883c,0x80,
+0x883d,0x03,
+0x883e,0x54,
+0x883f,0xbf,
+0x8840,0xf0,
+0x8841,0xc2,
+0x8842,0x27,
+0x8843,0xe5,
+0x8844,0x08,
+0x8845,0x30,
+0x8846,0xe1,
+0x8847,0x08,
+0x8848,0x90,
+0x8849,0x3f,
+0x884a,0x00,
+0x884b,0xe0,
+0x884c,0xf5,
+0x884d,0x29,
+0x884e,0xe4,
+0x884f,0xf0,
+0x8850,0x90,
+0x8851,0x37,
+0x8852,0x08,
+0x8853,0xe5,
+0x8854,0x08,
+0x8855,0xf0,
+0x8856,0xd0,
+0x8857,0x07,
+0x8858,0xd0,
+0x8859,0x06,
+0x885a,0xd0,
+0x885b,0x00,
+0x885c,0xd0,
+0x885d,0xd0,
+0x885e,0xd0,
+0x885f,0x82,
+0x8860,0xd0,
+0x8861,0x83,
+0x8862,0xd0,
+0x8863,0xe0,
+0x8864,0x32,
+0x8865,0x12,
+0x8866,0x04,
+0x8867,0xbe,
+0x8868,0xb5,
+0x8869,0x07,
+0x886a,0x03,
+0x886b,0xd3,
+0x886c,0x80,
+0x886d,0x01,
+0x886e,0xc3,
+0x886f,0x40,
+0x8870,0x03,
+0x8871,0x02,
+0x8872,0x08,
+0x8873,0xf9,
+0x8874,0x90,
+0x8875,0x31,
+0x8876,0x00,
+0x8877,0xe0,
+0x8878,0x54,
+0x8879,0xfe,
+0x887a,0xf0,
+0x887b,0xe0,
+0x887c,0x54,
+0x887d,0xfd,
+0x887e,0xf0,
+0x887f,0xa3,
+0x8880,0xe4,
+0x8881,0xf0,
+0x8882,0x90,
+0x8883,0x33,
+0x8884,0x00,
+0x8885,0xe0,
+0x8886,0x54,
+0x8887,0xbf,
+0x8888,0xf0,
+0x8889,0x12,
+0x888a,0x04,
+0x888b,0x8b,
+0x888c,0x90,
+0x888d,0x33,
+0x888e,0xb0,
+0x888f,0xf0,
+0x8890,0xa3,
+0x8891,0xf0,
+0x8892,0xa3,
+0x8893,0xf0,
+0x8894,0x90,
+0x8895,0x30,
+0x8896,0xb2,
+0x8897,0xe0,
+0x8898,0x44,
+0x8899,0x08,
+0x889a,0xf0,
+0x889b,0x90,
+0x889c,0x30,
+0x889d,0xb0,
+0x889e,0xe0,
+0x889f,0x44,
+0x88a0,0x01,
+0x88a1,0xf0,
+0x88a2,0xa3,
+0x88a3,0xe0,
+0x88a4,0x44,
+0x88a5,0x0c,
+0x88a6,0xf0,
+0x88a7,0x90,
+0x88a8,0x30,
+0x88a9,0xb4,
+0x88aa,0xe0,
+0x88ab,0x44,
+0x88ac,0x07,
+0x88ad,0xf0,
+0x88ae,0xe0,
+0x88af,0xf5,
+0x88b0,0x23,
+0x88b1,0x90,
+0x88b2,0x30,
+0x88b3,0xb1,
+0x88b4,0xe0,
+0x88b5,0xf5,
+0x88b6,0x21,
+0x88b7,0x90,
+0x88b8,0x39,
+0x88b9,0x01,
+0x88ba,0x74,
+0x88bb,0x35,
+0x88bc,0xf0,
+0x88bd,0x90,
+0x88be,0x39,
+0x88bf,0x00,
+0x88c0,0x74,
+0x88c1,0x20,
+0x88c2,0xf0,
+0x88c3,0x90,
+0x88c4,0x37,
+0x88c5,0x00,
+0x88c6,0x74,
+0x88c7,0xff,
+0x88c8,0xf0,
+0x88c9,0xa3,
+0x88ca,0xf0,
+0x88cb,0x90,
+0x88cc,0x37,
+0x88cd,0x00,
+0x88ce,0xe0,
+0x88cf,0x54,
+0x88d0,0xf7,
+0x88d1,0xf0,
+0x88d2,0xe0,
+0x88d3,0x54,
+0x88d4,0xdf,
+0x88d5,0xf0,
+0x88d6,0x90,
+0x88d7,0x31,
+0x88d8,0x0f,
+0x88d9,0x74,
+0x88da,0x3f,
+0x88db,0xf0,
+0x88dc,0xa3,
+0x88dd,0xe4,
+0x88de,0xf0,
+0x88df,0xa3,
+0x88e0,0x74,
+0x88e1,0x3f,
+0x88e2,0xf0,
+0x88e3,0xa3,
+0x88e4,0x74,
+0x88e5,0x01,
+0x88e6,0xf0,
+0x88e7,0x90,
+0x88e8,0x37,
+0x88e9,0x00,
+0x88ea,0xe0,
+0x88eb,0x54,
+0x88ec,0xfd,
+0x88ed,0xf0,
+0x88ee,0x90,
+0x88ef,0x37,
+0x88f0,0x08,
+0x88f1,0x74,
+0x88f2,0xff,
+0x88f3,0xf0,
+0x88f4,0xa3,
+0x88f5,0xf0,
+0x88f6,0x75,
+0x88f7,0xa8,
+0x88f8,0x01,
+0x88f9,0x22,
+0x88fa,0xe5,
+0x88fb,0x0a,
+0x88fc,0x25,
+0x88fd,0xe0,
+0x88fe,0x25,
+0x88ff,0xe0,
+0x8900,0xf5,
+0x8901,0x0b,
+0x8902,0xe5,
+0x8903,0x09,
+0x8904,0x60,
+0x8905,0x09,
+0x8906,0xe5,
+0x8907,0x0a,
+0x8908,0x75,
+0x8909,0xf0,
+0x890a,0x03,
+0x890b,0xa4,
+0x890c,0xff,
+0x890d,0x80,
+0x890e,0x02,
+0x890f,0xaf,
+0x8910,0x0b,
+0x8911,0x8f,
+0x8912,0x0c,
+0x8913,0xc3,
+0x8914,0x74,
+0x8915,0x0f,
+0x8916,0x9f,
+0x8917,0x78,
+0x8918,0x10,
+0x8919,0x12,
+0x891a,0x04,
+0x891b,0x71,
+0x891c,0xc0,
+0x891d,0x04,
+0x891e,0xc0,
+0x891f,0x05,
+0x8920,0xc0,
+0x8921,0x06,
+0x8922,0xc0,
+0x8923,0x07,
+0x8924,0xc3,
+0x8925,0x74,
+0x8926,0x14,
+0x8927,0x95,
+0x8928,0x0b,
+0x8929,0x78,
+0x892a,0x18,
+0x892b,0x12,
+0x892c,0x04,
+0x892d,0x71,
+0x892e,0xd0,
+0x892f,0x03,
+0x8930,0xd0,
+0x8931,0x02,
+0x8932,0xd0,
+0x8933,0x01,
+0x8934,0xd0,
+0x8935,0x00,
+0x8936,0xef,
+0x8937,0x4b,
+0x8938,0xff,
+0x8939,0xee,
+0x893a,0x4a,
+0x893b,0xfe,
+0x893c,0xed,
+0x893d,0x49,
+0x893e,0xfd,
+0x893f,0xec,
+0x8940,0x48,
+0x8941,0xfc,
+0x8942,0xc0,
+0x8943,0x04,
+0x8944,0xc0,
+0x8945,0x05,
+0x8946,0xc0,
+0x8947,0x06,
+0x8948,0xc0,
+0x8949,0x07,
+0x894a,0xe5,
+0x894b,0x0b,
+0x894c,0x24,
+0x894d,0x14,
+0x894e,0xff,
+0x894f,0xe4,
+0x8950,0x33,
+0x8951,0xfe,
+0x8952,0xe4,
+0x8953,0xfc,
+0x8954,0xfd,
+0x8955,0x78,
+0x8956,0x08,
+0x8957,0x12,
+0x8958,0x01,
+0x8959,0x33,
+0x895a,0xd0,
+0x895b,0x03,
+0x895c,0xd0,
+0x895d,0x02,
+0x895e,0xd0,
+0x895f,0x01,
+0x8960,0xd0,
+0x8961,0x00,
+0x8962,0xef,
+0x8963,0x4b,
+0x8964,0xfb,
+0x8965,0xee,
+0x8966,0x4a,
+0x8967,0xfa,
+0x8968,0xed,
+0x8969,0x49,
+0x896a,0xf9,
+0x896b,0xec,
+0x896c,0x48,
+0x896d,0xf8,
+0x896e,0xe5,
+0x896f,0x0c,
+0x8970,0x24,
+0x8971,0x0f,
+0x8972,0xff,
+0x8973,0xe4,
+0x8974,0x33,
+0x8975,0xfe,
+0x8976,0xeb,
+0x8977,0x4f,
+0x8978,0xf5,
+0x8979,0x2d,
+0x897a,0xea,
+0x897b,0x4e,
+0x897c,0xf5,
+0x897d,0x2c,
+0x897e,0xe9,
+0x897f,0xf5,
+0x8980,0x2b,
+0x8981,0xe8,
+0x8982,0xf5,
+0x8983,0x2a,
+0x8984,0x22,
+0x8985,0xe5,
+0x8986,0x45,
+0x8987,0x64,
+0x8988,0x01,
+0x8989,0x70,
+0x898a,0x50,
+0x898b,0x12,
+0x898c,0x04,
+0x898d,0x6a,
+0x898e,0xe5,
+0x898f,0x44,
+0x8990,0x12,
+0x8991,0x04,
+0x8992,0x18,
+0x8993,0xfe,
+0x8994,0xe4,
+0x8995,0x8f,
+0x8996,0x3c,
+0x8997,0x8e,
+0x8998,0x3b,
+0x8999,0xf5,
+0x899a,0x3a,
+0x899b,0xf5,
+0x899c,0x39,
+0x899d,0x12,
+0x899e,0x04,
+0x899f,0x44,
+0x89a0,0x7b,
+0x89a1,0xff,
+0x89a2,0xfa,
+0x89a3,0xf9,
+0x89a4,0xf8,
+0x89a5,0x12,
+0x89a6,0x04,
+0x89a7,0x39,
+0x89a8,0xc0,
+0x89a9,0x04,
+0x89aa,0xc0,
+0x89ab,0x05,
+0x89ac,0xc0,
+0x89ad,0x06,
+0x89ae,0xc0,
+0x89af,0x07,
+0x89b0,0x12,
+0x89b1,0x04,
+0x89b2,0x10,
+0x89b3,0xab,
+0x89b4,0x07,
+0x89b5,0xfa,
+0x89b6,0xe4,
+0x89b7,0xf9,
+0x89b8,0xf8,
+0x89b9,0xd0,
+0x89ba,0x07,
+0x89bb,0xd0,
+0x89bc,0x06,
+0x89bd,0xd0,
+0x89be,0x05,
+0x89bf,0xd0,
+0x89c0,0x04,
+0x89c1,0x12,
+0x89c2,0x04,
+0x89c3,0x9f,
+0x89c4,0x85,
+0x89c5,0x3c,
+0x89c6,0x39,
+0x89c7,0x85,
+0x89c8,0x44,
+0x89c9,0x3a,
+0x89ca,0x12,
+0x89cb,0x04,
+0x89cc,0x6a,
+0x89cd,0xe5,
+0x89ce,0x44,
+0x89cf,0x12,
+0x89d0,0x04,
+0x89d1,0xd4,
+0x89d2,0xe4,
+0x89d3,0x93,
+0x89d4,0xf5,
+0x89d5,0x3b,
+0x89d6,0x74,
+0x89d7,0x01,
+0x89d8,0x93,
+0x89d9,0xf5,
+0x89da,0x3c,
+0x89db,0x90,
+0x89dc,0x3f,
+0x89dd,0x02,
+0x89de,0xe5,
+0x89df,0x39,
+0x89e0,0xf0,
+0x89e1,0xa3,
+0x89e2,0xe5,
+0x89e3,0x3a,
+0x89e4,0xf0,
+0x89e5,0xa3,
+0x89e6,0xe5,
+0x89e7,0x3b,
+0x89e8,0xf0,
+0x89e9,0xa3,
+0x89ea,0xe5,
+0x89eb,0x3c,
+0x89ec,0xf0,
+0x89ed,0x22,
+0x89ee,0xe5,
+0x89ef,0x09,
+0x89f0,0xd3,
+0x89f1,0x95,
+0x89f2,0x43,
+0x89f3,0x40,
+0x89f4,0x01,
+0x89f5,0x22,
+0x89f6,0x12,
+0x89f7,0x04,
+0x89f8,0x6a,
+0x89f9,0xe5,
+0x89fa,0x09,
+0x89fb,0x12,
+0x89fc,0x04,
+0x89fd,0xd4,
+0x89fe,0xe4,
+0x89ff,0x93,
+0x8a00,0xfe,
+0x8a01,0x74,
+0x8a02,0x01,
+0x8a03,0x93,
+0x8a04,0xff,
+0x8a05,0x4e,
+0x8a06,0x60,
+0x8a07,0x21,
+0x8a08,0x8e,
+0x8a09,0x37,
+0x8a0a,0x8f,
+0x8a0b,0x38,
+0x8a0c,0xef,
+0x8a0d,0xc4,
+0x8a0e,0xf8,
+0x8a0f,0x54,
+0x8a10,0x0f,
+0x8a11,0xc8,
+0x8a12,0x68,
+0x8a13,0xff,
+0x8a14,0xee,
+0x8a15,0xc4,
+0x8a16,0x54,
+0x8a17,0xf0,
+0x8a18,0x48,
+0x8a19,0xfe,
+0x8a1a,0x43,
+0x8a1b,0x07,
+0x8a1c,0x0d,
+0x8a1d,0x8e,
+0x8a1e,0x0a,
+0x8a1f,0x8f,
+0x8a20,0x0b,
+0x8a21,0x12,
+0x8a22,0x01,
+0x8a23,0x78,
+0x8a24,0x30,
+0x8a25,0x23,
+0x8a26,0x22,
+0x8a27,0xc3,
+0x8a28,0x22,
+0x8a29,0x75,
+0x8a2a,0x0a,
+0x8a2b,0x00,
+0x8a2c,0x75,
+0x8a2d,0x0b,
+0x8a2e,0x0d,
+0x8a2f,0x12,
+0x8a30,0x01,
+0x8a31,0x78,
+0x8a32,0x30,
+0x8a33,0x23,
+0x8a34,0x02,
+0x8a35,0xc3,
+0x8a36,0x22,
+0x8a37,0x75,
+0x8a38,0x0a,
+0x8a39,0x00,
+0x8a3a,0x75,
+0x8a3b,0x0b,
+0x8a3c,0x64,
+0x8a3d,0x12,
+0x8a3e,0x0c,
+0x8a3f,0x67,
+0x8a40,0x75,
+0x8a41,0x0a,
+0x8a42,0x80,
+0x8a43,0x75,
+0x8a44,0x0b,
+0x8a45,0x00,
+0x8a46,0x12,
+0x8a47,0x01,
+0x8a48,0x78,
+0x8a49,0x85,
+0x8a4a,0x09,
+0x8a4b,0x44,
+0x8a4c,0xd3,
+0x8a4d,0x22,
+0x8a4e,0xc2,
+0x8a4f,0x25,
+0x8a50,0x20,
+0x8a51,0x05,
+0x8a52,0x05,
+0x8a53,0x75,
+0x8a54,0x09,
+0x8a55,0xee,
+0x8a56,0x80,
+0x8a57,0x36,
+0x8a58,0x20,
+0x8a59,0x07,
+0x8a5a,0x08,
+0x8a5b,0x20,
+0x8a5c,0x06,
+0x8a5d,0x05,
+0x8a5e,0xe4,
+0x8a5f,0xf5,
+0x8a60,0x09,
+0x8a61,0x80,
+0x8a62,0x2b,
+0x8a63,0x20,
+0x8a64,0x07,
+0x8a65,0x08,
+0x8a66,0x30,
+0x8a67,0x06,
+0x8a68,0x05,
+0x8a69,0x75,
+0x8a6a,0x09,
+0x8a6b,0x20,
+0x8a6c,0x80,
+0x8a6d,0x20,
+0x8a6e,0x30,
+0x8a6f,0x00,
+0x8a70,0x05,
+0x8a71,0x75,
+0x8a72,0x09,
+0x8a73,0x01,
+0x8a74,0x80,
+0x8a75,0x18,
+0x8a76,0xe5,
+0x8a77,0x20,
+0x8a78,0x54,
+0x8a79,0x07,
+0x8a7a,0xff,
+0x8a7b,0xbf,
+0x8a7c,0x06,
+0x8a7d,0x0d,
+0x8a7e,0x30,
+0x8a7f,0x21,
+0x8a80,0x04,
+0x8a81,0x7f,
+0x8a82,0x12,
+0x8a83,0x80,
+0x8a84,0x02,
+0x8a85,0x7f,
+0x8a86,0x02,
+0x8a87,0x8f,
+0x8a88,0x09,
+0x8a89,0x80,
+0x8a8a,0x03,
+0x8a8b,0x75,
+0x8a8c,0x09,
+0x8a8d,0xfe,
+0x8a8e,0x90,
+0x8a8f,0x3f,
+0x8a90,0x07,
+0x8a91,0xe5,
+0x8a92,0x09,
+0x8a93,0xf0,
+0x8a94,0x90,
+0x8a95,0x3f,
+0x8a96,0x06,
+0x8a97,0xe5,
+0x8a98,0x44,
+0x8a99,0xf0,
+0x8a9a,0x22,
+0x8a9b,0x85,
+0x8a9c,0x0d,
+0x8a9d,0x0e,
+0x8a9e,0x7f,
+0x8a9f,0x08,
+0x8aa0,0xe5,
+0x8aa1,0x0e,
+0x8aa2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0x05,
+0x8af2,0xfc,
+0x8af3,0x30,
+0x8af4,0x20,
+0x8af5,0x03,
+0x8af6,0x12,
+0x8af7,0x02,
+0x8af8,0xc4,
+0x8af9,0x30,
+0x8afa,0x25,
+0x8afb,0x03,
+0x8afc,0x12,
+0x8afd,0x0a,
+0x8afe,0x4e,
+0x8aff,0x30,
+0x8b00,0x2f,
+0x8b01,0xee,
+0x8b02,0xc2,
+0x8b03,0x2f,
+0x8b04,0xd2,
+0x8b05,0x26,
+0x8b06,0x30,
+0x8b07,0x00,
+0x8b08,0x05,
+0x8b09,0x12,
+0x8b0a,0x0b,
+0x8b0b,0x7b,
+0x8b0c,0x80,
+0x8b0d,0x09,
+0x8b0e,0x20,
+0x8b0f,0x07,
+0x8b10,0x06,
+0x8b11,0x30,
+0x8b12,0x06,
+0x8b13,0x03,
+0x8b14,0x12,
+0x8b15,0x04,
+0x8b16,0xf5,
+0x8b17,0xc2,
+0x8b18,0x26,
+0x8b19,0x80,
+0x8b1a,0xd5,
+0x8b1b,0xe5,
+0x8b1c,0x44,
+0x8b1d,0x70,
+0x8b1e,0x19,
+0x8b1f,0x12,
+0x8b20,0x0d,
+0x8b21,0x4b,
+0x8b22,0xc2,
+0x8b23,0x30,
+0x8b24,0x12,
+0x8b25,0x0b,
+0x8b26,0xd2,
+0x8b27,0xc2,
+0x8b28,0x30,
+0x8b29,0x12,
+0x8b2a,0x0c,
+0x8b2b,0x89,
+0x8b2c,0xc2,
+0x8b2d,0x03,
+0x8b2e,0x12,
+0x8b2f,0x0c,
+0x8b30,0xfe,
+0x8b31,0xd2,
+0x8b32,0x02,
+0x8b33,0xd2,
+0x8b34,0x01,
+0x8b35,0xd2,
+0x8b36,0x00,
+0x8b37,0x22,
+0x8b38,0x30,
+0x8b39,0x03,
+0x8b3a,0x08,
+0x8b3b,0xc2,
+0x8b3c,0x03,
+0x8b3d,0xc2,
+0x8b3e,0x04,
+0x8b3f,0x12,
+0x8b40,0x04,
+0x8b41,0xe4,
+0x8b42,0x22,
+0x8b43,0xe4,
+0x8b44,0xf5,
+0x8b45,0x09,
+0x8b46,0x12,
+0x8b47,0x09,
+0x8b48,0xee,
+0x8b49,0xd2,
+0x8b4a,0x03,
+0x8b4b,0x22,
+0x8b4c,0x36,
+0x8b4d,0x0c,
+0x8b4e,0x04,
+0x8b4f,0x00,
+0x8b50,0x00,
+0x8b51,0x00,
+0x8b52,0xc8,
+0x8b53,0x01,
+0x8b54,0x2c,
+0x8b55,0x01,
+0x8b56,0x5e,
+0x8b57,0x01,
+0x8b58,0x8b,
+0x8b59,0x01,
+0x8b5a,0xb8,
+0x8b5b,0x01,
+0x8b5c,0xe5,
+0x8b5d,0x02,
+0x8b5e,0x12,
+0x8b5f,0x02,
+0x8b60,0x3f,
+0x8b61,0x02,
+0x8b62,0x6c,
+0x8b63,0x02,
+0x8b64,0x99,
+0x8b65,0x02,
+0x8b66,0xc6,
+0x8b67,0x02,
+0x8b68,0xf3,
+0x8b69,0x07,
+0x8b6a,0x00,
+0x8b6b,0x02,
+0x8b6c,0x4e,
+0x8b6d,0x02,
+0x8b6e,0x6c,
+0x8b6f,0x02,
+0x8b70,0x8a,
+0x8b71,0x02,
+0x8b72,0xa8,
+0x8b73,0x02,
+0x8b74,0xc6,
+0x8b75,0x02,
+0x8b76,0xe4,
+0x8b77,0x03,
+0x8b78,0x02,
+0x8b79,0x03,
+0x8b7a,0x20,
+0x8b7b,0xe5,
+0x8b7c,0x20,
+0x8b7d,0x54,
+0x8b7e,0x07,
+0x8b7f,0xff,
+0x8b80,0xbf,
+0x8b81,0x01,
+0x8b82,0x03,
+0x8b83,0x02,
+0x8b84,0x0b,
+0x8b85,0x1b,
+0x8b86,0xe5,
+0x8b87,0x20,
+0x8b88,0x54,
+0x8b89,0x07,
+0x8b8a,0xff,
+0x8b8b,0xbf,
+0x8b8c,0x07,
+0x8b8d,0x03,
+0x8b8e,0x02,
+0x8b8f,0x0c,
+0x8b90,0x44,
+0x8b91,0xe5,
+0x8b92,0x20,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,0x09,
+0x8d6f,0xee,
+0x8d70,0x22,
+0x3F00,0x00,
+0x3F01,0x00,
+0x3F02,0x00,
+0x3F03,0x00,
+0x3F04,0x00,
+0x3F05,0x00,
+0x3F06,0x00,
+0x3F07,0xFF,
+0x3104,0x00,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.c b/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.c
new file mode 100755
index 00000000..3b913277
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.c
@@ -0,0 +1,209 @@
+/*
+ * Driver for ov3660 CMOS Image Sensor from Omnivision
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov3660.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16addr(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, ov3660_640_480_regs),
+ CMOS_WIN_SIZE("QXGA", 2048, 1536, ov3660_2048_1536_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov3660_wb_auto;
+ size = ARRAY_SIZE(ov3660_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov3660_wb_incandescent;
+ size = ARRAY_SIZE(ov3660_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov3660_wb_daylight;
+ size = ARRAY_SIZE(ov3660_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov3660_wb_cloudy;
+ size = ARRAY_SIZE(ov3660_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov3660_wb_fluorescent;
+ size = ARRAY_SIZE(ov3660_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win)
+ return -EINVAL;
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ /*
+ * select suitable win
+ */
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data;
+
+ data = sensor_read(sd, 0x300a);
+ data <<= 8;
+ data |= sensor_read(sd, 0x300b);
+
+ return (data == sd->id) ? 0 : 1;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (!sensor_identify(sd))
+ return -1;
+
+ sensor_write(sd, 0x3103, 0x11);
+ sensor_write(sd, 0x3008, 0x82);
+ msleep(5);
+ sensor_write_array(sd, ov3660_default_regs_init,
+ ARRAY_SIZE(ov3660_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write(sd, 0x3017, 0x80);
+ sensor_write(sd, 0x3018, 0x03);
+ return 0;
+}
+
+static struct cmos_subdev_ops ov3660_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+};
+
+struct cmos_subdev ov3660 = {
+ .name = "ov3660",
+ .i2c_addr = 0x3c,
+ .id = 0x3660,
+ .max_width = 2048,
+ .max_height = 1536,
+ .ops = &ov3660_ops,
+};
+
+static int __init ov3660_init(void)
+{
+ return cmos_register_sudbdev(&ov3660);
+}
+
+static void __exit ov3660_exit(void)
+{
+ cmos_unregister_subdev(&ov3660);
+ return;
+}
+
+module_init(ov3660_init);
+module_exit(ov3660_exit);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.h b/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.h
new file mode 100755
index 00000000..bbe1169c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov3660/ov3660.h
@@ -0,0 +1,598 @@
+#ifndef OV3660_H
+#define OV3660_H
+
+// Scene Mode
+uint32_t ov3660_scene_mode_auto[] = {
+};
+
+uint32_t ov3660_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint32_t ov3660_wb_auto [] = {
+};
+
+uint32_t ov3660_wb_incandescent [] = {
+};
+
+uint32_t ov3660_wb_fluorescent [] = {
+};
+
+uint32_t ov3660_wb_daylight [] = {
+};
+
+uint32_t ov3660_wb_cloudy [] = {
+};
+
+uint32_t ov3660_wb_tungsten [] = {
+};
+
+
+// Exposure
+uint32_t ov3660_exposure_neg6[] = {
+};
+
+uint32_t ov3660_exposure_neg3[] = {
+};
+
+uint32_t ov3660_exposure_zero[] = {
+};
+
+uint32_t ov3660_exposure_pos3[] = {
+};
+
+uint32_t ov3660_exposure_pos6[] = {
+};
+
+/*
+* The color effect settings
+*/
+uint32_t ov3660_colorfx_none[] = {
+};
+
+uint32_t ov3660_colorfx_bw[] = {
+};
+
+uint32_t ov3660_colorfx_sepia[] = {
+};
+
+uint32_t ov3660_colorfx_negative[] = {
+};
+
+uint32_t ov3660_colorfx_emboss[] = {
+};
+
+uint32_t ov3660_colorfx_sketch[] = {
+};
+
+uint32_t ov3660_colorfx_sky_blue[] = {
+};
+
+uint32_t ov3660_colorfx_grass_green[] = {
+};
+
+uint32_t ov3660_colorfx_skin_whiten[] = {
+};
+
+uint32_t ov3660_colorfx_vivid[] = {
+};
+
+// Brightness
+uint32_t ov3660_brightness_neg4[] = {
+};
+
+uint32_t ov3660_brightness_neg3[] = {
+};
+
+uint32_t ov3660_brightness_neg2[] = {
+};
+
+uint32_t ov3660_brightness_neg1[] = {
+};
+
+uint32_t ov3660_brightness_zero[] = {
+};
+
+uint32_t ov3660_brightness_pos1[] = {
+};
+
+uint32_t ov3660_brightness_pos2[] = {
+};
+
+uint32_t ov3660_brightness_pos3[] = {
+};
+
+uint32_t ov3660_brightness_pos4[] = {
+};
+
+// Contrast
+uint32_t ov3660_contrast_neg4[] = {
+};
+
+uint32_t ov3660_contrast_neg3[] = {
+};
+
+uint32_t ov3660_contrast_neg2[] = {
+};
+
+uint32_t ov3660_contrast_neg1[] = {
+};
+
+uint32_t ov3660_contrast_zero[] = {
+};
+
+uint32_t ov3660_contrast_pos1[] = {
+};
+
+uint32_t ov3660_contrast_pos2[] = {
+};
+
+uint32_t ov3660_contrast_pos3[] = {
+};
+
+uint32_t ov3660_contrast_pos4[] = {
+};
+
+// Saturation
+uint32_t ov3660_saturation_neg4[] = {
+};
+
+uint32_t ov3660_saturation_neg3[] = {
+};
+
+uint32_t ov3660_saturation_neg2[] = {
+};
+
+uint32_t ov3660_saturation_neg1[] = {
+};
+
+uint32_t ov3660_saturation_zero[] = {
+};
+
+uint32_t ov3660_saturation_pos1[] = {
+};
+
+uint32_t ov3660_saturation_pos2[] = {
+};
+
+uint32_t ov3660_saturation_pos3[] = {
+};
+
+uint32_t ov3660_saturation_pos4[] = {
+};
+
+
+
+uint32_t ov3660_640_480_regs[]={
+0x3008,0x42,
+
+0x3503,0x00,
+0x3a00,0x3c,
+
+0x5302,0x38,
+0x5303,0x18,
+0x5306,0x18,
+0x5307,0x28,
+
+0x3800,0x00,
+0x3801,0x00,
+0x3802,0x00,
+0x3803,0x00,
+0x3804,0x08,
+0x3805,0x1f,
+0x3806,0x06,
+0x3807,0x09,
+0x3808,0x02,
+0x3809,0x80,
+0x380a,0x01,
+0x380b,0xe0,
+0x3810,0x00,
+0x3811,0x08,
+0x3812,0x00,
+0x3813,0x02,
+0x3814,0x31,
+0x3815,0x31,
+
+/*0x3826,0x23,
+0x303a,0x00,
+0x303b,0x1b,
+0x303c,0x11,//30fps
+0x303d,0x30,
+0x3824,0x02,
+0x460c,0x22,
+
+0x380c,0x08,
+0x380d,0xfc,
+0x380e,0x03,
+0x380f,0x10,
+
+0x3a08,0x00,
+0x3a09,0xeb,
+0x3a0e,0x03,
+0x3a0a,0x00,
+0x3a0b,0xc4,
+0x3a0d,0x04,*/
+
+0x3826,0x23,
+0x303a,0x00,
+0x303b,0x17,//1b
+0x303c,0x11,//25fps
+0x303d,0x30,
+0x3824,0x02,
+0x460c,0x22,
+
+0x380c,0x08,
+0x380d,0xfc,
+0x380e,0x03,
+0x380f,0x20,//10
+
+0x3c01,0x80,
+0x3c00,0x04,
+0x3a08,0x00,
+0x3a09,0xc8,//eb
+0x3a0e,0x04,//03
+0x3a0a,0x00,
+0x3a0b,0xa7,//c4
+0x3a0d,0x04,
+
+0x3a00,0x3c,//25fps-20fps
+0x3a14,0x03,//04
+0x3a15,0xea,//98
+0x3a02,0x03,//04
+0x3a03,0xea,//98
+
+0x3820,0x01,
+0x3821,0x07,
+0x4514,0xbb,
+0x3618,0x00,
+0x3708,0x66,
+0x3709,0x12,
+0x4520,0x0b,
+
+0x5001,0xa3,
+
+0x3008,0x02,
+};
+
+uint32_t ov3660_2048_1536_regs[]={
+
+0x3008,0x42,
+//0x3503,0x07,
+//0x3a00,0x38,
+
+0x5001,0x83,
+
+0x5302,0x38,
+0x5303,0x18,
+0x5306,0x1c,
+0x5307,0x2c,
+
+0x3800,0x00,
+0x3801,0x00,
+0x3802,0x00,
+0x3803,0x00,
+0x3804,0x08,
+0x3805,0x1f,
+0x3806,0x06,
+0x3807,0x0b,
+0x3808,0x08,
+0x3809,0x00,
+0x380a,0x06,
+0x380b,0x00,
+0x3810,0x00,
+0x3811,0x10,
+0x3812,0x00,
+0x3813,0x06,
+0x3814,0x11,
+0x3815,0x11,
+
+0x3826,0x23,
+0x303a,0x00,
+0x303b,0x17,//1b
+0x303c,0x12,//6.25fps
+0x303d,0x30,
+0x3824,0x01,
+0x460c,0x20,
+
+0x380c,0x08,
+0x380d,0xfc,
+0x380e,0x06,
+0x380f,0x40,//20
+
+0x3a08,0x00,
+0x3a09,0x64,//76
+0x3a0e,0x10,//0d
+0x3a0a,0x00,
+0x3a0b,0x53,//62
+0x3a0d,0x13,//10
+
+0x3820,0x40,
+0x3821,0x06,
+0x4514,0x00,
+0x3618,0x78,
+0x3708,0x63,
+0x3709,0x12,
+0x4520,0xb0,
+
+0x3008,0x02,
+};
+
+uint32_t ov3660_default_regs_init[]={
+//0x3008,0x82,//reset 5m delay
+
+0x3103,0x13,
+0x3008,0x42,
+0x3017,0xff,
+0x3018,0xff,
+0x302c,0x03,
+
+0x3611,0x01,
+0x3612,0x2d,
+
+0x3032,0x00,
+0x3614,0x80,
+0x3618,0x00,
+0x3619,0x75,
+0x3622,0x80,
+0x3623,0x00,
+0x3624,0x03,
+0x3630,0x52,
+0x3632,0x07,
+0x3633,0xd2,
+0x3704,0x80,
+0x3708,0x66,
+0x3709,0x12,
+0x370b,0x12,
+0x3717,0x00,
+0x371b,0x60,
+0x371c,0x00,
+0x3901,0x13,
+
+0x3600,0x08,
+0x3620,0x43,
+0x3702,0x20,
+0x3739,0x48,
+0x3730,0x20,
+0x370c,0x0c,
+
+0x3a18,0x00,
+0x3a19,0xf8,
+
+0x3000,0x10,
+0x3002,0x1c,
+0x3004,0xef,
+0x3006,0xc3,
+
+0x6700,0x05,
+0x6701,0x19,
+0x6702,0xfd,
+0x6703,0xd1,
+0x6704,0xff,
+0x6705,0xff,
+
+0x3800,0x00,
+0x3801,0x00,
+0x3802,0x00,
+0x3803,0x00,
+0x3804,0x08,
+0x3805,0x1f,
+0x3806,0x06,
+0x3807,0x09,
+0x3808,0x02,
+0x3809,0x80,
+0x380a,0x01,
+0x380b,0xe0,
+0x3810,0x00,
+0x3811,0x08,
+0x3812,0x00,
+0x3813,0x02,
+0x3814,0x31,
+0x3815,0x31,
+
+0x3826,0x23,
+0x303a,0x00,
+0x303b,0x17,//1b
+0x303c,0x11,//25fps
+0x303d,0x30,
+0x3824,0x02,
+0x460c,0x22,
+
+0x380c,0x08,
+0x380d,0xfc,
+0x380e,0x03,
+0x380f,0x20,//10
+
+0x3c01,0x80,
+0x3c00,0x04,
+0x3a08,0x00,
+0x3a09,0xc8,//eb
+0x3a0e,0x04,//03
+0x3a0a,0x00,
+0x3a0b,0xa7,//c4
+0x3a0d,0x04,
+
+0x3a00,0x3c,//25fps-20fps
+0x3a14,0x03,//04
+0x3a15,0xea,//98
+0x3a02,0x03,//04
+0x3a03,0xea,//98
+
+0x4300,0x30,
+0x440e,0x08,
+0x4520,0x0b,
+0x460b,0x37,
+0x4713,0x02,
+0x471c,0xd0,
+0x5086,0x00,
+
+0x5001,0x03,
+0x5002,0x00,
+0x501f,0x00,
+
+0x3820,0x01,
+0x3821,0x07,
+0x4514,0xbb,
+0x3008,0x02,
+
+0x5180,0xff,
+0x5181,0xf2,
+0x5182,0x00,
+0x5183,0x14,
+0x5184,0x25,
+0x5185,0x24,
+0x5186,0x16,
+0x5187,0x16,
+0x5188,0x16,
+0x5189,0x68,
+0x518a,0x60,
+0x518b,0xe0,
+0x518c,0xb2,
+0x518d,0x42,
+0x518e,0x35,
+0x518f,0x56,
+0x5190,0x56,
+0x5191,0xf8,
+0x5192,0x04,
+0x5193,0x70,
+0x5194,0xf0,
+0x5195,0xf0,
+0x5196,0x03,
+0x5197,0x01,
+0x5198,0x04,
+0x5199,0x12,
+0x519a,0x04,
+0x519b,0x00,
+0x519c,0x06,
+0x519d,0x82,
+0x519e,0x38,
+
+0x5381,0x1c,
+0x5382,0x5a,
+0x5383,0x12,
+0x5384,0x02,
+0x5385,0x6f,
+0x5386,0x71,
+0x5387,0x7c,
+0x5388,0x6a,
+0x5389,0x12,
+0x538a,0x01,
+0x538b,0x98,
+
+0x5481,0x06,
+0x5482,0x0e,
+0x5483,0x1e,
+0x5484,0x42,
+0x5485,0x54,
+0x5486,0x68,
+0x5487,0x76,
+0x5488,0x82,
+0x5489,0x8e,
+0x548a,0x9b,
+0x548b,0xac,
+0x548c,0xba,
+0x548d,0xd0,
+0x548e,0xe3,
+0x548f,0xf6,
+0x5490,0x11,
+
+0x5000,0xa7,
+0x5800,0x17,
+0x5801,0x0C,
+0x5802,0x0B,
+0x5803,0x0C,
+0x5804,0x10,
+0x5805,0x1D,
+0x5806,0x07,
+0x5807,0x05,
+0x5808,0x04,
+0x5809,0x04,
+0x580a,0x07,
+0x580b,0x0C,
+0x580c,0x05,
+0x580d,0x02,
+0x580e,0x00,
+0x580f,0x00,
+0x5810,0x04,
+0x5811,0x09,
+0x5812,0x05,
+0x5813,0x02,
+0x5814,0x00,
+0x5815,0x01,
+0x5816,0x04,
+0x5817,0x0A,
+0x5818,0x09,
+0x5819,0x06,
+0x581a,0x05,
+0x581b,0x06,
+0x581c,0x09,
+0x581d,0x0E,
+0x581e,0x1B,
+0x581f,0x0F,
+0x5820,0x0E,
+0x5821,0x10,
+0x5822,0x13,
+0x5823,0x24,
+0x5824,0x52,
+0x5825,0x23,
+0x5826,0x13,
+0x5827,0x33,
+0x5828,0x43,
+0x5829,0x24,
+0x582a,0x12,
+0x582b,0x22,
+0x582c,0x12,
+0x582d,0x14,
+0x582e,0x13,
+0x582f,0x31,
+0x5830,0x40,
+0x5831,0x31,
+0x5832,0x03,
+0x5833,0x24,
+0x5834,0x23,
+0x5835,0x22,
+0x5836,0x23,
+0x5837,0x14,
+0x5838,0x42,
+0x5839,0x23,
+0x583a,0x13,
+0x583b,0x23,
+0x583c,0x53,
+0x583d,0xDF,
+
+0x3a0f,0x38,
+0x3a10,0x30,
+0x3a1b,0x38,
+0x3a1e,0x30,
+0x3a11,0x70,
+0x3a1f,0x14,
+
+0x5302,0x38,
+0x5303,0x18,
+0x5306,0x18,
+0x5307,0x28,
+
+0x4002,0xc5,
+0x4003,0x81,
+0x4005,0x12,
+
+0x5688,0x11,
+0x5689,0x11,
+0x568a,0x11,
+0x568b,0x11,
+0x568c,0x11,
+0x568d,0x11,
+0x568e,0x11,
+0x568f,0x11,
+
+0x5001,0xa3,
+0x5580,0x06,
+0x5588,0x00,
+0x5583,0x40,
+0x5584,0x2c,
+
+//0x3611,0x01,// remove interference fringe
+//0x3612,0x2d,
+};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640-mid8-wms8368.h b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640-mid8-wms8368.h
new file mode 100755
index 00000000..ce07751a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640-mid8-wms8368.h
@@ -0,0 +1,1296 @@
+#ifndef OV5640_H
+#define OV5640_H
+
+#include "ov5640_firmware.h"
+
+
+// Scene Mode
+uint32_t ov5640_scene_mode_auto[] = {
+ 0x3a00, 0x3c,
+ 0x3a02, 0x0b,
+ 0x3a03, 0x88,
+ 0x3a14, 0x0b,
+ 0x3a15, 0x88,
+};
+
+uint32_t ov5640_scene_mode_night[] = {
+ 0x3a00, 0x3c,
+ 0x3a02, 0x17,
+ 0x3a03, 0x10,
+ 0x3a14, 0x17,
+ 0x3a15, 0x10,
+};
+
+
+// White Balance
+uint32_t ov5640_wb_auto [] = {
+ 0x3406, 0x00,
+};
+
+uint32_t ov5640_wb_incandescent [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x05,
+ 0x3401, 0x48,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x07,
+ 0x3405, 0xcf,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_fluorescent [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x05,
+ 0x3401, 0x8c,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x06,
+ 0x3405, 0xe8,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_daylight [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x06,
+ 0x3401, 0x1c,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0xf3,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_cloudy [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x06,
+ 0x3401, 0x48,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0xd3,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_tungsten [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x04,
+ 0x3401, 0x10,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x08,
+ 0x3405, 0x40,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+
+// Exposure
+uint32_t ov5640_exposure_neg6[] = {
+ 0x3a0f, 0x20,
+ 0x3a10, 0x18,
+ 0x3a11, 0x41,
+ 0x3a1b, 0x20,
+ 0x3a1e, 0x18,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_neg3[] = {
+ 0x3a0f, 0x28,
+ 0x3a10, 0x20,
+ 0x3a11, 0x51,
+ 0x3a1b, 0x28,
+ 0x3a1e, 0x20,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_zero[] = {
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_pos3[] = {
+ 0x3a0f, 0x40,
+ 0x3a10, 0x38,
+ 0x3a11, 0x71,
+ 0x3a1b, 0x40,
+ 0x3a1e, 0x38,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_pos6[] = {
+ 0x3a0f, 0x50,
+ 0x3a10, 0x48,
+ 0x3a11, 0x90,
+ 0x3a1b, 0x50,
+ 0x3a1e, 0x48,
+ 0x3a1f, 0x20,
+};
+
+/*
+ * The color effect settings
+ */
+uint32_t ov5640_colorfx_none[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x06,
+ 0x5583, 0x40,
+ 0x5584, 0x10,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_bw[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x1e,
+ 0x5583, 0x80,
+ 0x5584, 0x80,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_sepia[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x1e,
+ 0x5583, 0x40,
+ 0x5584, 0xa0,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_negative[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x46,
+ 0x5583, 0x40,
+ 0x5584, 0x10,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_emboss[] = {
+};
+
+uint32_t ov5640_colorfx_sketch[] = {
+};
+
+uint32_t ov5640_colorfx_sky_blue[] = {
+};
+
+uint32_t ov5640_colorfx_grass_green[] = {
+};
+
+uint32_t ov5640_colorfx_skin_whiten[] = {
+};
+
+uint32_t ov5640_colorfx_vivid[] = {
+};
+
+// Brightness
+uint32_t ov5640_brightness_neg4[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x40,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg3[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x30,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg2[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x20,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg1[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x10,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_zero[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x00,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+
+};
+
+uint32_t ov5640_brightness_pos1[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x10,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos2[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x20,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos3[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x30,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos4[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x40,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+// Contrast
+uint32_t ov5640_contrast_neg4[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x10,
+ 0x5585, 0x10,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg3[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x14,
+ 0x5585, 0x14,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg2[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x18,
+ 0x5585, 0x18,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg1[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x1c,
+ 0x5585, 0x1c,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_zero[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x20,
+ 0x5585, 0x00,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos1[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x24,
+ 0x5585, 0x10,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos2[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x28,
+ 0x5585, 0x18,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos3[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x2c,
+ 0x5585, 0x1c,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos4[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x30,
+ 0x5585, 0x20,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+// Saturation
+uint32_t ov5640_saturation_neg4[] = {
+ 0x5583, 0x20,
+};
+
+uint32_t ov5640_saturation_neg3[] = {
+ 0x5583, 0x28,
+};
+
+uint32_t ov5640_saturation_neg2[] = {
+ 0x5583, 0x30,
+};
+
+uint32_t ov5640_saturation_neg1[] = {
+ 0x5583, 0x38,
+};
+
+uint32_t ov5640_saturation_zero[] = {
+ 0x5583, 0x40,
+};
+
+uint32_t ov5640_saturation_pos1[] = {
+ 0x5583, 0x48,
+};
+
+uint32_t ov5640_saturation_pos2[] = {
+ 0x5583, 0x50,
+};
+
+uint32_t ov5640_saturation_pos3[] = {
+ 0x5583, 0x58,
+};
+
+uint32_t ov5640_saturation_pos4[] = {
+ 0x5583, 0x60,
+};
+
+
+uint32_t ov5640_2592_1944_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 2592x1944 */
+ 0x3808, 0x0a,
+ 0x3809, 0x20,
+ 0x380a, 0x07,
+ 0x380b, 0x98,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0x83,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_2048_1536_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 2048x1536 */
+ 0x3808, 0x08,
+ 0x3809, 0x00,
+ 0x380a, 0x06,
+ 0x380b, 0x00,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_1600_1200_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 1600x1200 */
+ 0x3808, 0x06,
+ 0x3809, 0x40,
+ 0x380a, 0x04,
+ 0x380b, 0xb0,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_1280_720_regs[] = {
+ 0x3008,0x42,
+ 0x3034,0x1a,
+ //0x3035,0x21,
+ 0x3036,0x69,
+ 0x3037,0x13,
+ 0x3108,0x01,
+ 0x3824,0x01,
+ 0xffff,0x32,
+ 0x3808,0x05,
+ 0x3809,0x00,
+ 0x380a,0x02,
+ 0x380b,0xd0,
+ 0x380c,0x07,
+ 0x380d,0x64,
+ 0x380e,0x02,
+ 0x380f,0xe4,
+
+ 0x3a08,0x00,
+ 0x3a09,0xdd,
+ 0x3a0a,0x00,
+ 0x3a0b,0xb8,
+ 0x3a0e,0x03,
+ 0x3a0d,0x04,
+
+ 0x3c07,0x07,
+ 0x3814,0x31,
+ 0x3815,0x31,
+ 0x3800,0x00,
+ 0x3801,0x00,
+ 0x3802,0x00,
+ 0x3803,0xfa,
+ 0x3804,0x0a,
+ 0x3805,0x3f,
+ 0x3806,0x06,
+ 0x3807,0xa9,
+ 0x3810,0x00,
+ 0x3811,0x10,
+ 0x3812,0x00,
+ 0x3813,0x04,
+
+ 0x5308,0x65,
+ 0x5302,0x00,
+ 0x4002,0x45,
+ 0x4005,0x18,
+
+ 0x3618,0x00,
+ 0x3612,0x29,
+ 0x3709,0x52,
+ 0x370c,0x03,
+ 0x3a02,0x02,
+ 0x3a03,0xe0,
+ 0x3a14,0x02,
+ 0x3a15,0xe0,
+
+ 0x4004,0x02,
+ 0x3002,0x1c,
+ 0x3006,0xc3,
+ 0x460b,0x37,
+ 0x460c,0x20,
+ 0x4837,0x16,
+ 0x5001,0x83,
+ 0x3503,0x00,
+
+ 0x302c,0xc2,
+ 0x3008,0x02,
+ 0xffff,0x32,
+};
+
+uint32_t ov5640_800_600_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x38,
+ 0x5303, 0x18,
+ 0x5306, 0x06,
+ 0x5307, 0x16,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ /* Width * Height 800x600 */
+ 0x3808, 0x03,
+ 0x3809, 0x20,
+ 0x380a, 0x02,
+ 0x380b, 0x58,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_320_240_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x38,
+ 0x5303, 0x18,
+ 0x5306, 0x06,
+ 0x5307, 0x16,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ //320x240
+ 0x3808, 0x01,
+ 0x3809, 0x40,
+ 0x380a, 0x00,
+ 0x380b, 0xf0,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_640_480_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x20,//38
+ 0x5303, 0x08, //18
+ 0x5306, 0x26,//06
+ 0x5307, 0x1c,//16
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ 0x3808, 0x02,
+ 0x3809, 0x80,
+ 0x380a, 0x01,
+ 0x380b, 0xe0,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11, //11
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_default_regs_init[] = {
+ 0x3008, 0x42,
+ 0x3103, 0x03,
+ 0x3017, 0x7f,
+ 0x3018, 0xff,
+
+ 0x3031, 0x00,
+ 0x302c, 0xc2,
+
+ 0x3108, 0x01,
+ 0x3630, 0x36,
+ 0x3631, 0x0e,
+ 0x3632, 0xe2,
+ 0x3633, 0x12,
+ 0x3621, 0xe0,
+ 0x3704, 0xa0,
+ 0x3703, 0x5a,
+ 0x3715, 0x78,
+ 0x3717, 0x01,
+ 0x370b, 0x60,
+ 0x3705, 0x1a,
+ 0x3905, 0x02,
+ 0x3906, 0x10,
+ 0x3901, 0x0a,
+ 0x3731, 0x12,
+ 0x3600, 0x08,
+ 0x3601, 0x33,
+ 0x302d, 0x60,
+ 0x3620, 0x52,
+ 0x371b, 0x20,
+ 0x471c, 0x50,
+
+ 0x3a13, 0x43,
+ 0x3a18, 0x00,
+ 0x3a19, 0xf8,
+
+ 0x3635, 0x13,
+ 0x3636, 0x03,
+ 0x3634, 0x40,
+ 0x3622, 0x01,
+
+ 0x3c04, 0x28,
+ 0x3c05, 0x98,
+ 0x3c06, 0x00,
+ 0x3c07, 0x08,
+ 0x3c08, 0x00,
+ 0x3c09, 0x1c,
+ 0x3c0a, 0x9c,
+ 0x3c0b, 0x40,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+ 0x3808, 0x02,
+ 0x3809, 0x80,
+ 0x380a, 0x01,
+ 0x380b, 0xe0,
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f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0x5383, 0x12,
+ 0x5384, 0x07,
+ 0x5385, 0x7f,
+ 0x5386, 0x86,
+ 0x5387, 0x8a,
+ 0x5388, 0x80,
+ 0x5389, 0x0a,
+ 0x538a, 0x01,
+ 0x538b, 0x98,
+
+ 0x5480, 0x01,
+ 0x5481, 0x06,
+ 0x5482, 0x12,
+ 0x5483, 0x24,
+ 0x5484, 0x4a,
+ 0x5485, 0x58,
+ 0x5486, 0x65,
+ 0x5487, 0x72,
+ 0x5488, 0x7d,
+ 0x5489, 0x88,
+ 0x548a, 0x92,
+ 0x548b, 0xa3,
+ 0x548c, 0xb2,
+ 0x548d, 0xc8,
+ 0x548e, 0xdd,
+ 0x548f, 0xf0,
+ 0x5490, 0x15,
+
+ 0x5300, 0x08,
+ 0x5301, 0x30,
+ 0x5302, 0x3f,
+ 0x5303, 0x10,
+ 0x5304, 0x08,
+ 0x5305, 0x30,
+ 0x5306, 0x04,
+ 0x5307, 0x14,
+ 0x5309, 0x08,
+ 0x530a, 0x30,
+ 0x530b, 0x04,
+ 0x530c, 0x06,
+
+ 0x5580, 0x06,
+ 0x5583, 0x40,
+ 0x5584, 0x20,
+ 0x5589, 0x10,
+ 0x558a, 0x00,
+ 0x558b, 0xf8,
+
+ 0x5000, 0xa7,
+#if 0
+ 0x5800, 0x20,
+ 0x5801, 0x19,
+ 0x5802, 0x17,
+ 0x5803, 0x16,
+ 0x5804, 0x18,
+ 0x5805, 0x21,
+ 0x5806, 0x0F,
+ 0x5807, 0x0A,
+ 0x5808, 0x07,
+ 0x5809, 0x07,
+ 0x580A, 0x0A,
+ 0x580B, 0x0C,
+ 0x580C, 0x0A,
+ 0x580D, 0x03,
+ 0x580E, 0x01,
+ 0x580F, 0x01,
+ 0x5810, 0x03,
+ 0x5811, 0x09,
+ 0x5812, 0x0A,
+ 0x5813, 0x03,
+ 0x5814, 0x01,
+ 0x5815, 0x01,
+ 0x5816, 0x03,
+ 0x5817, 0x08,
+ 0x5818, 0x10,
+ 0x5819, 0x0A,
+ 0x581A, 0x06,
+ 0x581B, 0x06,
+ 0x581C, 0x08,
+ 0x581D, 0x0E,
+ 0x581E, 0x22,
+ 0x581F, 0x18,
+ 0x5820, 0x13,
+ 0x5821, 0x12,
+ 0x5822, 0x16,
+ 0x5823, 0x1E,
+ 0x5824, 0x64,
+ 0x5825, 0x2A,
+ 0x5826, 0x2C,
+ 0x5827, 0x2A,
+ 0x5828, 0x46,
+ 0x5829, 0x2A,
+ 0x582A, 0x26,
+ 0x582B, 0x24,
+ 0x582C, 0x26,
+ 0x582D, 0x2A,
+ 0x582E, 0x28,
+ 0x582F, 0x42,
+ 0x5830, 0x40,
+ 0x5831, 0x42,
+ 0x5832, 0x08,
+ 0x5833, 0x28,
+ 0x5834, 0x26,
+ 0x5835, 0x24,
+ 0x5836, 0x26,
+ 0x5837, 0x2A,
+ 0x5838, 0x44,
+ 0x5839, 0x4A,
+ 0x583A, 0x2C,
+ 0x583B, 0x2a,
+ 0x583C, 0x46,
+ 0x583D, 0xCE,
+#endif
+
+ 0x5800, 0x29,
+ 0x5801, 0x18,
+ 0x5802, 0x13,
+ 0x5803, 0x13,
+ 0x5804, 0x1A,
+ 0x5805, 0x28,
+ 0x5806, 0x0D,
+ 0x5807, 0x09,
+ 0x5808, 0x06,
+ 0x5809, 0x06,
+ 0x580a, 0x08,
+ 0x580b, 0x11,
+ 0x580c, 0x09,
+ 0x580d, 0x04,
+ 0x580e, 0x01,
+ 0x580f, 0x01,
+ 0x5810, 0x04,
+ 0x5811, 0x09,
+ 0x5812, 0x09,
+ 0x5813, 0x04,
+ 0x5814, 0x01,
+ 0x5815, 0x01,
+ 0x5816, 0x04,
+ 0x5817, 0x0A,
+ 0x5818, 0x0E,
+ 0x5819, 0x09,
+ 0x581a, 0x06,
+ 0x581b, 0x06,
+ 0x581c, 0x09,
+ 0x581d, 0x11,
+ 0x581e, 0x28,
+ 0x581f, 0x18,
+ 0x5820, 0x12,
+ 0x5821, 0x13,
+ 0x5822, 0x19,
+ 0x5823, 0x2C,
+ 0x5824, 0x3B,
+ 0x5825, 0x27,
+ 0x5826, 0x08,
+ 0x5827, 0x27,
+ 0x5828, 0x0E,
+ 0x5829, 0x17,
+ 0x582a, 0x25,
+ 0x582b, 0x23,
+ 0x582c, 0x15,
+ 0x582d, 0x06,
+ 0x582e, 0x08,
+ 0x582f, 0x42,
+ 0x5830, 0x40,
+ 0x5831, 0x32,
+ 0x5832, 0x07,
+ 0x5833, 0x27,
+ 0x5834, 0x25,
+ 0x5835, 0x24,
+ 0x5836, 0x25,
+ 0x5837, 0x05,
+ 0x5838, 0x29,
+ 0x5839, 0x2A,
+ 0x583a, 0x0A,
+ 0x583b, 0x18,
+ 0x583c, 0x4B,
+ 0x583d, 0xCE,
+ 0x5688, 0x11,//weight
+ 0x5689, 0x11,
+ 0x568a, 0x11,
+ 0x568b, 0x11,
+ 0x568c, 0x11,
+ 0x568d, 0x11,
+ 0x568e, 0x11,
+ 0x568f, 0x11,
+
+ 0x5025, 0x00,
+
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1f, 0x10,
+
+ 0x4005, 0x1a,
+
+ 0x3503, 0x00,
+ 0x3008, 0x02,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.c b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.c
new file mode 100755
index 00000000..30863151
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.c
@@ -0,0 +1,572 @@
+/*
+ * Driver for ov5640 CMOS Image Sensor from Omnivision
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov5640.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16addr(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+struct ov5640_af {
+ int pos_x;
+ int pos_y;
+};
+
+static struct ov5640_af ov5640_af;
+static int sensor_fps;
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, ov5640_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, ov5640_640_480_regs),
+ CMOS_WIN_SIZE("SVGA", 800, 600, ov5640_800_600_regs),
+ CMOS_WIN_SIZE("720p", 1280, 720, ov5640_1280_720_regs),
+ CMOS_WIN_SIZE("200w", 1600, 1200, ov5640_1600_1200_regs),
+ CMOS_WIN_SIZE("300w", 2048, 1536, ov5640_2048_1536_regs),
+ CMOS_WIN_SIZE("QSXGA", 2592, 1944, ov5640_2592_1944_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov5640_wb_auto;
+ size = ARRAY_SIZE(ov5640_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov5640_wb_incandescent;
+ size = ARRAY_SIZE(ov5640_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov5640_wb_daylight;
+ size = ARRAY_SIZE(ov5640_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov5640_wb_cloudy;
+ size = ARRAY_SIZE(ov5640_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov5640_wb_fluorescent;
+ size = ARRAY_SIZE(ov5640_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = ov5640_scene_mode_auto;
+ size = ARRAY_SIZE(ov5640_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = ov5640_scene_mode_night;
+ size = ARRAY_SIZE(ov5640_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_autoexposure(struct cmos_subdev *sd, int value)
+{
+ switch (value) {
+ case 0:
+ break;
+ case 1:
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = ov5640_exposure_neg6;
+ size = ARRAY_SIZE(ov5640_exposure_neg6);
+ break;
+ case -1:
+ regs = ov5640_exposure_neg3;
+ size = ARRAY_SIZE(ov5640_exposure_neg3);
+ break;
+ case 0:
+ regs = ov5640_exposure_zero;
+ size = ARRAY_SIZE(ov5640_exposure_zero);
+ break;
+ case 1:
+ regs = ov5640_exposure_pos3;
+ size = ARRAY_SIZE(ov5640_exposure_pos3);
+ break;
+ case 2:
+ regs = ov5640_exposure_pos6;
+ size = ARRAY_SIZE(ov5640_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3821);
+
+ switch (value) {
+ case 0:
+ data &= ~0x06;
+ break;
+ case 1:
+ data |= 0x06;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3821, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x3820);
+
+ switch (value) {
+ case 0:
+ data &= ~0x06;
+ break;
+ case 1:
+ data |= 0x06;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x3820, data);
+}
+
+static inline int sensor_s_af_area_x(struct cmos_subdev *sd, int value)
+{
+ ov5640_af.pos_x = value;
+ return 0;
+}
+
+static inline int sensor_s_af_area_y(struct cmos_subdev *sd, int value)
+{
+ ov5640_af.pos_y = value;
+ return 0;
+}
+
+// auto focus
+static int sensor_s_af(struct cmos_subdev *sd, int value)
+{
+ printk(KERN_DEBUG "%s, AF mode %d, (%d,%d)\n", sd->name, value, ov5640_af.pos_x, ov5640_af.pos_y);
+ switch (value) {
+ case FOCUS_MODE_AUTO:
+ sensor_write(sd, 0x3024, ov5640_af.pos_x/8);
+ sensor_write(sd, 0x3025, ov5640_af.pos_y/8);
+ sensor_write(sd, 0x3026, 80);
+ sensor_write(sd, 0x3027, 60);
+ sensor_write(sd, 0x3023, 0x01);
+ sensor_write(sd, 0x3022, 0x81);
+ msleep(10);
+ return sensor_write(sd, 0x3022, 0x03); // Single AF
+ case FOCUS_MODE_CONTINUOUS:
+ return sensor_write(sd, 0x3022, 0x04); // Continous AF
+ case FOCUS_MODE_FIXED:
+ return sensor_write(sd, 0x3022, 0x06); // Stop AF
+ case FOCUS_MODE_INFINITY:
+ return sensor_write(sd, 0x3022, 0x08); // Release AF
+ case FOCUS_MODE_CONTINUOUS_VIDEO:
+ return sensor_write(sd, 0x3022, 0x08); // Release AF
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int sensor_g_af(struct cmos_subdev *sd, int *value)
+{
+ int state;
+
+ state = sensor_read(sd, 0x3029);
+ switch (state) {
+ case 0x00: /* focusing */
+ *value = FOCUS_RESULT_FOCUSING;
+ break;
+ case 0x10:
+ case 0x20:
+ *value = FOCUS_RESULT_SUCCEED;
+ break;
+ case 0x70: /* focused, moto released */
+ default:
+ *value = FOCUS_RESULT_FAILED;
+ break;
+ }
+ return 0;
+}
+
+// shutter
+static int sensor_s_shutter(struct cmos_subdev *sd)
+{
+ uint32_t temp;
+ uint16_t temp1;
+ uint16_t temp2;
+ uint16_t temp3;
+
+ sensor_write(sd, 0x3503,0x07); // 0x03 fix AE
+ sensor_write(sd, 0x3a00,0x38); // disable night
+
+ temp1 = sensor_read(sd, 0x3500);
+ temp2 = sensor_read(sd, 0x3501);
+ temp3 = sensor_read(sd, 0x3502);
+
+ pr_debug("%s: 0x%x, 0x%x, 0x%x\n", __func__, temp1, temp2, temp3);
+
+ temp = ((temp1<<12) | (temp2<<4) | (temp3>>4));
+ temp = temp / 2;//杩欎釜绯绘暟鏍规嵁preview mode鍜宑apture mode鐨刦rame rate杩涜淇敼
+ temp = temp * 16;
+
+ temp1 = (temp & 0x0000ff);
+ temp2 = (temp & 0x00ff00) >> 8;
+ temp3 = (temp & 0xff0000) >> 16;
+
+ sensor_write(sd, 0x3500,temp3);
+ sensor_write(sd, 0x3501,temp2);
+ sensor_write(sd, 0x3502,temp1);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE_AUTO:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ case V4L2_CID_FOCUS_AUTO:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 0, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_flash(struct cmos_subdev *sd, int *value)
+{
+ int environmental, critical;
+
+ environmental = sensor_read(sd, 0x350b);
+ critical = sensor_read(sd, 0x3a19);
+
+ printk(KERN_DEBUG "%s environmental 0x%x,criticali 0x%x\n",
+ __func__, environmental,critical);
+
+ *value = (environmental >= critical);
+ return 0;
+}
+
+static int sensor_g_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_AUTO_FOCUS_RESULT:
+ return sensor_g_af(sd, &ctrl->value);
+ case V4L2_CID_CAMERA_FLASH_MODE_AUTO:
+ return sensor_g_flash(sd, &ctrl->value);
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE_AUTO:
+ return sensor_s_autoexposure(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ case V4L2_CID_CAMERA_FOCUS_MODE:
+ return sensor_s_af(sd, ctrl->value);
+ case V4L2_CID_CAMERA_FOCUS_POSITION_X:
+ return sensor_s_af_area_x(sd, ctrl->value);
+ case V4L2_CID_CAMERA_FOCUS_POSITION_Y:
+ return sensor_s_af_area_y(sd, ctrl->value);
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int sensor_set_fps(struct cmos_subdev *sd, int fps)
+{
+ uint32_t array[]={
+ 0x380c,0x07,
+ 0x380d,0x64,
+ 0x380e,0x02,
+ 0x380f,0xe4,
+ };
+
+ if(fps == 0)
+ return 0;
+ switch(fps){
+ case 26 ... 30:
+ break;
+ case 21 ... 25:
+ array[5] = 0x03;array[7] = 0x85;
+ break;
+ case 16 ... 20:
+ array[5] = 0x04;array[7] = 0x60;
+ break;
+ case 11 ... 15:
+ break;
+ case 5 ... 10:
+ array[5] = 0x04;array[7] = 0x75;
+ break;
+ }
+ sensor_write_array(sd, array, ARRAY_SIZE(array));
+ msleep(50);
+ sensor_fps =0;
+ return 0;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ if (mf->width >= 1024) {
+ sensor_s_shutter(sd);
+ }
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ if((mf->width ==1280)&&(mf->height == 720)){
+ if(sensor_fps != 0){
+ if(sensor_fps >15)
+ sensor_write(sd, 0x3035,0x21);
+ else
+ sensor_write(sd, 0x3035,0x41);
+ msleep(60);
+ }else{
+ sensor_write(sd, 0x3035,0x21);
+ }
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ if((mf->width ==1280)&&(mf->height == 720)){
+ sensor_set_fps(sd,sensor_fps);
+ }
+ msleep(200);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_g_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms)
+{
+ return 0;
+}
+
+static int sensor_s_parm(struct cmos_subdev *sd, struct v4l2_streamparm *parms)
+{
+ struct v4l2_captureparm *cp = &parms->parm.capture;
+ struct v4l2_fract *tpf = &cp->timeperframe;
+
+ if (tpf->numerator == 0 || tpf->denominator == 0) {
+ return 0;
+ }
+
+ sensor_fps = tpf->denominator;//cause tpf->numerator == 1 in HAL
+
+
+ return 0;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ data |= (sensor_read(sd, 0x300a) & 0xff) << 8;
+ data |= (sensor_read(sd, 0x300b) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd))
+ return -1;
+ sensor_fps = 0;
+ sensor_write_array(sd, ov5640_firmware, ARRAY_SIZE(ov5640_firmware));
+ msleep(10);
+
+ sensor_write(sd, 0x3103, 0x11);
+ sensor_write(sd, 0x3008, 0x82);
+ msleep(5);
+ sensor_write_array(sd, ov5640_default_regs_init,
+ ARRAY_SIZE(ov5640_default_regs_init));
+
+ msleep(50);
+ sensor_write(sd, 0x3024, 320/8);
+ sensor_write(sd, 0x3025, 240/8);
+ sensor_write(sd, 0x3026, 80);
+ sensor_write(sd, 0x3027, 60);
+ sensor_s_af(sd, FOCUS_MODE_CONTINUOUS);
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write(sd, 0x3017, 0x80);
+ sensor_write(sd, 0x3018, 0x03);
+ return 0;
+}
+
+static struct cmos_subdev_ops ov5640_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .g_ctrl = sensor_g_ctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .g_parm = sensor_g_parm,
+ .s_parm = sensor_s_parm,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev ov5640 = {
+ .name = "ov5640",
+ .i2c_addr = 0x3c,
+ .id = 0x5640,
+ .max_width = 2592,
+ .max_height = 1944,
+ .ops = &ov5640_ops,
+};
+
+#if 0
+static int __init ov5640_init(void)
+{
+ return cmos_register_sudbdev(&ov5640);
+}
+
+static void __exit ov5640_exit(void)
+{
+ cmos_unregister_subdev(&ov5640);
+ return;
+}
+
+module_init(ov5640_init);
+module_exit(ov5640_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.h b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.h
new file mode 100755
index 00000000..9c57d1dc
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640.h
@@ -0,0 +1,1296 @@
+#ifndef OV5640_H
+#define OV5640_H
+
+#include "ov5640_firmware.h"
+
+
+// Scene Mode
+uint32_t ov5640_scene_mode_auto[] = {
+ 0x3a00, 0x3c,
+ 0x3a02, 0x0b,
+ 0x3a03, 0x88,
+ 0x3a14, 0x0b,
+ 0x3a15, 0x88,
+};
+
+uint32_t ov5640_scene_mode_night[] = {
+ 0x3a00, 0x3c,
+ 0x3a02, 0x17,
+ 0x3a03, 0x10,
+ 0x3a14, 0x17,
+ 0x3a15, 0x10,
+};
+
+
+// White Balance
+uint32_t ov5640_wb_auto [] = {
+ 0x3406, 0x00,
+};
+
+uint32_t ov5640_wb_incandescent [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x05,
+ 0x3401, 0x48,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x07,
+ 0x3405, 0xcf,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_fluorescent [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x05,
+ 0x3401, 0x8c,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x06,
+ 0x3405, 0xe8,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_daylight [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x06,
+ 0x3401, 0x1c,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0xf3,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_cloudy [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x06,
+ 0x3401, 0x48,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x04,
+ 0x3405, 0xd3,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_wb_tungsten [] = {
+ 0x3212, 0x03,
+ 0x3406, 0x01,
+ 0x3400, 0x04,
+ 0x3401, 0x10,
+ 0x3402, 0x04,
+ 0x3403, 0x00,
+ 0x3404, 0x08,
+ 0x3405, 0x40,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+
+// Exposure
+uint32_t ov5640_exposure_neg6[] = {
+ 0x3a0f, 0x20,
+ 0x3a10, 0x18,
+ 0x3a11, 0x41,
+ 0x3a1b, 0x20,
+ 0x3a1e, 0x18,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_neg3[] = {
+ 0x3a0f, 0x28,
+ 0x3a10, 0x20,
+ 0x3a11, 0x51,
+ 0x3a1b, 0x28,
+ 0x3a1e, 0x20,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_zero[] = {
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_pos3[] = {
+ 0x3a0f, 0x40,
+ 0x3a10, 0x38,
+ 0x3a11, 0x71,
+ 0x3a1b, 0x40,
+ 0x3a1e, 0x38,
+ 0x3a1f, 0x10,
+};
+
+uint32_t ov5640_exposure_pos6[] = {
+ 0x3a0f, 0x50,
+ 0x3a10, 0x48,
+ 0x3a11, 0x90,
+ 0x3a1b, 0x50,
+ 0x3a1e, 0x48,
+ 0x3a1f, 0x20,
+};
+
+/*
+ * The color effect settings
+ */
+uint32_t ov5640_colorfx_none[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x06,
+ 0x5583, 0x40,
+ 0x5584, 0x10,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_bw[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x1e,
+ 0x5583, 0x80,
+ 0x5584, 0x80,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_sepia[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x1e,
+ 0x5583, 0x40,
+ 0x5584, 0xa0,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_negative[] = {
+ 0x3212, 0x03,
+ 0x5580, 0x46,
+ 0x5583, 0x40,
+ 0x5584, 0x10,
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_colorfx_emboss[] = {
+};
+
+uint32_t ov5640_colorfx_sketch[] = {
+};
+
+uint32_t ov5640_colorfx_sky_blue[] = {
+};
+
+uint32_t ov5640_colorfx_grass_green[] = {
+};
+
+uint32_t ov5640_colorfx_skin_whiten[] = {
+};
+
+uint32_t ov5640_colorfx_vivid[] = {
+};
+
+// Brightness
+uint32_t ov5640_brightness_neg4[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x40,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg3[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x30,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg2[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x20,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_neg1[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x10,
+ 0x5588, 0x09,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_zero[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x00,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+
+};
+
+uint32_t ov5640_brightness_pos1[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x10,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos2[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x20,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos3[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x30,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_brightness_pos4[] = {
+ 0x3212, 0x03,
+
+ 0x5587, 0x40,
+ 0x5588, 0x01,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+// Contrast
+uint32_t ov5640_contrast_neg4[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x10,
+ 0x5585, 0x10,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg3[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x14,
+ 0x5585, 0x14,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg2[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x18,
+ 0x5585, 0x18,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_neg1[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x1c,
+ 0x5585, 0x1c,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_zero[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x20,
+ 0x5585, 0x00,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos1[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x24,
+ 0x5585, 0x10,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos2[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x28,
+ 0x5585, 0x18,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos3[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x2c,
+ 0x5585, 0x1c,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+uint32_t ov5640_contrast_pos4[] = {
+ 0x3212, 0x03,
+
+ 0x5586, 0x30,
+ 0x5585, 0x20,
+
+ 0x3212, 0x13,
+ 0x3212, 0xa3,
+};
+
+// Saturation
+uint32_t ov5640_saturation_neg4[] = {
+ 0x5583, 0x20,
+};
+
+uint32_t ov5640_saturation_neg3[] = {
+ 0x5583, 0x28,
+};
+
+uint32_t ov5640_saturation_neg2[] = {
+ 0x5583, 0x30,
+};
+
+uint32_t ov5640_saturation_neg1[] = {
+ 0x5583, 0x38,
+};
+
+uint32_t ov5640_saturation_zero[] = {
+ 0x5583, 0x40,
+};
+
+uint32_t ov5640_saturation_pos1[] = {
+ 0x5583, 0x48,
+};
+
+uint32_t ov5640_saturation_pos2[] = {
+ 0x5583, 0x50,
+};
+
+uint32_t ov5640_saturation_pos3[] = {
+ 0x5583, 0x58,
+};
+
+uint32_t ov5640_saturation_pos4[] = {
+ 0x5583, 0x60,
+};
+
+
+uint32_t ov5640_2592_1944_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 2592x1944 */
+ 0x3808, 0x0a,
+ 0x3809, 0x20,
+ 0x380a, 0x07,
+ 0x380b, 0x98,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0x83,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_2048_1536_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 2048x1536 */
+ 0x3808, 0x08,
+ 0x3809, 0x00,
+ 0x380a, 0x06,
+ 0x380b, 0x00,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_1600_1200_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x07,
+ 0x5189, 0x66,
+
+ 0x5302, 0x1c,
+ 0x5303, 0x08,
+ 0x5306, 0x08,
+ 0x5307, 0x18,
+
+ 0x3503, 0x07,
+ 0x3a00, 0x38,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x00,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9f,
+
+ /* Width * Height 1600x1200 */
+ 0x3808, 0x06,
+ 0x3809, 0x40,
+ 0x380a, 0x04,
+ 0x380b, 0xb0,
+
+ 0x3813, 0x04,
+ 0x3814, 0x11,
+ 0x3815, 0x11,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x21,
+ 0x3036, 0x69,
+ 0x3037, 0x13,
+
+ 0x380c, 0x0b,
+ 0x380d, 0x1c,
+ 0x380e, 0x09,
+ 0x380f, 0x3a,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x08,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x09,
+
+ 0x3618, 0x04,
+ 0x3612, 0x2b,
+ 0x3709, 0x12,
+ 0x370c, 0x00,
+
+ 0x4004, 0x06,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x01,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x02,
+ 0x4407, 0x0c,
+ 0x460b, 0x37,
+ 0x460c, 0x20,
+
+ 0x4202, 0x00,
+};
+
+uint32_t ov5640_1280_720_regs[] = {
+ 0x3008,0x42,
+ 0x3034,0x1a,
+ //0x3035,0x21,
+ 0x3036,0x69,
+ 0x3037,0x13,
+ 0x3108,0x01,
+ 0x3824,0x01,
+ 0xffff,0x32,
+ 0x3808,0x05,
+ 0x3809,0x00,
+ 0x380a,0x02,
+ 0x380b,0xd0,
+ 0x380c,0x07,
+ 0x380d,0x64,
+ 0x380e,0x02,
+ 0x380f,0xe4,
+
+ 0x3a08,0x00,
+ 0x3a09,0xdd,
+ 0x3a0a,0x00,
+ 0x3a0b,0xb8,
+ 0x3a0e,0x03,
+ 0x3a0d,0x04,
+
+ 0x3c07,0x07,
+ 0x3814,0x31,
+ 0x3815,0x31,
+ 0x3800,0x00,
+ 0x3801,0x00,
+ 0x3802,0x00,
+ 0x3803,0xfa,
+ 0x3804,0x0a,
+ 0x3805,0x3f,
+ 0x3806,0x06,
+ 0x3807,0xa9,
+ 0x3810,0x00,
+ 0x3811,0x10,
+ 0x3812,0x00,
+ 0x3813,0x04,
+
+ 0x5308,0x65,
+ 0x5302,0x00,
+ 0x4002,0x45,
+ 0x4005,0x18,
+
+ 0x3618,0x00,
+ 0x3612,0x29,
+ 0x3709,0x52,
+ 0x370c,0x03,
+ 0x3a02,0x02,
+ 0x3a03,0xe0,
+ 0x3a14,0x02,
+ 0x3a15,0xe0,
+
+ 0x4004,0x02,
+ 0x3002,0x1c,
+ 0x3006,0xc3,
+ 0x460b,0x37,
+ 0x460c,0x20,
+ 0x4837,0x16,
+ 0x5001,0x83,
+ 0x3503,0x00,
+
+ 0x302c,0xc2,
+ 0x3008,0x02,
+ 0xffff,0x32,
+};
+
+uint32_t ov5640_800_600_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x38,
+ 0x5303, 0x18,
+ 0x5306, 0x06,
+ 0x5307, 0x16,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ /* Width * Height 800x600 */
+ 0x3808, 0x03,
+ 0x3809, 0x20,
+ 0x380a, 0x02,
+ 0x380b, 0x58,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_320_240_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x38,
+ 0x5303, 0x18,
+ 0x5306, 0x06,
+ 0x5307, 0x16,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ //320x240
+ 0x3808, 0x01,
+ 0x3809, 0x40,
+ 0x380a, 0x00,
+ 0x380b, 0xf0,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_640_480_regs[] = {
+ 0x4202, 0x0f,
+
+ 0x3c07, 0x08,
+ 0x5189, 0x72,
+
+ 0x3503, 0x00,
+ 0x3a00, 0x3c,
+
+ 0x5302, 0x38,
+ 0x5303, 0x18,
+ 0x5306, 0x06,
+ 0x5307, 0x16,
+
+ 0x3820, 0x41,
+ 0x3821, 0x07,
+
+ 0x3800, 0x00,
+ 0x3801, 0x00,
+ 0x3802, 0x00,
+ 0x3803, 0x04,
+ 0x3804, 0x0a,
+ 0x3805, 0x3f,
+ 0x3806, 0x07,
+ 0x3807, 0x9b,
+
+ 0x3808, 0x02,
+ 0x3809, 0x80,
+ 0x380a, 0x01,
+ 0x380b, 0xe0,
+
+ 0x3810, 0x00,
+ 0x3811, 0x10,
+ 0x3812, 0x00,
+ 0x3813, 0x06,
+ 0x3814, 0x31,
+ 0x3815, 0x31,
+
+ 0x3034, 0x1a,
+ 0x3035, 0x11,
+ 0x3036, 0x46,
+ 0x3037, 0x13,
+
+ 0x380c, 0x07,
+ 0x380d, 0x68,
+ 0x380e, 0x03,
+ 0x380f, 0xd8,
+
+ 0x3a08, 0x01,
+ 0x3a09, 0x27,
+ 0x3a0e, 0x03,
+ 0x3a0a, 0x00,
+ 0x3a0b, 0xf6,
+ 0x3a0d, 0x04,
+
+ 0x3618, 0x00,
+ 0x3612, 0x29,
+ 0x3709, 0x52,
+ 0x370c, 0x03,
+
+ 0x4004, 0x02,
+ 0x3002, 0x1c,
+ 0x3006, 0xc3,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x4713, 0x03,
+ 0x4407, 0x04,
+ 0x460b, 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+
+ 0x4202, 0x00,
+
+// 0x3023, 0x01,
+// 0x3022, 0x04,
+};
+
+uint32_t ov5640_default_regs_init[] = {
+ 0x3008, 0x42,
+ 0x3103, 0x03,
+ 0x3017, 0x7f,
+ 0x3018, 0xff,
+
+ 0x3031, 0x00,
+ 0x302c, 0xc2,
+
+ 0x3108, 0x01,
+ 0x3630, 0x36,
+ 0x3631, 0x0e,
+ 0x3632, 0xe2,
+ 0x3633, 0x12,
+ 0x3621, 0xe0,
+ 0x3704, 0xa0,
+ 0x3703, 0x5a,
+ 0x3715, 0x78,
+ 0x3717, 0x01,
+ 0x370b, 0x60,
+ 0x3705, 0x1a,
+ 0x3905, 0x02,
+ 0x3906, 0x10,
+ 0x3901, 0x0a,
+ 0x3731, 0x12,
+ 0x3600, 0x08,
+ 0x3601, 0x33,
+ 0x302d, 0x60,
+ 0x3620, 0x52,
+ 0x371b, 0x20,
+ 0x471c, 0x50,
+
+ 0x3a13, 0x43,
+ 0x3a18, 0x00,
+ 0x3a19, 0xf8,
+
+ 0x3635, 0x13,
+ 0x3636, 0x03,
+ 0x3634, 0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 0x35,
+ 0x460c, 0x22,
+ 0x4837, 0x22,
+ 0x3824, 0x02,
+ 0x5001, 0xa3,
+
+ 0x5180, 0xff,
+ 0x5181, 0xf2,
+ 0x5182, 0x00,
+ 0x5183, 0x14,
+ 0x5184, 0x25,
+ 0x5185, 0x24,
+ 0x5186, 0x16,
+ 0x5187, 0x16,
+ 0x5188, 0x16,
+ 0x5189, 0x72,
+ 0x518a, 0x68,
+ 0x518b, 0xe0,
+ 0x518c, 0xb2,
+ 0x518d, 0x42,
+ 0x518e, 0x3e,
+ 0x518f, 0x4c,
+ 0x5190, 0x56,
+ 0x5191, 0xf8,
+ 0x5192, 0x04,
+ 0x5193, 0x70,
+ 0x5194, 0xf0,
+ 0x5195, 0xf0,
+ 0x5196, 0x03,
+ 0x5197, 0x01,
+ 0x5198, 0x04,
+ 0x5199, 0x12,
+ 0x519a, 0x04,
+ 0x519b, 0x00,
+ 0x519c, 0x06,
+ 0x519d, 0x82,
+ 0x519e, 0x38,
+
+ 0x5381, 0x1e,
+ 0x5382, 0x5b,
+ 0x5383, 0x12,
+ 0x5384, 0x07,
+ 0x5385, 0x7f,
+ 0x5386, 0x86,
+ 0x5387, 0x8a,
+ 0x5388, 0x80,
+ 0x5389, 0x0a,
+ 0x538a, 0x01,
+ 0x538b, 0x98,
+
+ 0x5480, 0x01,
+ 0x5481, 0x06,
+ 0x5482, 0x12,
+ 0x5483, 0x24,
+ 0x5484, 0x4a,
+ 0x5485, 0x58,
+ 0x5486, 0x65,
+ 0x5487, 0x72,
+ 0x5488, 0x7d,
+ 0x5489, 0x88,
+ 0x548a, 0x92,
+ 0x548b, 0xa3,
+ 0x548c, 0xb2,
+ 0x548d, 0xc8,
+ 0x548e, 0xdd,
+ 0x548f, 0xf0,
+ 0x5490, 0x15,
+
+ 0x5300, 0x08,
+ 0x5301, 0x30,
+ 0x5302, 0x3f,
+ 0x5303, 0x10,
+ 0x5304, 0x08,
+ 0x5305, 0x30,
+ 0x5306, 0x04,
+ 0x5307, 0x14,
+ 0x5309, 0x08,
+ 0x530a, 0x30,
+ 0x530b, 0x04,
+ 0x530c, 0x06,
+
+ 0x5580, 0x06,
+ 0x5583, 0x40,
+ 0x5584, 0x20,
+ 0x5589, 0x10,
+ 0x558a, 0x00,
+ 0x558b, 0xf8,
+
+ 0x5000, 0xa7,
+#if 0
+ 0x5800, 0x20,
+ 0x5801, 0x19,
+ 0x5802, 0x17,
+ 0x5803, 0x16,
+ 0x5804, 0x18,
+ 0x5805, 0x21,
+ 0x5806, 0x0F,
+ 0x5807, 0x0A,
+ 0x5808, 0x07,
+ 0x5809, 0x07,
+ 0x580A, 0x0A,
+ 0x580B, 0x0C,
+ 0x580C, 0x0A,
+ 0x580D, 0x03,
+ 0x580E, 0x01,
+ 0x580F, 0x01,
+ 0x5810, 0x03,
+ 0x5811, 0x09,
+ 0x5812, 0x0A,
+ 0x5813, 0x03,
+ 0x5814, 0x01,
+ 0x5815, 0x01,
+ 0x5816, 0x03,
+ 0x5817, 0x08,
+ 0x5818, 0x10,
+ 0x5819, 0x0A,
+ 0x581A, 0x06,
+ 0x581B, 0x06,
+ 0x581C, 0x08,
+ 0x581D, 0x0E,
+ 0x581E, 0x22,
+ 0x581F, 0x18,
+ 0x5820, 0x13,
+ 0x5821, 0x12,
+ 0x5822, 0x16,
+ 0x5823, 0x1E,
+ 0x5824, 0x64,
+ 0x5825, 0x2A,
+ 0x5826, 0x2C,
+ 0x5827, 0x2A,
+ 0x5828, 0x46,
+ 0x5829, 0x2A,
+ 0x582A, 0x26,
+ 0x582B, 0x24,
+ 0x582C, 0x26,
+ 0x582D, 0x2A,
+ 0x582E, 0x28,
+ 0x582F, 0x42,
+ 0x5830, 0x40,
+ 0x5831, 0x42,
+ 0x5832, 0x08,
+ 0x5833, 0x28,
+ 0x5834, 0x26,
+ 0x5835, 0x24,
+ 0x5836, 0x26,
+ 0x5837, 0x2A,
+ 0x5838, 0x44,
+ 0x5839, 0x4A,
+ 0x583A, 0x2C,
+ 0x583B, 0x2a,
+ 0x583C, 0x46,
+ 0x583D, 0xCE,
+#endif
+
+ 0x5800, 0x29,
+ 0x5801, 0x18,
+ 0x5802, 0x13,
+ 0x5803, 0x13,
+ 0x5804, 0x1A,
+ 0x5805, 0x28,
+ 0x5806, 0x0D,
+ 0x5807, 0x09,
+ 0x5808, 0x06,
+ 0x5809, 0x06,
+ 0x580a, 0x08,
+ 0x580b, 0x11,
+ 0x580c, 0x09,
+ 0x580d, 0x04,
+ 0x580e, 0x01,
+ 0x580f, 0x01,
+ 0x5810, 0x04,
+ 0x5811, 0x09,
+ 0x5812, 0x09,
+ 0x5813, 0x04,
+ 0x5814, 0x01,
+ 0x5815, 0x01,
+ 0x5816, 0x04,
+ 0x5817, 0x0A,
+ 0x5818, 0x0E,
+ 0x5819, 0x09,
+ 0x581a, 0x06,
+ 0x581b, 0x06,
+ 0x581c, 0x09,
+ 0x581d, 0x11,
+ 0x581e, 0x28,
+ 0x581f, 0x18,
+ 0x5820, 0x12,
+ 0x5821, 0x13,
+ 0x5822, 0x19,
+ 0x5823, 0x2C,
+ 0x5824, 0x3B,
+ 0x5825, 0x27,
+ 0x5826, 0x08,
+ 0x5827, 0x27,
+ 0x5828, 0x0E,
+ 0x5829, 0x17,
+ 0x582a, 0x25,
+ 0x582b, 0x23,
+ 0x582c, 0x15,
+ 0x582d, 0x06,
+ 0x582e, 0x08,
+ 0x582f, 0x42,
+ 0x5830, 0x40,
+ 0x5831, 0x32,
+ 0x5832, 0x07,
+ 0x5833, 0x27,
+ 0x5834, 0x25,
+ 0x5835, 0x24,
+ 0x5836, 0x25,
+ 0x5837, 0x05,
+ 0x5838, 0x29,
+ 0x5839, 0x2A,
+ 0x583a, 0x0A,
+ 0x583b, 0x18,
+ 0x583c, 0x4B,
+ 0x583d, 0xCE,
+ 0x5688, 0x11,//weight
+ 0x5689, 0x11,
+ 0x568a, 0x11,
+ 0x568b, 0x11,
+ 0x568c, 0x11,
+ 0x568d, 0x11,
+ 0x568e, 0x11,
+ 0x568f, 0x11,
+
+ 0x5025, 0x00,
+
+ 0x3a0f, 0x30,
+ 0x3a10, 0x28,
+ 0x3a1b, 0x30,
+ 0x3a1e, 0x28,
+ 0x3a11, 0x61,
+ 0x3a1f, 0x10,
+
+ 0x4005, 0x1a,
+
+ 0x3503, 0x00,
+ 0x3008, 0x02,
+};
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640_firmware.h b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640_firmware.h
new file mode 100755
index 00000000..a738d52a
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov5640/ov5640_firmware.h
@@ -0,0 +1,4095 @@
+#ifndef __OV5640_FIRMWARE_H__
+#define __OV5640_FIRMWARE_H__
+uint32_t ov5640_firmware[] = {
+ 0x3000, 0x20,
+ 0x8000, 0x02,
+ 0x8001, 0x0f,
+ 0x8002, 0xd6,
+ 0x8003, 0x02,
+ 0x8004, 0x0a,
+ 0x8005, 0x39,
+ 0x8006, 0xc2,
+ 0x8007, 0x01,
+ 0x8008, 0x22,
+ 0x8009, 0x22,
+ 0x800a, 0x00,
+ 0x800b, 0x02,
+ 0x800c, 0x0f,
+ 0x800d, 0xb2,
+ 0x800e, 0xe5,
+ 0x800f, 0x1f,
+ 0x8010, 0x70,
+ 0x8011, 0x72,
+ 0x8012, 0xf5,
+ 0x8013, 0x1e,
+ 0x8014, 0xd2,
+ 0x8015, 0x35,
+ 0x8016, 0xff,
+ 0x8017, 0xef,
+ 0x8018, 0x25,
+ 0x8019, 0xe0,
+ 0x801a, 0x24,
+ 0x801b, 0x4e,
+ 0x801c, 0xf8,
+ 0x801d, 0xe4,
+ 0x801e, 0xf6,
+ 0x801f, 0x08,
+ 0x8020, 0xf6,
+ 0x8021, 0x0f,
+ 0x8022, 0xbf,
+ 0x8023, 0x34,
+ 0x8024, 0xf2,
+ 0x8025, 0x90,
+ 0x8026, 0x0e,
+ 0x8027, 0x93,
+ 0x8028, 0xe4,
+ 0x8029, 0x93,
+ 0x802a, 0xff,
+ 0x802b, 0xe5,
+ 0x802c, 0x4b,
+ 0x802d, 0xc3,
+ 0x802e, 0x9f,
+ 0x802f, 0x50,
+ 0x8030, 0x04,
+ 0x8031, 0x7f,
+ 0x8032, 0x05,
+ 0x8033, 0x80,
+ 0x8034, 0x02,
+ 0x8035, 0x7f,
+ 0x8036, 0xfb,
+ 0x8037, 0x78,
+ 0x8038, 0xbd,
+ 0x8039, 0xa6,
+ 0x803a, 0x07,
+ 0x803b, 0x12,
+ 0x803c, 0x0f,
+ 0x803d, 0x04,
+ 0x803e, 0x40,
+ 0x803f, 0x04,
+ 0x8040, 0x7f,
+ 0x8041, 0x03,
+ 0x8042, 0x80,
+ 0x8043, 0x02,
+ 0x8044, 0x7f,
+ 0x8045, 0x30,
+ 0x8046, 0x78,
+ 0x8047, 0xbc,
+ 0x8048, 0xa6,
+ 0x8049, 0x07,
+ 0x804a, 0xe6,
+ 0x804b, 0x18,
+ 0x804c, 0xf6,
+ 0x804d, 0x08,
+ 0x804e, 0xe6,
+ 0x804f, 0x78,
+ 0x8050, 0xb9,
+ 0x8051, 0xf6,
+ 0x8052, 0x78,
+ 0x8053, 0xbc,
+ 0x8054, 0xe6,
+ 0x8055, 0x78,
+ 0x8056, 0xba,
+ 0x8057, 0xf6,
+ 0x8058, 0x78,
+ 0x8059, 0xbf,
+ 0x805a, 0x76,
+ 0x805b, 0x33,
+ 0x805c, 0xe4,
+ 0x805d, 0x08,
+ 0x805e, 0xf6,
+ 0x805f, 0x78,
+ 0x8060, 0xb8,
+ 0x8061, 0x76,
+ 0x8062, 0x01,
+ 0x8063, 0x75,
+ 0x8064, 0x4a,
+ 0x8065, 0x02,
+ 0x8066, 0x78,
+ 0x8067, 0xb6,
+ 0x8068, 0xf6,
+ 0x8069, 0x08,
+ 0x806a, 0xf6,
+ 0x806b, 0x74,
+ 0x806c, 0xff,
+ 0x806d, 0x78,
+ 0x806e, 0xc1,
+ 0x806f, 0xf6,
+ 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+ 0x813e, 0x01,
+ 0x813f, 0x70,
+ 0x8140, 0x4a,
+ 0x8141, 0xe6,
+ 0x8142, 0xc3,
+ 0x8143, 0x78,
+ 0x8144, 0xc0,
+ 0x8145, 0x12,
+ 0x8146, 0x0e,
+ 0x8147, 0xdf,
+ 0x8148, 0x40,
+ 0x8149, 0x05,
+ 0x814a, 0x12,
+ 0x814b, 0x0e,
+ 0x814c, 0xda,
+ 0x814d, 0x40,
+ 0x814e, 0x39,
+ 0x814f, 0x12,
+ 0x8150, 0x0f,
+ 0x8151, 0x02,
+ 0x8152, 0x40,
+ 0x8153, 0x04,
+ 0x8154, 0x7f,
+ 0x8155, 0xfe,
+ 0x8156, 0x80,
+ 0x8157, 0x02,
+ 0x8158, 0x7f,
+ 0x8159, 0x02,
+ 0x815a, 0x78,
+ 0x815b, 0xbd,
+ 0x815c, 0xa6,
+ 0x815d, 0x07,
+ 0x815e, 0x78,
+ 0x815f, 0xb9,
+ 0x8160, 0xe6,
+ 0x8161, 0x24,
+ 0x8162, 0x03,
+ 0x8163, 0x78,
+ 0x8164, 0xbf,
+ 0x8165, 0xf6,
+ 0x8166, 0x78,
+ 0x8167, 0xb9,
+ 0x8168, 0xe6,
+ 0x8169, 0x24,
+ 0x816a, 0xfd,
+ 0x816b, 0x78,
+ 0x816c, 0xc0,
+ 0x816d, 0xf6,
+ 0x816e, 0x12,
+ 0x816f, 0x0f,
+ 0x8170, 0x02,
+ 0x8171, 0x40,
+ 0x8172, 0x06,
+ 0x8173, 0x78,
+ 0x8174, 0xc0,
+ 0x8175, 0xe6,
+ 0x8176, 0xff,
+ 0x8177, 0x80,
+ 0x8178, 0x04,
+ 0x8179, 0x78,
+ 0x817a, 0xbf,
+ 0x817b, 0xe6,
+ 0x817c, 0xff,
+ 0x817d, 0x78,
+ 0x817e, 0xbe,
+ 0x817f, 0xa6,
+ 0x8180, 0x07,
+ 0x8181, 0x75,
+ 0x8182, 0x1f,
+ 0x8183, 0x02,
+ 0x8184, 0x78,
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x820d, 0x07,
+ 0x820e, 0x12,
+ 0x820f, 0x0f,
+ 0x8210, 0x02,
+ 0x8211, 0x40,
+ 0x8212, 0x06,
+ 0x8213, 0x78,
+ 0x8214, 0xc0,
+ 0x8215, 0xe6,
+ 0x8216, 0xff,
+ 0x8217, 0x80,
+ 0x8218, 0x04,
+ 0x8219, 0x78,
+ 0x821a, 0xbf,
+ 0x821b, 0xe6,
+ 0x821c, 0xff,
+ 0x821d, 0x78,
+ 0x821e, 0xbe,
+ 0x821f, 0xa6,
+ 0x8220, 0x07,
+ 0x8221, 0x75,
+ 0x8222, 0x1f,
+ 0x8223, 0x03,
+ 0x8224, 0x78,
+ 0x8225, 0xb8,
+ 0x8226, 0x76,
+ 0x8227, 0x01,
+ 0x8228, 0x80,
+ 0x8229, 0x20,
+ 0x822a, 0xe5,
+ 0x822b, 0x1f,
+ 0x822c, 0x64,
+ 0x822d, 0x03,
+ 0x822e, 0x70,
+ 0x822f, 0x26,
+ 0x8230, 0x78,
+ 0x8231, 0xbe,
+ 0x8232, 0xe6,
+ 0x8233, 0xff,
+ 0x8234, 0xc3,
+ 0x8235, 0x78,
+ 0x8236, 0xc0,
+ 0x8237, 0x12,
+ 0x8238, 0x0e,
+ 0x8239, 0xe0,
+ 0x823a, 0x40,
+ 0x823b, 0x05,
+ 0x823c, 0x12,
+ 0x823d, 0x0e,
+ 0x823e, 0xda,
+ 0x823f, 0x40,
+ 0x8240, 0x09,
+ 0x8241, 0x78,
+ 0x8242, 0xb9,
+ 0x8243, 0xe6,
+ 0x8244, 0x78,
+ 0x8245, 0xbe,
+ 0x8246, 0xf6,
+ 0x8247, 0x75,
+ 0x8248, 0x1f,
+ 0x8249, 0x04,
+ 0x824a, 0x78,
+ 0x824b, 0xbe,
+ 0x824c, 0xe6,
+ 0x824d, 0x75,
+ 0x824e, 0xf0,
+ 0x824f, 0x05,
+ 0x8250, 0xa4,
+ 0x8251, 0xf5,
+ 0x8252, 0x4b,
+ 0x8253, 0x02,
+ 0x8254, 0x0a,
+ 0x8255, 0xff,
+ 0x8256, 0xe5,
+ 0x8257, 0x1f,
+ 0x8258, 0xb4,
+ 0x8259, 0x04,
+ 0x825a, 0x10,
+ 0x825b, 0x90,
+ 0x825c, 0x0e,
+ 0x825d, 0x94,
+ 0x825e, 0xe4,
+ 0x825f, 0x78,
+ 0x8260, 0xc3,
+ 0x8261, 0x12,
+ 0x8262, 0x0e,
+ 0x8263, 0xe9,
+ 0x8264, 0x40,
+ 0x8265, 0x02,
+ 0x8266, 0xd2,
+ 0x8267, 0x37,
+ 0x8268, 0x75,
+ 0x8269, 0x1f,
+ 0x826a, 0x05,
+ 0x826b, 0x22,
+ 0x826c, 0x30,
+ 0x826d, 0x01,
+ 0x826e, 0x03,
+ 0x826f, 0x02,
+ 0x8270, 0x04,
+ 0x8271, 0xc0,
+ 0x8272, 0x30,
+ 0x8273, 0x02,
+ 0x8274, 0x03,
+ 0x8275, 0x02,
+ 0x8276, 0x04,
+ 0x8277, 0xc0,
+ 0x8278, 0x90,
+ 0x8279, 0x51,
+ 0x827a, 0xa5,
+ 0x827b, 0xe0,
+ 0x827c, 0x78,
+ 0x827d, 0x93,
+ 0x827e, 0xf6,
+ 0x827f, 0xa3,
+ 0x8280, 0xe0,
+ 0x8281, 0x08,
+ 0x8282, 0xf6,
+ 0x8283, 0xa3,
+ 0x8284, 0xe0,
+ 0x8285, 0x08,
+ 0x8286, 0xf6,
+ 0x8287, 0xe5,
+ 0x8288, 0x1f,
+ 0x8289, 0x70,
+ 0x828a, 0x3c,
+ 0x828b, 0x75,
+ 0x828c, 0x1e,
+ 0x828d, 0x20,
+ 0x828e, 0xd2,
+ 0x828f, 0x35,
+ 0x8290, 0x12,
+ 0x8291, 0x0c,
+ 0x8292, 0x7a,
+ 0x8293, 0x78,
+ 0x8294, 0x7e,
+ 0x8295, 0xa6,
+ 0x8296, 0x06,
+ 0x8297, 0x08,
+ 0x8298, 0xa6,
+ 0x8299, 0x07,
+ 0x829a, 0x78,
+ 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08,
+ 0x8324, 0xa6,
+ 0x8325, 0x07,
+ 0x8326, 0x78,
+ 0x8327, 0x8a,
+ 0x8328, 0xe6,
+ 0x8329, 0x24,
+ 0x832a, 0x6e,
+ 0x832b, 0xf8,
+ 0x832c, 0xa6,
+ 0x832d, 0x09,
+ 0x832e, 0x78,
+ 0x832f, 0x8a,
+ 0x8330, 0xe6,
+ 0x8331, 0x24,
+ 0x8332, 0x01,
+ 0x8333, 0xff,
+ 0x8334, 0xe4,
+ 0x8335, 0x33,
+ 0x8336, 0xfe,
+ 0x8337, 0xd3,
+ 0x8338, 0xef,
+ 0x8339, 0x94,
+ 0x833a, 0x0f,
+ 0x833b, 0xee,
+ 0x833c, 0x64,
+ 0x833d, 0x80,
+ 0x833e, 0x94,
+ 0x833f, 0x80,
+ 0x8340, 0x40,
+ 0x8341, 0x04,
+ 0x8342, 0x7f,
+ 0x8343, 0x00,
+ 0x8344, 0x80,
+ 0x8345, 0x05,
+ 0x8346, 0x78,
+ 0x8347, 0x8a,
+ 0x8348, 0xe6,
+ 0x8349, 0x04,
+ 0x834a, 0xff,
+ 0x834b, 0x78,
+ 0x834c, 0x8a,
+ 0x834d, 0xa6,
+ 0x834e, 0x07,
+ 0x834f, 0xe5,
+ 0x8350, 0x1f,
+ 0x8351, 0xb4,
+ 0x8352, 0x01,
+ 0x8353, 0x0a,
+ 0x8354, 0xe6,
+ 0x8355, 0x60,
+ 0x8356, 0x03,
+ 0x8357, 0x02,
+ 0x8358, 0x04,
+ 0x8359, 0xc0,
+ 0x835a, 0x75,
+ 0x835b, 0x1f,
+ 0x835c, 0x02,
+ 0x835d, 0x22,
+ 0x835e, 0x12,
+ 0x835f, 0x0c,
+ 0x8360, 0x7a,
+ 0x8361, 0x78,
+ 0x8362, 0x80,
+ 0x8363, 0xa6,
+ 0x8364, 0x06,
+ 0x8365, 0x08,
+ 0x8366, 0xa6,
+ 0x8367, 0x07,
+ 0x8368, 0x12,
+ 0x8369, 0x0c,
+ 0x836a, 0x7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 0x83f3, 0x07,
+ 0x83f4, 0xc3,
+ 0x83f5, 0x79,
+ 0x83f6, 0x8c,
+ 0x83f7, 0xe7,
+ 0x83f8, 0x78,
+ 0x83f9, 0x8d,
+ 0x83fa, 0x96,
+ 0x83fb, 0x08,
+ 0x83fc, 0xf6,
+ 0x83fd, 0xd3,
+ 0x83fe, 0x79,
+ 0x83ff, 0x81,
+ 0x8400, 0xe7,
+ 0x8401, 0x78,
+ 0x8402, 0x7f,
+ 0x8403, 0x96,
+ 0x8404, 0x19,
+ 0x8405, 0xe7,
+ 0x8406, 0x18,
+ 0x8407, 0x96,
+ 0x8408, 0x40,
+ 0x8409, 0x05,
+ 0x840a, 0x09,
+ 0x840b, 0xe7,
+ 0x840c, 0x08,
+ 0x840d, 0x80,
+ 0x840e, 0x06,
+ 0x840f, 0xc3,
+ 0x8410, 0x79,
+ 0x8411, 0x7f,
+ 0x8412, 0xe7,
+ 0x8413, 0x78,
+ 0x8414, 0x81,
+ 0x8415, 0x96,
+ 0x8416, 0xff,
+ 0x8417, 0x19,
+ 0x8418, 0xe7,
+ 0x8419, 0x18,
+ 0x841a, 0x96,
+ 0x841b, 0xfe,
+ 0x841c, 0x78,
+ 0x841d, 0x86,
+ 0x841e, 0xa6,
+ 0x841f, 0x06,
+ 0x8420, 0x08,
+ 0x8421, 0xa6,
+ 0x8422, 0x07,
+ 0x8423, 0x79,
+ 0x8424, 0x8c,
+ 0x8425, 0xe7,
+ 0x8426, 0xd3,
+ 0x8427, 0x78,
+ 0x8428, 0x8b,
+ 0x8429, 0x96,
+ 0x842a, 0x40,
+ 0x842b, 0x05,
+ 0x842c, 0xe7,
+ 0x842d, 0x96,
+ 0x842e, 0xff,
+ 0x842f, 0x80,
+ 0x8430, 0x08,
+ 0x8431, 0xc3,
+ 0x8432, 0x79,
+ 0x8433, 0x8b,
+ 0x8434, 0xe7,
+ 0x8435, 0x78,
+ 0x8436, 0x8c,
+ 0x8437, 0x96,
+ 0x8438, 0xff,
+ 0x8439, 0x78,
+ 0x843a, 0x8f,
+ 0x843b, 0xa6,
+ 0x843c, 0x07,
+ 0x843d, 0xe5,
+ 0x843e, 0x1f,
+ 0x843f, 0x64,
+ 0x8440, 0x02,
+ 0x8441, 0x70,
+ 0x8442, 0x69,
+ 0x8443, 0x90,
+ 0x8444, 0x0e,
+ 0x8445, 0x91,
+ 0x8446, 0x93,
+ 0x8447, 0xff,
+ 0x8448, 0x18,
+ 0x8449, 0xe6,
+ 0x844a, 0xc3,
+ 0x844b, 0x9f,
+ 0x844c, 0x50,
+ 0x844d, 0x72,
+ 0x844e, 0x12,
+ 0x844f, 0x0c,
+ 0x8450, 0x4a,
+ 0x8451, 0x12,
+ 0x8452, 0x0c,
+ 0x8453, 0x2f,
+ 0x8454, 0x90,
+ 0x8455, 0x0e,
+ 0x8456, 0x8e,
+ 0x8457, 0x12,
+ 0x8458, 0x0c,
+ 0x8459, 0x38,
+ 0x845a, 0x78,
+ 0x845b, 0x80,
+ 0x845c, 0x12,
+ 0x845d, 0x0c,
+ 0x845e, 0x6b,
+ 0x845f, 0x7b,
+ 0x8460, 0x04,
+ 0x8461, 0x12,
+ 0x8462, 0x0c,
+ 0x8463, 0x1d,
+ 0x8464, 0xc3,
+ 0x8465, 0x12,
+ 0x8466, 0x06,
+ 0x8467, 0x45,
+ 0x8468, 0x50,
+ 0x8469, 0x56,
+ 0x846a, 0x90,
+ 0x846b, 0x0e,
+ 0x846c, 0x92,
+ 0x846d, 0xe4,
+ 0x846e, 0x93,
+ 0x846f, 0xff,
+ 0x8470, 0x78,
+ 0x8471, 0x8f,
+ 0x8472, 0xe6,
+ 0x8473, 0x9f,
+ 0x8474, 0x40,
+ 0x8475, 0x02,
+ 0x8476, 0x80,
+ 0x8477, 0x11,
+ 0x8478, 0x90,
+ 0x8479, 0x0e,
+ 0x847a, 0x90,
+ 0x847b, 0xe4,
+ 0x847c, 0x93,
+ 0x847d, 0xff,
+ 0x847e, 0xd3,
+ 0x847f, 0x78,
+ 0x8480,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 0x865f, 0xfd,
+ 0x8660, 0xee,
+ 0x8661, 0x13,
+ 0x8662, 0xfe,
+ 0x8663, 0xef,
+ 0x8664, 0x13,
+ 0x8665, 0xff,
+ 0x8666, 0xd8,
+ 0x8667, 0xf1,
+ 0x8668, 0x22,
+ 0x8669, 0xe8,
+ 0x866a, 0x60,
+ 0x866b, 0x0f,
+ 0x866c, 0xef,
+ 0x866d, 0xc3,
+ 0x866e, 0x33,
+ 0x866f, 0xff,
+ 0x8670, 0xee,
+ 0x8671, 0x33,
+ 0x8672, 0xfe,
+ 0x8673, 0xed,
+ 0x8674, 0x33,
+ 0x8675, 0xfd,
+ 0x8676, 0xec,
+ 0x8677, 0x33,
+ 0x8678, 0xfc,
+ 0x8679, 0xd8,
+ 0x867a, 0xf1,
+ 0x867b, 0x22,
+ 0x867c, 0xe4,
+ 0x867d, 0x93,
+ 0x867e, 0xfc,
+ 0x867f, 0x74,
+ 0x8680, 0x01,
+ 0x8681, 0x93,
+ 0x8682, 0xfd,
+ 0x8683, 0x74,
+ 0x8684, 0x02,
+ 0x8685, 0x93,
+ 0x8686, 0xfe,
+ 0x8687, 0x74,
+ 0x8688, 0x03,
+ 0x8689, 0x93,
+ 0x868a, 0xff,
+ 0x868b, 0x22,
+ 0x868c, 0xe6,
+ 0x868d, 0xfb,
+ 0x868e, 0x08,
+ 0x868f, 0xe6,
+ 0x8690, 0xf9,
+ 0x8691, 0x08,
+ 0x8692, 0xe6,
+ 0x8693, 0xfa,
+ 0x8694, 0x08,
+ 0x8695, 0xe6,
+ 0x8696, 0xcb,
+ 0x8697, 0xf8,
+ 0x8698, 0x22,
+ 0x8699, 0xec,
+ 0x869a, 0xf6,
+ 0x869b, 0x08,
+ 0x869c, 0xed,
+ 0x869d, 0xf6,
+ 0x869e, 0x08,
+ 0x869f, 0xee,
+ 0x86a0, 0xf6,
+ 0x86a1, 0x08,
+ 0x86a2, 0xef,
+ 0x86a3, 0xf6,
+ 0x86a4, 0x22,
+ 0x86a5, 0x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e, 0x13,
+ 0x872f, 0xd8,
+ 0x8730, 0xf9,
+ 0x8731, 0x79,
+ 0x8732, 0x53,
+ 0x8733, 0xf7,
+ 0x8734, 0xee,
+ 0x8735, 0x19,
+ 0x8736, 0xf7,
+ 0x8737, 0x90,
+ 0x8738, 0x38,
+ 0x8739, 0x15,
+ 0x873a, 0xe0,
+ 0x873b, 0xb4,
+ 0x873c, 0x31,
+ 0x873d, 0x07,
+ 0x873e, 0x78,
+ 0x873f, 0x54,
+ 0x8740, 0x79,
+ 0x8741, 0x54,
+ 0x8742, 0x12,
+ 0x8743, 0x0c,
+ 0x8744, 0x13,
+ 0x8745, 0x90,
+ 0x8746, 0x38,
+ 0x8747, 0x15,
+ 0x8748, 0xe0,
+ 0x8749, 0xb4,
+ 0x874a, 0x71,
+ 0x874b, 0x15,
+ 0x874c, 0x78,
+ 0x874d, 0x54,
+ 0x874e, 0xe6,
+ 0x874f, 0xfe,
+ 0x8750, 0x08,
+ 0x8751, 0xe6,
+ 0x8752, 0x78,
+ 0x8753, 0x02,
+ 0x8754, 0xce,
+ 0x8755, 0xc3,
+ 0x8756, 0x13,
+ 0x8757, 0xce,
+ 0x8758, 0x13,
+ 0x8759, 0xd8,
+ 0x875a, 0xf9,
+ 0x875b, 0x79,
+ 0x875c, 0x55,
+ 0x875d, 0xf7,
+ 0x875e, 0xee,
+ 0x875f, 0x19,
+ 0x8760, 0xf7,
+ 0x8761, 0x79,
+ 0x8762, 0x52,
+ 0x8763, 0x12,
+ 0x8764, 0x0b,
+ 0x8765, 0xd9,
+ 0x8766, 0x09,
+ 0x8767, 0x12,
+ 0x8768, 0x0b,
+ 0x8769, 0xd9,
+ 0x876a, 0xaf,
+ 0x876b, 0x47,
+ 0x876c, 0x12,
+ 0x876d, 0x0b,
+ 0x876e, 0xb2,
+ 0x876f, 0xe5,
+ 0x8770, 0x44,
+ 0x8771, 0xfb,
+ 0x8772, 0x7a,
+ 0x8773, 0x00,
+ 0x8774, 0xfd,
+ 0x8775,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,
+ 0x87fe, 0x0c,
+ 0x87ff, 0x08,
+ 0x8800, 0x80,
+ 0x8801, 0x04,
+ 0x8802, 0x7e,
+ 0x8803, 0x00,
+ 0x8804, 0x7f,
+ 0x8805, 0x00,
+ 0x8806, 0x78,
+ 0x8807, 0x5e,
+ 0x8808, 0x12,
+ 0x8809, 0x0b,
+ 0x880a, 0xbe,
+ 0x880b, 0xff,
+ 0x880c, 0xd3,
+ 0x880d, 0x78,
+ 0x880e, 0x59,
+ 0x880f, 0xe6,
+ 0x8810, 0x9f,
+ 0x8811, 0x18,
+ 0x8812, 0xe6,
+ 0x8813, 0x9e,
+ 0x8814, 0x40,
+ 0x8815, 0x0e,
+ 0x8816, 0x78,
+ 0x8817, 0x5c,
+ 0x8818, 0xe6,
+ 0x8819, 0x13,
+ 0x881a, 0xfe,
+ 0x881b, 0x08,
+ 0x881c, 0xe6,
+ 0x881d, 0x78,
+ 0x881e, 0x59,
+ 0x881f, 0x12,
+ 0x8820, 0x0c,
+ 0x8821, 0x08,
+ 0x8822, 0x80,
+ 0x8823, 0x04,
+ 0x8824, 0x7e,
+ 0x8825, 0x00,
+ 0x8826, 0x7f,
+ 0x8827, 0x00,
+ 0x8828, 0xe4,
+ 0x8829, 0xfc,
+ 0x882a, 0xfd,
+ 0x882b, 0x78,
+ 0x882c, 0x62,
+ 0x882d, 0x12,
+ 0x882e, 0x06,
+ 0x882f, 0x99,
+ 0x8830, 0x78,
+ 0x8831, 0x5a,
+ 0x8832, 0x12,
+ 0x8833, 0x0b,
+ 0x8834, 0xc6,
+ 0x8835, 0x78,
+ 0x8836, 0x57,
+ 0x8837, 0x26,
+ 0x8838, 0xff,
+ 0x8839, 0xee,
+ 0x883a, 0x18,
+ 0x883b, 0x36,
+ 0x883c, 0xfe,
+ 0x883d, 0x78,
+ 0x883e, 0x66,
+ 0x883f, 0x12,
+ 0x8840, 0x0b,
+ 0x8841, 0xbe,
+ 0x8842, 0x78,
+ 0x8843, 0x59,
+ 0x8844, 0x26,
+ 0x8845, 0xff,
+ 0x8846, 0xee,
+ 0x8847, 0x18,
+ 0x8848, 0x36,
+ 0x8849, 0xfe,
+ 0x884a, 0xe4,
+ 0x884b, 0xfc,
+ 0x884c, 0xfd,
+ 0x884d, 0x78,
+ 0x884e, 0x6a,
+ 0x884f, 0x12,
+ 0x8850, 0x06,
+ 0x8851, 0x99,
+ 0x8852, 0x12,
+ 0x8853, 0x0b,
+ 0x8854, 0xce,
+ 0x8855, 0x78,
+ 0x8856, 0x66,
+ 0x8857, 0x12,
+ 0x8858, 0x06,
+ 0x8859, 0x8c,
+ 0x885a, 0xd3,
+ 0x885b, 0x12,
+ 0x885c, 0x06,
+ 0x885d, 0x45,
+ 0x885e, 0x40,
+ 0x885f, 0x08,
+ 0x8860, 0x12,
+ 0x8861, 0x0b,
+ 0x8862, 0xce,
+ 0x8863, 0x78,
+ 0x8864, 0x66,
+ 0x8865, 0x12,
+ 0x8866, 0x06,
+ 0x8867, 0x99,
+ 0x8868, 0x78,
+ 0x8869, 0x54,
+ 0x886a, 0x12,
+ 0x886b, 0x0b,
+ 0x886c, 0xd0,
+ 0x886d, 0x78,
+ 0x886e, 0x6a,
+ 0x886f, 0x12,
+ 0x8870, 0x06,
+ 0x8871, 0x8c,
+ 0x8872, 0xd3,
+ 0x8873, 0x12,
+ 0x8874, 0x06,
+ 0x8875, 0x45,
+ 0x8876, 0x40,
+ 0x8877, 0x0a,
+ 0x8878, 0x78,
+ 0x8879, 0x54,
+ 0x887a, 0x12,
+ 0x887b, 0x0b,
+ 0x887c, 0xd0,
+ 0x887d, 0x78,
+ 0x887e, 0x6a,
+ 0x887f, 0x12,
+ 0x8880, 0x06,
+ 0x8881, 0x99,
+ 0x8882, 0x78,
+ 0x8883, 0x61,
+ 0x8884, 0xe6,
+ 0x8885, 0x90,
+ 0x8886, 0x60,
+ 0x8887, 0x01,
+ 0x8888, 0xf0,
+ 0x8889, 0x78,
+ 0x888a, 0x65,
+ 0x888b, 0xe6,
+ 0x888c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d,
+ 0x8914, 0x8f,
+ 0x8915, 0x0a,
+ 0x8916, 0x09,
+ 0x8917, 0x90,
+ 0x8918, 0x0a,
+ 0x8919, 0x1d,
+ 0x891a, 0x91,
+ 0x891b, 0x0a,
+ 0x891c, 0x1d,
+ 0x891d, 0x92,
+ 0x891e, 0x0a,
+ 0x891f, 0x1d,
+ 0x8920, 0x93,
+ 0x8921, 0x0a,
+ 0x8922, 0x1d,
+ 0x8923, 0x94,
+ 0x8924, 0x0a,
+ 0x8925, 0x1d,
+ 0x8926, 0x98,
+ 0x8927, 0x0a,
+ 0x8928, 0x17,
+ 0x8929, 0x9f,
+ 0x892a, 0x0a,
+ 0x892b, 0x1a,
+ 0x892c, 0xec,
+ 0x892d, 0x00,
+ 0x892e, 0x00,
+ 0x892f, 0x0a,
+ 0x8930, 0x38,
+ 0x8931, 0x12,
+ 0x8932, 0x0f,
+ 0x8933, 0x74,
+ 0x8934, 0x22,
+ 0x8935, 0x12,
+ 0x8936, 0x0f,
+ 0x8937, 0x74,
+ 0x8938, 0xd2,
+ 0x8939, 0x03,
+ 0x893a, 0x22,
+ 0x893b, 0xd2,
+ 0x893c, 0x03,
+ 0x893d, 0x22,
+ 0x893e, 0xc2,
+ 0x893f, 0x03,
+ 0x8940, 0x22,
+ 0x8941, 0xa2,
+ 0x8942, 0x37,
+ 0x8943, 0xe4,
+ 0x8944, 0x33,
+ 0x8945, 0xf5,
+ 0x8946, 0x3c,
+ 0x8947, 0x02,
+ 0x8948, 0x0a,
+ 0x8949, 0x1d,
+ 0x894a, 0xc2,
+ 0x894b, 0x01,
+ 0x894c, 0xc2,
+ 0x894d, 0x02,
+ 0x894e, 0xc2,
+ 0x894f, 0x03,
+ 0x8950, 0x12,
+ 0x8951, 0x0d,
+ 0x8952, 0x0d,
+ 0x8953, 0x75,
+ 0x8954, 0x1e,
+ 0x8955, 0x70,
+ 0x8956, 0xd2,
+ 0x8957, 0x35,
+ 0x8958, 0x02,
+ 0x8959, 0x0a,
+ 0x895a, 0x1d,
+ 0x895b, 0x02,
+ 0x895c, 0x0a,
+ 0x895d, 0x04,
+ 0x895e, 0x85,
+ 0x895f, 0x40,
+ 0x8960, 0x4a,
+ 0x8961, 0x85,
+ 0x8962, 0x3c,
+ 0x8963, 0x4b,
+ 0x8964, 0x12,
+ 0x8965, 0x0a,
+ 0x8966, 0xff,
+ 0x8967, 0x02,
+ 0x8968, 0x0a,
+ 0x8969, 0x1d,
+ 0x896a, 0x85,
+ 0x896b, 0x4a,
+ 0x896c, 0x40,
+ 0x896d, 0x85,
+ 0x896e, 0x4b,
+ 0x896f, 0x3c,
+ 0x8970, 0x02,
+ 0x8971, 0x0a,
+ 0x8972, 0x1d,
+ 0x8973, 0xe4,
+ 0x8974, 0xf5,
+ 0x8975, 0x22,
+ 0x8976, 0xf5,
+ 0x8977, 0x23,
+ 0x8978, 0x85,
+ 0x8979, 0x40,
+ 0x897a, 0x31,
+ 0x897b, 0x85,
+ 0x897c, 0x3f,
+ 0x897d, 0x30,
+ 0x897e, 0x85,
+ 0x897f, 0x3e,
+ 0x8980, 0x2f,
+ 0x8981, 0x85,
+ 0x8982, 0x3d,
+ 0x8983, 0x2e,
+ 0x8984, 0x12,
+ 0x8985, 0x0f,
+ 0x8986, 0x46,
+ 0x8987, 0x80,
+ 0x8988, 0x1f,
+ 0x8989, 0x75,
+ 0x898a, 0x22,
+ 0x898b, 0x00,
+ 0x898c, 0x75,
+ 0x898d, 0x23,
+ 0x898e, 0x01,
+ 0x898f, 0x74,
+ 0x8990, 0xff,
+ 0x8991, 0xf5,
+ 0x8992, 0x2d,
+ 0x8993, 0xf5,
+ 0x8994, 0x2c,
+ 0x8995, 0xf5,
+ 0x8996, 0x2b,
+ 0x8997, 0xf5,
+ 0x8998, 0x2a,
+ 0x8999, 0x12,
+ 0x899a, 0x0f,
+ 0x899b, 0x46,
+ 0x899c, 0x85,
+ 0x899d, 0x2d,
+ 0x899e, 0x40,
+ 0x899f, 0x85,
+ 0x89a0, 0x2c,
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 0x8feb, 0x06,
+ 0x8fec, 0xa5,
+ 0x3022, 0x00,
+ 0x3023, 0x00,
+ 0x3024, 0x00,
+ 0x3025, 0x00,
+ 0x3026, 0x00,
+ 0x3027, 0x00,
+ 0x3028, 0x00,
+ 0x3029, 0x7F,
+ 0x3000, 0x00,
+};
+
+#endif /* #ifndef __OV5640_FIRMWARE_H__ */
+
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.c b/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.c
new file mode 100755
index 00000000..89b72f9e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.c
@@ -0,0 +1,321 @@
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov7675.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, ov7675_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, ov7675_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov7675_wb_auto;
+ size = ARRAY_SIZE(ov7675_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov7675_wb_incandescent;
+ size = ARRAY_SIZE(ov7675_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov7675_wb_daylight;
+ size = ARRAY_SIZE(ov7675_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov7675_wb_cloudy;
+ size = ARRAY_SIZE(ov7675_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov7675_wb_fluorescent;
+ size = ARRAY_SIZE(ov7675_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = ov7675_scene_mode_auto;
+ size = ARRAY_SIZE(ov7675_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = ov7675_scene_mode_night;
+ size = ARRAY_SIZE(ov7675_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = ov7675_exposure_neg6;
+ size = ARRAY_SIZE(ov7675_exposure_neg6);
+ break;
+ case -1:
+ regs = ov7675_exposure_neg3;
+ size = ARRAY_SIZE(ov7675_exposure_neg3);
+ break;
+ case 0:
+ regs = ov7675_exposure_zero;
+ size = ARRAY_SIZE(ov7675_exposure_zero);
+ break;
+ case 1:
+ regs = ov7675_exposure_pos3;
+ size = ARRAY_SIZE(ov7675_exposure_pos3);
+ break;
+ case 2:
+ regs = ov7675_exposure_pos6;
+ size = ARRAY_SIZE(ov7675_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write(sd, 0x1e, data);
+ msleep(20);
+
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ data = sensor_read(sd, 0x1e);
+
+ switch (value) {
+ case 0:
+ data &= ~0x10;
+ break;
+ case 1:
+ data |= 0x10;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write(sd, 0x1e, data);
+ msleep(20);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ return (sensor_read(sd, 0x0a) == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, ov7675_default_regs_init,
+ ARRAY_SIZE(ov7675_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops ov7675_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev ov7675 = {
+ .name = "ov7675",
+ .i2c_addr = 0x21,
+ .id = 0x76,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &ov7675_ops,
+};
+
+#if 0
+static int __init ov7675_init(void)
+{
+ return cmos_register_sudbdev(&ov7675);
+}
+
+static void __exit ov7675_exit(void)
+{
+ return cmos_unregister_subdev(&ov7675);
+}
+
+module_init(ov7675_init);
+module_exit(ov7675_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.h b/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.h
new file mode 100755
index 00000000..160a45ee
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov7675/ov7675.h
@@ -0,0 +1,258 @@
+#ifndef OV7675_H
+#define OV7675_H
+
+
+// Scene Mode
+uint8_t ov7675_scene_mode_auto[] = {
+
+};
+
+uint8_t ov7675_scene_mode_night[] = {
+
+};
+
+// White Balance
+uint8_t ov7675_wb_auto [] = {
+ 0x01,0x56,
+ 0x02,0x44,
+ 0x13, 0xe7,
+};
+
+uint8_t ov7675_wb_incandescent [] = {
+ 0x13, 0xe5,
+ 0x01,0x9a,
+ 0x02,0x40,
+ 0x6A, 0x48,
+};
+
+uint8_t ov7675_wb_fluorescent [] = {
+ 0x13, 0xe5,
+ 0x01,0x8b,
+ 0x02,0x42,
+ 0x6A, 0x40,
+};
+
+uint8_t ov7675_wb_daylight [] = {
+ 0x13, 0xe5,
+ 0x01,0x56,
+ 0x02,0x5c,
+ 0x6A, 0x42,
+};
+
+uint8_t ov7675_wb_cloudy [] = {
+ 0x13, 0xe5,
+ 0x01,0x58,
+ 0x02,0x60,
+ 0x6A, 0x40,
+};
+
+
+// Exposure
+uint8_t ov7675_exposure_neg6[] = {
+ 0x55,0xb0,
+};
+
+uint8_t ov7675_exposure_neg3[] = {
+ 0x55,0x98,
+};
+
+uint8_t ov7675_exposure_zero[] = {
+ 0x55,0x00,
+};
+
+uint8_t ov7675_exposure_pos3[] = {
+ 0x55,0x18,
+};
+
+uint8_t ov7675_exposure_pos6[] = {
+ 0x55,0x30,
+};
+
+
+// Resolution
+uint8_t ov7675_320x240[]= {
+
+};
+
+uint8_t ov7675_640x480[] = {
+ 0x17, 0x13,
+ 0x18, 0x01,
+ 0x32, 0xbf,
+ 0x19, 0x03,
+ 0x1a, 0x7b,
+ 0x03, 0x0a,
+};
+
+uint8_t ov7675_default_regs_init[] = {
+ 0x12, 0x80,
+ 0x11, 0x80,
+ 0x2a, 0x00,
+ 0x2b, 0x00,
+ 0x92, 0x66,
+ 0x93, 0x00,
+ 0x12, 0x00,
+ 0x3a, 0x04,
+ 0x3d, 0xC1,
+ 0x15, 0x00,
+ 0xc1, 0x7f,
+ 0x17, 0x13,
+ 0x18, 0x01,
+ 0x32, 0xbF,
+ 0x19, 0x03,
+ 0x1a, 0x7b,
+ 0x03, 0x0a,
+ 0x0c, 0x00,
+ 0x3e, 0x00,
+ 0x70, 0x3a,
+ 0x71, 0x35,
+ 0x72, 0x11,
+ 0x73, 0xf0,
+ 0xa2, 0x02,
+ 0x13, 0xe0,
+ 0x10, 0x00,
+ 0x14, 0x28,
+ 0xa5, 0x06,
+ 0xab, 0x07,
+ 0x24, 0x58,
+ 0x25, 0x48,
+ 0x26, 0x93,
+ 0x9f, 0x78,
+ 0xa0, 0x68,
+ 0xa1, 0x03,
+ 0xa6, 0xD8,
+ 0xa7, 0xD8,
+ 0xa8, 0xf0,
+ 0xa9, 0x90,
+ 0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mt_v4l2/sensors/ov9740/ov9740.c
new file mode 100755
index 00000000..38715b57
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.c
@@ -0,0 +1,348 @@
+/*
+ * Driver for ov9740 CMOS Image Sensor from Omnivision
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "ov9740.h"
+
+//#define sensor_write_array(sd, arr, sz) cmos_init_16bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16addr(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg, val)
+
+static void sensor_write_array(struct cmos_subdev *sd, uint32_t *arr, size_t sz)
+{
+ uint32_t reg, data;
+ int i;
+
+ for (i = 0; i < sz; i += 2) {
+ reg = arr[i];
+ data = arr[i+1];
+
+ if (reg == 0xffff)
+ msleep(data);
+ else
+ wmt_vid_i2c_write16addr(sd->i2c_addr, reg ,data);
+ }
+}
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, ov9740_640_480_regs),
+ //CMOS_WIN_SIZE("SVGA", 800, 600, ov9740_800_600_regs),
+ CMOS_WIN_SIZE("720p", 1280, 720, ov9740_1280_720_regs),
+// CMOS_WIN_SIZE("UXGA", 1600, 1200, ov9740_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = ov9740_wb_auto;
+ size = ARRAY_SIZE(ov9740_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = ov9740_wb_incandescent;
+ size = ARRAY_SIZE(ov9740_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = ov9740_wb_daylight;
+ size = ARRAY_SIZE(ov9740_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = ov9740_wb_cloudy;
+ size = ARRAY_SIZE(ov9740_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = ov9740_wb_fluorescent;
+ size = ARRAY_SIZE(ov9740_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ msleep(100);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = ov9740_scene_mode_auto;
+ size = ARRAY_SIZE(ov9740_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = ov9740_scene_mode_night;
+ size = ARRAY_SIZE(ov9740_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = ov9740_exposure_neg6;
+ size = ARRAY_SIZE(ov9740_exposure_neg6);
+ break;
+ case -1:
+ regs = ov9740_exposure_neg3;
+ size = ARRAY_SIZE(ov9740_exposure_neg3);
+ break;
+ case 0:
+ regs = ov9740_exposure_zero;
+ size = ARRAY_SIZE(ov9740_exposure_zero);
+ break;
+ case 1:
+ regs = ov9740_exposure_pos3;
+ size = ARRAY_SIZE(ov9740_exposure_pos3);
+ break;
+ case 2:
+ regs = ov9740_exposure_pos6;
+ size = ARRAY_SIZE(ov9740_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x0101);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x0101, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint32_t data = sensor_read(sd, 0x0101);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x0101, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_FLASH:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+
+ data |= (sensor_read(sd, 0x300a) & 0xff) << 8;
+ data |= (sensor_read(sd, 0x300b) & 0xff);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+ if (sensor_identify(sd))
+ return -1;
+
+ sensor_write_array(sd, ov9740_default_regs_init,
+ ARRAY_SIZE(ov9740_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, ov9740_default_regs_exit,
+ ARRAY_SIZE(ov9740_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops ov9740_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev ov9740 = {
+ .name = "ov9740",
+ .i2c_addr = 0x10,
+ .id = 0x9740,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &ov9740_ops,
+};
+
+#if 0
+static int __init ov9740_init(void)
+{
+ return cmos_register_sudbdev(&ov9740);
+}
+
+static void __exit ov9740_exit(void)
+{
+ cmos_unregister_subdev(&ov9740);
+ return;
+}
+
+module_init(ov9740_init);
+module_exit(ov9740_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.h b/drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.h
new file mode 100755
index 00000000..f6b6c5e9
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/ov9740/ov9740.h
@@ -0,0 +1,688 @@
+#ifndef OV9740_H
+#define OV9740_H
+
+#define STREAMING_DELAY_MS 300
+
+#define OV9740_MODEL_ID_HI 0x0000
+#define OV9740_MODEL_ID_LO 0x0001
+#define OV9740_REVISION_NUMBER 0x0002
+#define OV9740_MANUFACTURER_ID 0x0003
+#define OV9740_SMIA_VERSION 0x0004
+
+/* General Setup Registers */
+#define OV9740_MODE_SELECT 0x0100
+#define OV9740_IMAGE_ORT 0x0101
+#define OV9740_SOFTWARE_RESET 0x0103
+#define OV9740_GRP_PARAM_HOLD 0x0104
+#define OV9740_MSK_CORRUP_FM 0x0105
+
+/* Timing Setting */
+#define OV9740_FRM_LENGTH_LN_HI 0x0340 /* VTS */
+#define OV9740_FRM_LENGTH_LN_LO 0x0341 /* VTS */
+#define OV9740_LN_LENGTH_PCK_HI 0x0342 /* HTS */
+#define OV9740_LN_LENGTH_PCK_LO 0x0343 /* HTS */
+#define OV9740_X_ADDR_START_HI 0x0344
+#define OV9740_X_ADDR_START_LO 0x0345
+#define OV9740_Y_ADDR_START_HI 0x0346
+#define OV9740_Y_ADDR_START_LO 0x0347
+#define OV9740_X_ADDR_END_HI 0x0348
+#define OV9740_X_ADDR_END_LO 0x0349
+#define OV9740_Y_ADDR_END_HI 0x034A
+#define OV9740_Y_ADDR_END_LO 0x034B
+#define OV9740_X_OUTPUT_SIZE_HI 0x034C
+#define OV9740_X_OUTPUT_SIZE_LO 0x034D
+#define OV9740_Y_OUTPUT_SIZE_HI 0x034E
+#define OV9740_Y_OUTPUT_SIZE_LO 0x034F
+
+/* IO Control Registers */
+#define OV9740_IO_CREL00 0x3002
+#define OV9740_IO_CREL01 0x3004
+#define OV9740_IO_CREL02 0x3005
+#define OV9740_IO_OUTPUT_SEL01 0x3026
+#define OV9740_IO_OUTPUT_SEL02 0x3027
+
+/* AWB Registers */
+#define OV9740_AWB_MANUAL_CTRL 0x3406
+
+/* Analog Control Registers */
+#define OV9740_ANALOG_CTRL01 0x3601
+#define OV9740_ANALOG_CTRL02 0x3602
+#define OV9740_ANALOG_CTRL03 0x3603
+#define OV9740_ANALOG_CTRL04 0x3604
+#define OV9740_ANALOG_CTRL10 0x3610
+#define OV9740_ANALOG_CTRL12 0x3612
+#define OV9740_ANALOG_CTRL20 0x3620
+#define OV9740_ANALOG_CTRL21 0x3621
+#define OV9740_ANALOG_CTRL22 0x3622
+#define OV9740_ANALOG_CTRL30 0x3630
+#define OV9740_ANALOG_CTRL31 0x3631
+#define OV9740_ANALOG_CTRL32 0x3632
+#define OV9740_ANALOG_CTRL33 0x3633
+
+/* Sensor Control */
+#define OV9740_SENSOR_CTRL03 0x3703
+#define OV9740_SENSOR_CTRL04 0x3704
+#define OV9740_SENSOR_CTRL05 0x3705
+#define OV9740_SENSOR_CTRL07 0x3707
+
+/* Timing Control */
+#define OV9740_TIMING_CTRL17 0x3817
+#define OV9740_TIMING_CTRL19 0x3819
+#define OV9740_TIMING_CTRL33 0x3833
+#define OV9740_TIMING_CTRL35 0x3835
+
+/* Banding Filter */
+#define OV9740_AEC_MAXEXPO_60_H 0x3A02
+#define OV9740_AEC_MAXEXPO_60_L 0x3A03
+#define OV9740_AEC_B50_STEP_HI 0x3A08
+#define OV9740_AEC_B50_STEP_LO 0x3A09
+#define OV9740_AEC_B60_STEP_HI 0x3A0A
+#define OV9740_AEC_B60_STEP_LO 0x3A0B
+#define OV9740_AEC_CTRL0D 0x3A0D
+#define OV9740_AEC_CTRL0E 0x3A0E
+#define OV9740_AEC_MAXEXPO_50_H 0x3A14
+#define OV9740_AEC_MAXEXPO_50_L 0x3A15
+
+/* AEC/AGC Control */
+#define OV9740_AEC_ENABLE 0x3503
+#define OV9740_GAIN_CEILING_01 0x3A18
+#define OV9740_GAIN_CEILING_02 0x3A19
+#define OV9740_AEC_HI_THRESHOLD 0x3A11
+#define OV9740_AEC_3A1A 0x3A1A
+#define OV9740_AEC_CTRL1B_WPT2 0x3A1B
+#define OV9740_AEC_CTRL0F_WPT 0x3A0F
+#define OV9740_AEC_CTRL10_BPT 0x3A10
+#define OV9740_AEC_CTRL1E_BPT2 0x3A1E
+#define OV9740_AEC_LO_THRESHOLD 0x3A1F
+
+/* BLC Control */
+#define OV9740_BLC_AUTO_ENABLE 0x4002
+#define OV9740_BLC_MODE 0x4005
+
+/* VFIFO */
+#define OV9740_VFIFO_READ_START_HI 0x4608
+#define OV9740_VFIFO_READ_START_LO 0x4609
+
+/* DVP Control */
+#define OV9740_DVP_VSYNC_CTRL02 0x4702
+#define OV9740_DVP_VSYNC_MODE 0x4704
+#define OV9740_DVP_VSYNC_CTRL06 0x4706
+
+/* PLL Setting */
+#define OV9740_PLL_MODE_CTRL01 0x3104
+#define OV9740_PRE_PLL_CLK_DIV 0x0305
+#define OV9740_PLL_MULTIPLIER 0x0307
+#define OV9740_VT_SYS_CLK_DIV 0x0303
+#define OV9740_VT_PIX_CLK_DIV 0x0301
+#define OV9740_PLL_CTRL3010 0x3010
+#define OV9740_VFIFO_CTRL00 0x460E
+
+/* ISP Control */
+#define OV9740_ISP_CTRL00 0x5000
+#define OV9740_ISP_CTRL01 0x5001
+#define OV9740_ISP_CTRL03 0x5003
+#define OV9740_ISP_CTRL05 0x5005
+#define OV9740_ISP_CTRL12 0x5012
+#define OV9740_ISP_CTRL19 0x5019
+#define OV9740_ISP_CTRL1A 0x501A
+#define OV9740_ISP_CTRL1E 0x501E
+#define OV9740_ISP_CTRL1F 0x501F
+#define OV9740_ISP_CTRL20 0x5020
+#define OV9740_ISP_CTRL21 0x5021
+
+/* AWB */
+#define OV9740_AWB_CTRL00 0x5180
+#define OV9740_AWB_CTRL01 0x5181
+#define OV9740_AWB_CTRL02 0x5182
+#define OV9740_AWB_CTRL03 0x5183
+#define OV9740_AWB_ADV_CTRL01 0x5184
+#define OV9740_AWB_ADV_CTRL02 0x5185
+#define OV9740_AWB_ADV_CTRL03 0x5186
+#define OV9740_AWB_ADV_CTRL04 0x5187
+#define OV9740_AWB_ADV_CTRL05 0x5188
+#define OV9740_AWB_ADV_CTRL06 0x5189
+#define OV9740_AWB_ADV_CTRL07 0x518A
+#define OV9740_AWB_ADV_CTRL08 0x518B
+#define OV9740_AWB_ADV_CTRL09 0x518C
+#define OV9740_AWB_ADV_CTRL10 0x518D
+#define OV9740_AWB_ADV_CTRL11 0x518E
+#define OV9740_AWB_CTRL0F 0x518F
+#define OV9740_AWB_CTRL10 0x5190
+#define OV9740_AWB_CTRL11 0x5191
+#define OV9740_AWB_CTRL12 0x5192
+#define OV9740_AWB_CTRL13 0x5193
+#define OV9740_AWB_CTRL14 0x5194
+
+/* MIPI Control */
+#define OV9740_MIPI_CTRL00 0x4800
+#define OV9740_MIPI_3837 0x3837
+#define OV9740_MIPI_CTRL01 0x4801
+#define OV9740_MIPI_CTRL03 0x4803
+#define OV9740_MIPI_CTRL05 0x4805
+#define OV9740_VFIFO_RD_CTRL 0x4601
+#define OV9740_MIPI_CTRL_3012 0x3012
+#define OV9740_SC_CMMM_MIPI_CTR 0x3014
+
+// Scene Mode
+uint32_t ov9740_scene_mode_auto[] = {};
+
+uint32_t ov9740_scene_mode_night[] = {};
+
+
+// White Balance
+uint32_t ov9740_wb_auto [] = {};
+
+uint32_t ov9740_wb_incandescent [] = {};
+
+uint32_t ov9740_wb_fluorescent [] = {};
+
+uint32_t ov9740_wb_daylight [] = {};
+
+uint32_t ov9740_wb_cloudy [] = {};
+
+uint32_t ov9740_wb_tungsten [] = {};
+
+
+// Exposure
+uint32_t ov9740_exposure_neg6[] = {};
+
+uint32_t ov9740_exposure_neg3[] = {};
+
+uint32_t ov9740_exposure_zero[] = {};
+
+uint32_t ov9740_exposure_pos3[] = {};
+
+uint32_t ov9740_exposure_pos6[] = {};
+
+/*
+ * The color effect settings
+ */
+uint32_t ov9740_colorfx_none[] = {};
+
+uint32_t ov9740_colorfx_bw[] = {};
+
+uint32_t ov9740_colorfx_sepia[] = {};
+
+uint32_t ov9740_colorfx_negative[] = {};
+
+uint32_t ov9740_colorfx_emboss[] = {
+
+};
+
+uint32_t ov9740_colorfx_sketch[] = {
+};
+
+uint32_t ov9740_colorfx_sky_blue[] = {
+};
+
+uint32_t ov9740_colorfx_grass_green[] = {
+};
+
+uint32_t ov9740_colorfx_skin_whiten[] = {
+};
+
+uint32_t ov9740_colorfx_vivid[] = {
+};
+
+// Brightness
+uint32_t ov9740_brightness_neg4[] = {};
+
+uint32_t ov9740_brightness_neg3[] = {};
+
+uint32_t ov9740_brightness_neg2[] = {};
+
+uint32_t ov9740_brightness_neg1[] = {};
+
+uint32_t ov9740_brightness_zero[] = {};
+
+uint32_t ov9740_brightness_pos1[] = {};
+
+uint32_t ov9740_brightness_pos2[] = {};
+
+uint32_t ov9740_brightness_pos3[] = {};
+
+uint32_t ov9740_brightness_pos4[] = {};
+
+// Contrast
+uint32_t ov9740_contrast_neg4[] = {};
+
+uint32_t ov9740_contrast_neg3[] = {};
+
+uint32_t ov9740_contrast_neg2[] = {};
+
+uint32_t ov9740_contrast_neg1[] = {};
+
+uint32_t ov9740_contrast_zero[] = {};
+
+uint32_t ov9740_contrast_pos1[] = {};
+
+uint32_t ov9740_contrast_pos2[] = {};
+
+uint32_t ov9740_contrast_pos3[] = {};
+
+uint32_t ov9740_contrast_pos4[] = {};
+
+// Saturation
+uint32_t ov9740_saturation_neg4[] = {};
+
+uint32_t ov9740_saturation_neg3[] = {};
+
+uint32_t ov9740_saturation_neg2[] = {};
+
+uint32_t ov9740_saturation_neg1[] = {};
+
+uint32_t ov9740_saturation_zero[] = {};
+
+uint32_t ov9740_saturation_pos1[] = {};
+
+uint32_t ov9740_saturation_pos2[] = {};
+
+uint32_t ov9740_saturation_pos3[] = {};
+
+uint32_t ov9740_saturation_pos4[] = {};
+
+
+// Resolution
+uint32_t ov9740_640_480_regs[]={
+ 0x0101, 0x01 ,
+ 0x3104, 0x20 ,
+ 0x0305, 0x03 ,
+ 0x0307, 0x5b ,
+ 0x0303, 0x02 ,
+ 0x0301, 0x0a ,
+ 0x3010, 0x01 ,
+ 0x300e, 0x12 ,
+ 0x0340, 0x03 ,
+ 0x0341, 0x07 ,
+ 0x0342, 0x06 ,
+ 0x0343, 0x62 ,
+ 0x0344, 0x00 ,
+ 0x0345, 0xa8 ,
+ 0x0346, 0x00 ,
+ 0x0347, 0x04 ,
+ 0x0348, 0x04 ,
+ 0x0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 0x5020, 0x02 ,
+ 0x5021, 0xd0 ,
+ 0x530d, 0x06 ,
+ 0x0100, 0x01 ,
+};
+
+uint32_t ov9740_1600_1200_regs[]={
+
+};
+
+// init
+
+uint32_t ov9740_default_regs_init[]={
+// Software RESET
+ 0x0103, 0x01 ,
+//Mirror on, flip off
+ 0x0101, 0x01 ,
+// PLL setting
+ 0x3104, 0x20 , // Reset PLL2
+ 0x0305, 0x03 , // PLL1 pre_divider
+ 0x0307, 0x5f , // PLL1 multiplier
+ 0x0303, 0x01 , // PLL1 video pclk divider
+ 0x0301, 0x0a , // PLL1 video sysclk divider
+ 0x3010, 0x01 , // PLL1 scale divider
+//Timing setting
+ 0x0340, 0x03 , // VTS
+ 0x0341, 0x07 , // VTS
+ 0x0342, 0x06 , // HTS
+ 0x0343, 0x62 , // HTS
+ 0x0344, 0x00 , // X start
+ 0x0345, 0x08 , // X start
+ 0x0346, 0x00 , // Y start
+ 0x0347, 0x04 , // Y start
+ 0x0348, 0x05 , // X end
+ 0x0349, 0x0c , // X end
+ 0x034a, 0x02 , // Y end
+ 0x034b, 0xd8 , // Y end
+ 0x034c, 0x05 , // H output size
+ 0x034d, 0x00 , // H output size
+ 0x034e, 0x02 , // V output size
+ 0x034f, 0xd0 , // V output size
+// Output select
+ 0x3002, 0xe8 , // Vsync, Href, PCLK outout
+ 0x3004, 0x03 , // D[9:8] output
+ 0x3005, 0xff , // D[7:0] output
+ 0x3013, 0x60 , // MIPI control?
+ 0x3026, 0x00 , // D[9:8] data path
+ 0x3027, 0x00 , // D[7:0] data path
+// Analog control
+ 0x3601, 0x40 , // Analog control
+ 0x3602, 0x16 , // Analog control
+ 0x3603, 0xaa , // Analog control
+ 0x3604, 0x0c , // Analog control
+ 0x3610, 0xa1 , // Analog control
+ 0x3612, 0x24 , // Analog control
+ 0x3620, 0x66 , // Analog control
+ 0x3621, 0xc0 , // Analog control
+ 0x3622, 0x9f , // Analog control
+ 0x3630, 0xd2 , // Analog control
+ 0x3631, 0x5e , // Analog control
+ 0x3632, 0x27 , // Analog control
+ 0x3633, 0x50 , // Analog control
+// Sensor control
+ 0x3703, 0x42 , // Sensor control
+ 0x3704, 0x10 , // Sensor control
+ 0x3705, 0x45 , // Sensor control
+ 0x3707, 0x11 , // Sensor control
+// Timing control
+ 0x3817, 0x94 , // Internal timing control
+ 0x3819, 0x6e , // Internal timing control
+ 0x3831, 0x40 , // Digital gain enable
+ 0x3833, 0x04 , // Internal timing control
+ 0x3835, 0x04 , // Internal timing control
+// AEC/AGC control
+ 0x3503, 0x10 , // AEC/AGC off
+ 0x3a18, 0x01 , // Gain ceiling
+ 0x3a19, 0xb5 , // Gain ceiling = 27.3x
+ 0x3a1a, 0x05 , // Max diff
+ 0x3a11, 0x90 , // control zone High
+ 0x3a1b, 0x4a , // stable high out
+ 0x3a0f, 0x48 , // stable high in
+ 0x3a10, 0x44 , // stable low in
+ 0x3a1e, 0x42 , // stable low out
+ 0x3a1f, 0x22 , // control zone low
+// Banding filter
+ 0x3a08, 0x00 , // 50Hz banding step
+ 0x3a09, 0xe8 , // 50Hz banding step
+ 0x3a0e, 0x03 , // 50Hz banding Max
+ 0x3a14, 0x09 , // 50Hz Max exposure
+ 0x3a15, 0x15 , // 50Hz Max exposure
+ 0x3a0a, 0x00 , // 60Hz banding step
+ 0x3a0b, 0xc0 , // 60Hz banding step
+ 0x3a0d, 0x04 , // 60Hz banding Max
+ 0x3a02, 0x09 , // 60Hz Max exposure
+ 0x3a03, 0x15 , // 60Hz Max exposure
+//50/60 detection
+ 0x3c0a, 0x9c , // Number of samples
+ 0x3c0b, 0x3f , // Number of samples
+// BLC control
+ 0x4002, 0x45 , // BLC auto enable
+ 0x4005, 0x18 , // BLC mode
+// DVP control
+ 0x4702, 0x04 , // Vsync length high
+ 0x4704, 0x00 , // Vsync mode
+ 0x4706, 0x08 , // SOF/EOF negative edge to Vsync positive edge
+// ISP control
+ 0x5000, 0xff , // [7]LC [6]Gamma [3]DNS [2]BPC [1]WPC [0]CIP
+ 0x5001, 0xff , // [7]SDE [6]UV adjust [4]scale [3]contrast [2]UV average [1]CMX [0]AWB
+ 0x5003, 0xff , // [7]PAD [5]Buffer [3]Vario [1]BLC [0]AWB gain
+//AWB
+ 0x5180, 0xf0 , //AWB setting
+ 0x5181, 0x00 , //AWB setting
+ 0x5182, 0x41 , //AWB setting
+ 0x5183, 0x42 , //AWB setting
+ 0x5184, 0x80 , //AWB setting
+ 0x5185, 0x68 , //AWB setting
+ 0x5186, 0x93 , //AWB setting
+ 0x5187, 0xa8 , //AWB setting
+ 0x5188, 0x17 , //AWB setting
+ 0x5189, 0x45 , //AWB setting
+ 0x518a, 0x27 , //AWB setting
+ 0x518b, 0x41 , //AWB setting
+ 0x518c, 0x2d , //AWB setting
+ 0x518d, 0xf0 , //AWB setting
+ 0x518e, 0x10 , //AWB setting
+ 0x518f, 0xff , //AWB setting
+ 0x5190, 0x00 , //AWB setting
+ 0x5191, 0xff , //AWB setting
+ 0x5192, 0x00 , //AWB setting
+ 0x5193, 0xff , //AWB setting
+ 0x5194, 0x00 , //AWB setting
+// DNS
+ 0x529a, 0x02 , //noise Y list 0
+ 0x529b, 0x08 , //noise Y list 1
+ 0x529c, 0x0a , //noise Y list 2
+ 0x529d, 0x10 , //noise Y list 3
+ 0x529e, 0x10 , //noise Y list 4
+ 0x529f, 0x28 , //noise Y list 5
+ 0x52a0, 0x32 , //noise Y list 6
+ 0x52a2, 0x00 , //noise UV list 0[8]
+ 0x52a3, 0x02 , //noise UV list 0[7:0]
+ 0x52a4, 0x00 , //noise UV list 1[8]
+ 0x52a5, 0x04 , //noise UV list 1[7:0]
+ 0x52a6, 0x00 , //noise UV list 2[8]
+ 0x52a7, 0x08 , //noise UV list 2[7:0]
+ 0x52a8, 0x00 , //noise UV list 3[8]
+ 0x52a9, 0x10 , //noise UV list 3[7:0]
+ 0x52aa, 0x00 , //noise UV list 4[8]
+ 0x52ab, 0x38 , //noise UV list 4[7:0]
+ 0x52ac, 0x00 , //noise UV list 5[8]
+ 0x52ad, 0x3c , //noise UV list 5[7:0]
+ 0x52ae, 0x00 , //noise UV list 6[8]
+ 0x52af, 0x4c , //noise UV list 6[7:0]
+//CIP
+ 0x530d, 0x06 , //max sharpen
+//CMX
+ 0x5380, 0x01 , //CMX00[9:8]
+ 0x5381, 0x00 , //CMX00[7:0]
+ 0x5382, 0x00 , //CMX01[9:8]
+ 0x5383, 0x0d , //CMX01[7:0]
+ 0x5384, 0x00 , //CMX02[9:8]
+ 0x5385, 0x2f , //CMX02[7:0]
+ 0x5386, 0x00 , //CMX10[9:8]
+ 0x5387, 0x00 , //CMX10[7:0]
+ 0x5388, 0x00 , //CMX11[9:8]
+ 0x5389, 0xd3 , //CMX11[7:0]
+ 0x538a, 0x00 , //CMX12[9:8]
+ 0x538b, 0x0f , //CMX12[7:0]
+ 0x538c, 0x00 , //CMX20[9:8]
+ 0x538d, 0x00 , //CMX20[7:0]
+ 0x538e, 0x00 , //CMX21[9:8]
+ 0x538f, 0x32 , //CMX21[7:0]
+ 0x5390, 0x00 , //CMX22[9:8]
+ 0x5391, 0x94 , //CMX22[7:0]
+ 0x5392, 0x00 , //bit[0] CMX22 sign
+ 0x5393, 0xa4 , //CMX 21,20, 12, 11, 10, 02, 01, 00 sign
+ 0x5394, 0x18 , //CMX shift
+// Contrast
+ 0x5401, 0x2c , // bit[7:4] th1, birt[3:0]th2
+ 0x5403, 0x28 , // maximum high level
+ 0x5404, 0x06 , // minimum high level
+ 0x5405, 0xe0 , // minimum high level
+//Y Gamma
+ 0x5480, 0x04 , //Y List 0
+ 0x5481, 0x12 , //Y List 1
+ 0x5482, 0x27 , //Y List 2
+ 0x5483, 0x49 , //Y List 3
+ 0x5484, 0x57 , //Y List 4
+ 0x5485, 0x66 , //Y List 5
+ 0x5486, 0x75 , //Y List 6
+ 0x5487, 0x81 , //Y List 7
+ 0x5488, 0x8c , //Y List 8
+ 0x5489, 0x95 , //Y List 9
+ 0x548a, 0xa5 , //Y List a
+ 0x548b, 0xb2 , //Y List b
+ 0x548c, 0xc8 , //Y List c
+ 0x548d, 0xd9 , //Y List d
+ 0x548e, 0xec , //Y List e
+//UV Gamma
+ 0x5490, 0x01 , //UV List 0[11:8]
+ 0x5491, 0xc0 , //UV List 0[7:0]
+ 0x5492, 0x03 , //UV List 1[11:8]
+ 0x5493, 0x00 , //UV List 1[7:0]
+ 0x5494, 0x03 , //UV List 2[11:8]
+ 0x5495, 0xe0 , //UV List 2[7:0]
+ 0x5496, 0x03 , //UV List 3[11:8]
+ 0x5497, 0x10 , //UV List 3[7:0]
+ 0x5498, 0x02 , //UV List 4[11:8]
+ 0x5499, 0xac , //UV List 4[7:0]
+ 0x549a, 0x02 , //UV List 5[11:8]
+ 0x549b, 0x75 , //UV List 5[7:0]
+ 0x549c, 0x02 , //UV List 6[11:8]
+ 0x549d, 0x44 , //UV List 6[7:0]
+ 0x549e, 0x02 , //UV List 7[11:8]
+ 0x549f, 0x20 , //UV List 7[7:0]
+ 0x54a0, 0x02 , //UV List 8[11:8]
+ 0x54a1, 0x07 , //UV List 8[7:0]
+ 0x54a2, 0x01 , //UV List 9[11:8]
+ 0x54a3, 0xec , //UV List 9[7:0]
+ 0x54a4, 0x01 , //UV List 10[11:8]
+ 0x54a5, 0xc0 , //UV List 10[7:0]
+ 0x54a6, 0x01 , //UV List 11[11:8]
+ 0x54a7, 0x9b , //UV List 11[7:0]
+ 0x54a8, 0x01 , //UV List 12[11:8]
+ 0x54a9, 0x63 , //UV List 12[7:0]
+ 0x54aa, 0x01 , //UV List 13[11:8]
+ 0x54ab, 0x2b , //UV List 13[7:0]
+ 0x54ac, 0x01 , //UV List 14[11:8]
+ 0x54ad, 0x22 , //UV List 14[7:0]
+
+// UV adjusti
+ 0x4708, 0x01 ,
+ 0x4300, 0x30 ,
+ 0x5501, 0x1c , //UV adjust manual
+ 0x5502, 0x00 , //UV adjust th1[8]
+ 0x5503, 0x40 , //UV adjust th1[7:0]
+ 0x5504, 0x00 , //UV adjust th2[8]
+ 0x5505, 0x80 , //UV adjust th2[7:0]
+// Lens correction
+ 0x5800, 0x1c , // Lenc g00
+ 0x5801, 0x16 , // Lenc g01
+ 0x5802, 0x15 , // Lenc g02
+ 0x5803, 0x16 , // Lenc g03
+ 0x5804, 0x18 , // Lenc g04
+ 0x5805, 0x1a , // Lenc g05
+ 0x5806, 0x0c , // Lenc g10
+ 0x5807, 0x0a , // Lenc g11
+ 0x5808, 0x08 , // Lenc g12
+ 0x5809, 0x08 , // Lenc g13
+ 0x580a, 0x0a , // Lenc g14
+ 0x580b, 0x0b , // Lenc g15
+ 0x580c, 0x05 , // Lenc g20
+ 0x580d, 0x02 , // Lenc g21
+ 0x580e, 0x00 , // Lenc g22
+ 0x580f, 0x00 , // Lenc g23
+ 0x5810, 0x02 , // Lenc g24
+ 0x5811, 0x05 , // Lenc g25
+ 0x5812, 0x04 , // Lenc g30
+ 0x5813, 0x01 , // Lenc g31
+ 0x5814, 0x00 , // Lenc g32
+ 0x5815, 0x00 , // Lenc g33
+ 0x5816, 0x02 , // Lenc g34
+ 0x5817, 0x03 , // Lenc g35
+ 0x5818, 0x0a , // Lenc g40
+ 0x5819, 0x07 , // Lenc g41
+ 0x581a, 0x05 , // Lenc g42
+ 0x581b, 0x05 , // Lenc g43
+ 0x581c, 0x08 , // Lenc g44
+ 0x581d, 0x0b , // Lenc g45
+ 0x581e, 0x15 , // Lenc g50
+ 0x581f, 0x14 , // Lenc g51
+ 0x5820, 0x14 , // Lenc g52
+ 0x5821, 0x13 , // Lenc g53
+ 0x5822, 0x17 , // Lenc g54
+ 0x5823, 0x16 , // Lenc g55
+ 0x5824, 0x46 , // Lenc b00, r00
+ 0x5825, 0x4c , // Lenc b01, r01
+ 0x5826, 0x6c , // Lenc b02, r02
+ 0x5827, 0x4c , // Lenc b03, r03
+ 0x5828, 0x80 , // Lenc b04, r04
+ 0x5829, 0x2e , // Lenc b10, r10
+ 0x582a, 0x48 , // Lenc b11, r11
+ 0x582b, 0x46 , // Lenc b12, r12
+ 0x582c, 0x2a , // Lenc b13, r13
+ 0x582d, 0x68 , // Lenc b14, r14
+ 0x582e, 0x08 , // Lenc b20, r20
+ 0x582f, 0x26 , // Lenc b21, r21
+ 0x5830, 0x44 , // Lenc b22, r22
+ 0x5831, 0x46 , // Lenc b23, r23
+ 0x5832, 0x62 , // Lenc b24, r24
+ 0x5833, 0x0c , // Lenc b30, r30
+ 0x5834, 0x28 , // Lenc b31, r31
+ 0x5835, 0x46 , // Lenc b32, r32
+ 0x5836, 0x28 , // Lenc b33, r33
+ 0x5837, 0x88 , // Lenc b34, r34
+ 0x5838, 0x0e , // Lenc b40, r40
+ 0x5839, 0x0e , // Lenc b41, r41
+ 0x583a, 0x2c , // Lenc b42, r42
+ 0x583b, 0x2e , // Lenc b43, r43
+ 0x583c, 0x46 , // Lenc b44, r44
+ 0x583d, 0xca , // Lenc b offset, r offset
+ 0x583e, 0xf0 , // max gain
+ 0x5842, 0x02 , // br hscale[10:8]
+ 0x5843, 0x5e , // br hscale[7:0]
+ 0x5844, 0x04 , // br vscale[10:8]
+ 0x5845, 0x32 , // br vscale[7:0]
+ 0x5846, 0x03 , // g hscael[11:8]
+ 0x5847, 0x29 , // g hscale[7:0]
+ 0x5848, 0x02 , // g vscale[11:8]
+ 0x5849, 0xcc , // g vscale[7:0]
+ 0x5580, 0x06 , // sharpness on, saturation on
+ 0x3c00, 0x04 , // band 50hz
+ 0x3c01, 0x80 , // manual band on
+// Start streaming
+ 0x0100, 0x01 , // start streaming
+};
+uint32_t ov9740_default_regs_exit[]={};
+
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.c b/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.c
new file mode 100755
index 00000000..868fe727
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.c
@@ -0,0 +1,374 @@
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "s5k5ca.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_16bit_addr_16bit_data(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read16data(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write16data(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint32_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, s5k5ca_640_480_regs),
+ CMOS_WIN_SIZE("VGA", 2048, 1536, s5k5ca_2048_1536_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = s5k5ca_wb_auto;
+ size = ARRAY_SIZE(s5k5ca_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = s5k5ca_wb_incandescent;
+ size = ARRAY_SIZE(s5k5ca_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = s5k5ca_wb_daylight;
+ size = ARRAY_SIZE(s5k5ca_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = s5k5ca_wb_cloudy;
+ size = ARRAY_SIZE(s5k5ca_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = s5k5ca_wb_fluorescent;
+ size = ARRAY_SIZE(s5k5ca_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = s5k5ca_scene_mode_auto;
+ size = ARRAY_SIZE(s5k5ca_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = s5k5ca_scene_mode_night;
+ size = ARRAY_SIZE(s5k5ca_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint32_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = s5k5ca_exposure_neg6;
+ size = ARRAY_SIZE(s5k5ca_exposure_neg6);
+ break;
+ case -1:
+ regs = s5k5ca_exposure_neg3;
+ size = ARRAY_SIZE(s5k5ca_exposure_neg3);
+ break;
+ case 0:
+ regs = s5k5ca_exposure_zero;
+ size = ARRAY_SIZE(s5k5ca_exposure_zero);
+ break;
+ case 1:
+ regs = s5k5ca_exposure_pos3;
+ size = ARRAY_SIZE(s5k5ca_exposure_pos3);
+ break;
+ case 2:
+ regs = s5k5ca_exposure_pos6;
+ size = ARRAY_SIZE(s5k5ca_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+
+ uint32_t data;
+
+ sensor_write(sd,0xfcfc,0xd000);
+ sensor_write(sd,0x0028,0x7000);
+ sensor_write(sd,0x002a,0x0296);
+
+ data = 0;
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x02c6);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x02f6);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x0326);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ msleep(100);
+
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+
+ uint32_t data;
+
+ sensor_write(sd,0xfcfc,0xd000);
+ sensor_write(sd,0x0028,0x7000);
+ sensor_write(sd,0x002a,0x0296);
+
+ data = 0;
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x02c6);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x02f6);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x002a,0x0326);
+ sensor_write(sd,0x0f12,data);
+ sensor_write(sd,0x0f12,data);
+ msleep(100);
+
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint32_t data = 0;
+
+ sensor_write(sd,0xfcfc,0x0000);
+ data = sensor_read(sd,0x0040);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, s5k5ca_default_regs_init0,
+ ARRAY_SIZE(s5k5ca_default_regs_init0));
+ msleep(100);
+ sensor_write_array(sd, s5k5ca_default_regs_init1,
+ ARRAY_SIZE(s5k5ca_default_regs_init1));
+ msleep(100);
+ sensor_write_array(sd, s5k5ca_default_regs_init2,
+ ARRAY_SIZE(s5k5ca_default_regs_init2));
+
+ msleep(100);
+ sensor_write_array(sd, s5k5ca_default_regs_init3,
+ ARRAY_SIZE(s5k5ca_default_regs_init3));
+
+ msleep(100);
+ sensor_write_array(sd, s5k5ca_default_regs_init4,
+ ARRAY_SIZE(s5k5ca_default_regs_init3));
+
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops s5k5ca_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev s5k5ca = {
+ .name = "s5k5ca",
+ .i2c_addr = 0x3c,
+ .id = 0x5ca,
+ .max_width = 2048,
+ .max_height = 1536,
+ .ops = &s5k5ca_ops,
+};
+
+#if 0
+static int __init s5k5ca_init(void)
+{
+ return cmos_register_sudbdev(&s5k5ca);
+}
+
+static void __exit s5k5ca_exit(void)
+{
+ return cmos_unregister_subdev(&s5k5ca);
+}
+
+module_init(s5k5ca_init);
+module_exit(s5k5ca_exit);
+
+MODULE_LICENSE("GPL");
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.h b/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.h
new file mode 100755
index 00000000..6a5ed704
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/s5k5ca/s5k5ca.h
@@ -0,0 +1,3288 @@
+#ifndef S5K5CA_H
+#define S5K5CA_H
+
+// Scene Mode
+uint32_t s5k5ca_scene_mode_auto[] = {
+0xfcfc,0xd000,
+0x0028,0x7000,
+0x002A,0x023C,
+0x0F12,0x0000,
+0x002A,0x0240,
+0x0F12,0x0001,
+0x002A,0x0230,
+0x0F12,0x0001,
+0x002A,0x023E,
+0x0F12,0x0001,
+0x002A,0x0220,
+0x0F12,0x0001,
+0x0F12,0x0001,
+};
+
+uint32_t s5k5ca_scene_mode_night[] = {
+0xfcfc,0xd000,
+0x0028,0x7000,
+0x002A,0x023C,
+0x0F12,0x0003,
+0x002A,0x0240,
+0x0F12,0x0001,
+0x002A,0x0230,
+0x0F12,0x0001,
+0x002A,0x023E,
+0x0F12,0x0001,
+0x002A,0x0220,
+0x0F12,0x0001,
+0x0F12,0x0001,
+
+};
+
+
+// White Balance
+uint32_t s5k5ca_wb_auto [] = {
+0x002A,0x04D2,
+0x0F12,0x067F,
+};
+
+uint32_t s5k5ca_wb_incandescent [] = {
+0x002A, 0x04D2,
+0x0F12, 0x0677,
+0x002A, 0x04A0,
+0x0F12, 0x0126,
+0x0F12, 0x0001,
+0x002A, 0x04A4,
+0x0F12, 0x0100,
+0x0F12, 0x0001,
+0x002A, 0x04A8,
+0x0F12, 0x01C5,
+0x0F12, 0x0001,
+};
+
+uint32_t s5k5ca_wb_fluorescent [] = {
+0x002A, 0x04D2,
+0x0F12, 0x0677,
+0x002A, 0x04A0,
+0x0F12, 0x0145,
+0x0F12, 0x0001,
+0x002A, 0x04A4,
+0x0F12, 0x0100,
+0x0F12, 0x0001,
+0x002A, 0x04A8,
+0x0F12, 0x01EB,
+0x0F12, 0x0001,
+};
+
+uint32_t s5k5ca_wb_daylight [] = {
+0x002A, 0x04D2,
+0x0F12, 0x0677,
+0x002A, 0x04A0,
+0x0F12, 0x0166,
+0x0F12, 0x0001,
+0x002A, 0x04A4,
+0x0F12, 0x0100,
+0x0F12, 0x0001,
+0x002A, 0x04A8,
+0x0F12, 0x0145,
+0x0F12, 0x0001,
+};
+
+uint32_t s5k5ca_wb_cloudy [] = {
+0x002A, 0x04D2,
+0x0F12, 0x0677,
+0x002A, 0x04A0,
+0x0F12, 0x0128,
+0x0F12, 0x0001,
+0x002A, 0x04A4,
+0x0F12, 0x0100,
+0x0F12, 0x0001,
+0x002A, 0x04A8,
+0x0F12, 0x01AB,
+0x0F12, 0x0001,
+};
+
+
+// Exposure
+uint32_t s5k5ca_exposure_neg6[] = {
+0x0028, 0x7000,
+0x002A, 0x0F70,
+0x0F12, 0x000D,
+};
+
+uint32_t s5k5ca_exposure_neg3[] = {
+0x0028, 0x7000,
+0x002A, 0x0F70,
+0x0F12, 0x0031,
+};
+
+uint32_t s5k5ca_exposure_zero[] = {
+0x0028, 0x7000,
+0x002A, 0x0F70,
+0x0F12, 0x003D,
+};
+
+uint32_t s5k5ca_exposure_pos3[] = {
+0x0028, 0x7000,
+0x002A, 0x0F70,
+0x0F12, 0x004b,
+};
+
+uint32_t s5k5ca_exposure_pos6[] = {
+0x0028, 0x7000,
+0x002A, 0x0F70,
+0x0F12, 0x0075,
+};
+
+
+// Resolution
+uint32_t s5k5ca_2048_1536_regs[]={
+0xfcfc,0xd000,
+0x0028,0x7000,
+0x002a,0x0244,
+0x0f12,0x0000,
+0x0f12,0x0001,
+0x002a,0x0230,
+0x0f12,0x0001,
+0x002a,0x0224,
+0x0f12,0x0001,
+0x0f12,0x0001,
+};
+
+
+uint32_t s5k5ca_640_480_regs[]={
+0xfcfc,0xd000,
+0x0028,0x7000,
+0x002A,0x023C,
+0x0F12,0x0000,
+0x002A,0x0240,
+0x0F12,0x0001,
+0x002A,0x0230,
+0x0F12,0x0001,
+0x002A,0x023E,
+0x0F12,0x0001,
+0x002A,0x0220,
+0x0F12,0x0001,
+0x0F12,0x0001,
+};
+
+
+uint32_t s5k5ca_default_regs_init0[]={
+0xFCFC, 0xD000,
+0x0010, 0x0001,
+0x1030, 0x0000,
+0x0014, 0x0001,
+};
+
+uint32_t s5k5ca_default_regs_init1[]={
+0x0028, 0x7000,
+0x002A, 0x2CF8,
+0x0F12, 0xB570,
+0x0F12, 0x4828,
+0x0F12, 0x21C0,
+0x0F12, 0x8041,
+0x0F12, 0x4826,
+0x0F12, 0x4A27,
+0x0F12, 0x3020,
+0x0F12, 0x8382,
+0x0F12, 0x1D12,
+0x0F12, 0x83C2,
+0x0F12, 0x4823,
+0x0F12, 0x3040,
+0x0F12, 0x8041,
+0x0F12, 0x4822,
+0x0F12, 0x4923,
+0x0F12, 0x3060,
+0x0F12, 0x8381,
+0x0F12, 0x1D09,
+0x0F12, 0x83C1,
+0x0F12, 0x4822,
+0x0F12, 0x491E,
+0x0F12, 0x8802,
+0x0F12, 0x3980,
+0x0F12, 0x804A,
+0x0F12, 0x8842,
+0x0F12, 0x808A,
+0x0F12, 0x8882,
+0x0F12, 0x80CA,
+0x0F12, 0x88C2,
+0x0F12, 0x810A,
+0x0F12, 0x8902,
+0x0F12, 0x491D,
+0x0F12, 0x80CA,
+0x0F12, 0x8942,
+0x0F12, 0x814A,
+0x0F12, 0x8982,
+0x0F12, 0x830A,
+0x0F12, 0x89C2,
+0x0F12, 0x834A,
+0x0F12, 0x8A00,
+0x0F12, 0x4919,
+0x0F12, 0x8188,
+0x0F12, 0x4919,
+0x0F12, 0x481A,
+0x0F12, 0xF000,
+0x0F12, 0xF9FC,
+0x0F12, 0x4819,
+0x0F12, 0x4D1A,
+0x0F12, 0x6028,
+0x0F12, 0x491A,
+0x0F12, 0x0028,
+0x0F12, 0x3080,
+0x0F12, 0x6341,
+0x0F12, 0x4919,
+0x0F12, 0x4819,
+0x0F12, 0xF000,
+0x0F12, 0xF9F1,
+0x0F12, 0x4919,
+0x0F12, 0x0028,
+0x0F12, 0x3040,
+0x0F12, 0x62C1,
+0x0F12, 0x4818,
+0x0F12, 0x002C,
+0x0F12, 0x3C40,
+0x0F12, 0x63E0,
+0x0F12, 0x4817,
+0x0F12, 0x6320,
+0x0F12, 0x4817,
+0x0F12, 0x61A8,
+0x0F12, 0x4917,
+0x0F12, 0x4817,
+0x0F12, 0xF000,
+0x0F12, 0xF9E1,
+0x0F12, 0x4917,
+0x0F12, 0x4817,
+0x0F12, 0xF000,
+0x0F12, 0xF9DD,
+0x0F12, 0x4817,
+0x0F12, 0x62A0,
+0x0F12, 0xBC70,
+0x0F12, 0xBC08,
+0x0F12, 0x4718,
+0x0F12, 0x1100,
+0x0F12, 0xD000,
+0x0F12, 0x267C,
+0x0F12, 0x0000,
+0x0F12, 0x3904,
+0x0F12, 0x0000,
+0x0F12, 0x3274,
+0x0F12, 0x7000,
+0x0F12, 0xF400,
+0x0F12, 0xD000,
+0x0F12, 0xF520,
+0x0F12, 0xD000,
+0x0F12, 0x2DF5,
+0x0F12, 0x7000,
+0x0F12, 0x89A9,
+0x0F12, 0x0000,
+0x0F12, 0x2E47,
+0x0F12, 0x7000,
+0x0F12, 0x00C0,
+0x0F12, 0x7000,
+0x0F12, 0x2E6F,
+0x0F12, 0x7000,
+0x0F12, 0x2EA5,
+0x0F12, 0x7000,
+0x0F12, 0xB4F7,
+0x0F12, 0x0000,
+0x0F12, 0x2F2F,
+0x0F12, 0x7000,
+0x0F12, 0x2F53,
+0x0F12, 0x7000,
+0x0F12, 0x2FF9,
+0x0F12, 0x7000,
+0x0F12, 0x300D,
+0x0F12, 0x7000,
+0x0F12, 0x2FE1,
+0x0F12, 0x7000,
+0x0F12, 0x013D,
+0x0F12, 0x0001,
+0x0F12, 0x3093,
+0x0F12, 0x7000,
+0x0F12, 0x5823,
+0x0F12, 0x0000,
+0x0F12, 0x30E1,
+0x0F12, 0x7000,
+0x0F12, 0xB570,
+0x0F12, 0x6804,
+0x0F12, 0x6845,
+0x0F12, 0x6881,
+0x0F12, 0x6840,
+0x0F12, 0x2900,
+0x0F12, 0x6880,
+0x0F12, 0xD007,
+0x0F12, 0x49BA,
+0x0F12, 0x8949,
+0x0F12, 0x084A,
+0x0F12, 0x1880,
+0x0F12, 0xF000,
+0x0F12, 0xF9A6,
+0x0F12, 0x80A0,
+0x0F12, 0xE000,
+0x0F12, 0x80A0,
+0x0F12, 0x88A0,
+0x0F12, 0x2800,
+0x0F12, 0xD010,
+0x0F12, 0x68A9,
+0x0F12, 0x6828,
+0x0F12, 0x084A,
+0x0F12, 0x1880,
+0x0F12, 0xF000,
+0x0F12, 0xF99A,
+0x0F12, 0x8020,
+0x0F12, 0x1D2D,
+0x0F12, 0xCD03,
+0x0F12, 0x084A,
+0x0F12, 0x1880,
+0x0F12, 0xF000,
+0x0F12, 0xF993,
+0x0F12, 0x8060,
+0x0F12, 0xBC70,
+0x0F12, 0xBC08,
+0x0F12, 0x4718,
+0x0F12, 0x2000,
+0x0F12, 0x8060,
+0x0F12, 0x8020,
+0x0F12, 0xE7F8,
+0x0F12, 0xB510,
+0x0F12, 0xF000,
+0x0F12, 0xF98E,
+0x0F12, 0x49A9,
+0x0F12, 0x8A08,
+0x0F12, 0x6889,
+0x0F12, 0x4348,
+0x0F12, 0x49A8,
+0x0F12, 0x0080,
+0x0F12, 0xF000,
+0x0F12, 0xF980,
+0x0F12, 0x213F,
+0x0F12, 0x283F,
+0x0F12, 0xD200,
+0x0F12, 0x0001,
+0x0F12, 0x48A5,
+0x0F12, 0x8141,
+0x0F12, 0xBC10,
+0x0F12, 0xBC08,
+0x0F12, 0x4718,
+0x0F12, 0xB510,
+0x0F12, 0xF000,
+0x0F12, 0xF982,
+0x0F12, 0x48A2,
+0x0F12, 0x8A40,
+0x0F12, 0x2800,
+0x0F12, 0xD0F5,
+0x0F12, 0x48A1,
+0x0F12, 0x49A2,
+0x0F12, 0x8800,
+0x0F12, 0x4AA2,
+0x0F12, 0x2805,
+0x0F12, 0xD003,
+0x0F12, 0x4BA1,
+0x0F12, 0x795B,
+0x0F12, 0x2B00,
+0x0F12, 0xD003,
+0x0F12, 0x2001,
+0x0F12, 0x8008,
+0x0F12, 0x8010,
+0x0F12, 0xE7E7,
+0x0F12, 0x2800,
+0x0F12, 0xD1E5,
+0x0F12, 0x2000,
+0x0F12, 0x8008,
+0x0F12, 0x8010,
+0x0F12, 0xE7E1,
+0x0F12, 0xB5F8,
+0x0F12, 0x2407,
+0x0F12, 0x2C06,
+0x0F12, 0xD035,
+0x0F12, 0x2C07,
+0x0F12, 0xD033,
+0x0F12, 0x4894,
+0x0F12, 0x8BC1,
+0x0F12, 0x2900,
+0x0F12, 0xD02A,
+0x0F12, 0x00A2,
+0x0F12, 0x1815,
+0x0F12, 0x4A95,
+0x0F12, 0x6DEE,
+0x0F12, 0x8A92,
+0x0F12, 0x4296,
+0x0F12, 0xD923,
+0x0F12, 0x0028,
+0x0F12, 0x3080,
+0x0F12, 0x0007,
+0x0F12, 0x69C0,
+0x0F12, 0xF000,
+0x0F12, 0xF945,
+0x0F12, 0x1C71,
+0x0F12, 0x0280,
+0x0F12, 0xF000,
+0x0F12, 0xF941,
+0x0F12, 0x0006,
+0x0F12, 0x4889,
+0x0F12, 0x0061,
+0x0F12, 0x1808,
+0x0F12, 0x8D80,
+0x0F12, 0x0A01,
+0x0F12, 0x0600,
+0x0F12, 0x0E00,
+0x0F12, 0x1A08,
+0x0F12, 0xF000,
+0x0F12, 0xF94C,
+0x0F12, 0x0002,
+0x0F12, 0x6DE9,
+0x0F12, 0x6FE8,
+0x0F12, 0x1A08,
+0x0F12, 0x4351,
+0x0F12, 0x0300,
+0x0F12, 0x1C49,
+0x0F12, 0xF000,
+0x0F12, 0xF92D,
+0x0F12, 0x0401,
+0x0F12, 0x0430,
+0x0F12, 0x0C00,
+0x0F12, 0x4301,
+0x0F12, 0x61F9,
+0x0F12, 0xE004,
+0x0F12, 0x00A2,
+0x0F12, 0x4981,
+0x0F12, 0x1810,
+0x0F12, 0x3080,
+0x0F12, 0x61C1,
+0x0F12, 0x1E64,
+0x0F12, 0xD2C5,
+0x0F12, 0x2006,
+0x0F12, 0xF000,
+0x0F12, 0xF93B,
+0x0F12, 0x2007,
+0x0F12, 0xF000,
+0x0F12, 0xF938,
+0x0F12, 0xBCF8,
+0x0F12, 0xBC08,
+0x0F12, 0x4718,
+0x0F12, 0xB510,
+0x0F12, 0xF000,
+0x0F12, 0xF93A,
+0x0F12, 0x2800,
+0x0F12, 0xD00A,
+0x0F12, 0x4872,
+0x0F12, 0x8B81,
+0x0F12, 0x0089,
+0x0F12, 0x1808,
+0x0F12, 0x6DC1,
+0x0F12, 0x4874,
+0x0F12, 0x8A80,
+0x0F12, 0x4281,
+0x0F12, 0xD901,
+0x0F12, 0x2001,
+0x0F12, 0xE78C,
+0x0F12, 0x2000,
+0x0F12, 0xE78A,
+0x0F12, 0xB5F8,
+0x0F12, 0x0004,
+0x0F12, 0x4F71,
+0x0F12, 0x227D,
+0x0F12, 0x8938,
+0x0F12, 0x0152,
+0x0F12, 0x4342,
+0x0F12, 0x486F,
+0x0F12, 0x9000,
+0x0F12, 0x8A01,
+0x0F12, 0x0848,
+0x0F12, 0x1810,
+0x0F12, 0xF000,
+0x0F12, 0xF8F7,
+0x0F12, 0x210F,
+0x0F12, 0xF000,
+0x0F12, 0xF922,
+0x0F12, 0x496B,
+0x0F12, 0x8C49,
+0x0F12, 0x090E,
+0x0F12, 0x0136,
+0x0F12, 0x4306,
+0x0F12, 0x496A,
+0x0F12, 0x2C00,
+0x0F12, 0xD003,
+0x0F12, 0x2001,
+0x0F12, 0x0240,
+0x0F12, 0x4330,
+0x0F12, 0x8108,
+0x0F12, 0x4859,
+0x0F12, 0x2C00,
+0x0F12, 0x8D00,
+0x0F12, 0xD001,
+0x0F12, 0x2501,
+0x0F12, 0xE000,
+0x0F12, 0x2500,
+0x0F12, 0x4963,
+0x0F12, 0x4328,
+0x0F12, 0x8008,
+0x0F12, 0x207D,
+0x0F12, 0x00C0,
+0x0F12, 0xF000,
+0x0F12, 0xF910,
+0x0F12, 0x2C00,
+0x0F12, 0x495F,
+0x0F12, 0x0328,
+0x0F12, 0x4330,
+0x0F12, 0x8108,
+0x0F12, 0x88F8,
+0x0F12, 0x2C00,
+0x0F12, 0x01AA,
+0x0F12, 0x4310,
+0x0F12, 0x8088,
+0x0F12, 0x9800,
+0x0F12, 0x8A01,
+0x0F12, 0x485A,
+0x0F12, 0xF000,
+0x0F12, 0xF8CB,
+0x0F12, 0x495A,
+0x0F12, 0x8809,
+0x0F12, 0x4348,
+0x0F12, 0x0400,
+0x0F12, 0x0C00,
+0x0F12, 0xF000,
+0x0F12, 0xF8FA,
+0x0F12, 0x0020,
+0x0F12, 0xF000,
+0x0F12, 0xF8FF,
+0x0F12, 0x4856,
+0x0F12, 0x7004,
+0x0F12, 0xE7A3,
+0x0F12, 0xB510,
+0x0F12, 0x0004,
+0x0F12, 0xF000,
+0x0F12, 0xF900,
+0x0F12, 0x6020,
+0x0F12, 0x4953,
+0x0F12, 0x8B49,
+0x0F12, 0x0789,
+0x0F12, 0xD001,
+0x0F12, 0x0040,
+0x0F12, 0x6020,
+0x0F12, 0xE737,
+0x0F12, 0xB510,
+0x0F12, 0xF000,
+0x0F12, 0xF8FD,
+0x0F12, 0x484F,
+0x0F12, 0x8880,
+0x0F12, 0x0601,
+0x0F12, 0x4845,
+0x0F12, 0x1609,
+0x0F12, 0x8141,
+0x0F12, 0xE72D,
+0x0F12, 0xB5F8,
+0x0F12, 0x000F,
+0x0F12, 0x4C38,
+0x0F12, 0x3420,
+0x0F12, 0x2500,
+0x0F12, 0x5765,
+0x0F12, 0x0039,
+0x0F12, 0xF000,
+0x0F12, 0xF8F5,
+0x0F12, 0x9000,
+0x0F12, 0x2600,
+0x0F12, 0x57A6,
+0x0F12, 0x4C3D,
+0x0F12, 0x42AE,
+0x0F12, 0xD01B,
+0x0F12, 0x4D44,
+0x0F12, 0x8AE8,
+0x0F12, 0x2800,
+0x0F12, 0xD013,
+0x0F12, 0x4830,
+0x0F12, 0x8A01,
+0x0F12, 0x8B80,
+0x0F12, 0x4378,
+0x0F12, 0xF000,
+0x0F12, 0xF88F,
+0x0F12, 0x89A9,
+0x0F12, 0x1A41,
+0x0F12, 0x483E,
+0x0F12, 0x3820,
+0x0F12, 0x8AC0,
+0x0F12, 0x4348,
+0x0F12, 0x17C1,
+0x0F12, 0x0D89,
+0x0F12, 0x1808,
+0x0F12, 0x1280,
+0x0F12, 0x8961,
+0x0F12, 0x1A08,
+0x0F12, 0x8160,
+0x0F12, 0xE003,
+0x0F12, 0x88A8,
+0x0F12, 0x0600,
+0x0F12, 0x1600,
+0x0F12, 0x8160,
+0x0F12, 0x200A,
+0x0F12, 0x5E20,
+0x0F12, 0x42B0,
+0x0F12, 0xD011,
+0x0F12, 0xF000,
+0x0F12, 0xF88D,
+0x0F12, 0x1D40,
+0x0F12, 0x00C3,
+0x0F12, 0x1A18,
+0x0F12, 0x214B,
+0x0F12, 0xF000,
+0x0F12, 0xF871,
+0x0F12, 0x211F,
+0x0F12, 0xF000,
+0x0F12, 0xF89C,
+0x0F12, 0x210A,
+0x0F12, 0x5E61,
+0x0F12, 0x0FC9,
+0x0F12, 0x0149,
+0x0F12, 0x4301,
+0x0F12, 0x481C,
+0x0F12, 0x81C1,
+0x0F12, 0x9800,
+0x0F12, 0xE74A,
+0x0F12, 0xB5F1,
+0x0F12, 0xB082,
+0x0F12, 0x2500,
+0x0F12, 0x4829,
+0x0F12, 0x9001,
+0x0F12, 0x2400,
+0x0F12, 0x2028,
+0x0F12, 0x4368,
+0x0F12, 0x4A28,
+0x0F12, 0x4916,
+0x0F12, 0x1887,
+0x0F12, 0x1840,
+0x0F12, 0x9000,
+0x0F12, 0x9800,
+0x0F12, 0x0066,
+0x0F12, 0x9A01,
+0x0F12, 0x1980,
+0x0F12, 0x218C,
+0x0F12, 0x5A09,
+0x0F12, 0x8A80,
+0x0F12, 0x8812,
+0x0F12, 0xF000,
+0x0F12, 0xF8AC,
+0x0F12, 0x53B8,
+0x0F12, 0x1C64,
+0x0F12, 0x2C14,
+0x0F12, 0xDBF1,
+0x0F12, 0x1C6D,
+0x0F12, 0x2D03,
+0x0F12, 0xDBE6,
+0x0F12, 0x9802,
+0x0F12, 0x6800,
+0x0F12, 0x0600,
+0x0F12, 0x0E00,
+0x0F12, 0xF000,
+0x0F12, 0xF8A7,
+0x0F12, 0xBCFE,
+0x0F12, 0xBC08,
+0x0F12, 0x4718,
+0x0F12, 0xB510,
+0x0F12, 0x4B19,
+0x0F12, 0x2200,
+0x0F12, 0x801A,
+0x0F12, 0xF000,
+0x0F12, 0xF8A6,
+0x0F12, 0xE6BC,
+0x0F12, 0x0000,
+0x0F12, 0x0C3C,
+0x0F12, 0x7000,
+0x0F12, 0x2C2C,
+0x0F12, 0x7000,
+0x0F12, 0xC824,
+0x0F12, 0x0031,
+0x0F12, 0xF2A0,
+0x0F12, 0xD000,
+0x0F12, 0x3274,
+0x0F12, 0x7000,
+0x0F12, 0x26E8,
+0x0F12, 0x7000,
+0x0F12, 0x6100,
+0x0F12, 0xD000,
+0x0F12, 0x6500,
+0x0F12, 0xD000,
+0x0F12, 0x1A7C,
+0x0F12, 0x7000,
+0x0F12, 0x1120,
+0x0F12, 0x7000,
+0x0F12, 0xFFFF,
+0x0F12, 0x0000,
+0x0F12, 0x3374,
+0x0F12, 0x7000,
+0x0F12, 0x1D6C,
+0x0F12, 0x7000,
+0x0F12, 0x167C,
+0x0F12, 0x7000,
+0x0F12, 0xF400,
+0x0F12, 0xD000,
+0x0F12, 0x40A0,
+0x0F12, 0x00DD,
+0x0F12, 0xF520,
+0x0F12, 0xD000,
+0x0F12, 0x2C29,
+0x0F12, 0x7000,
+0x0F12, 0x1A54,
+0x0F12, 0x7000,
+0x0F12, 0x1564,
+0x0F12, 0x7000,
+0x0F12, 0x2440,
+0x0F12, 0x7000,
+0x0F12, 0x05A0,
+0x0F12, 0x7000,
+0x0F12, 0xB0A0,
+0x0F12, 0xD000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x1A3F,
+0x0F12, 0x0001,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xF004,
+0x0F12, 0xE51F,
+0x0F12, 0x1F48,
+0x0F12, 0x0001,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xF7C1,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x24BD,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x36DD,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xB4CF,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xB5D7,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x36ED,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xF53F,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xF5D9,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x013D,
+0x0F12, 0x0001,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xF5C9,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0xFAA9,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x3723,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x5823,
+0x0F12, 0x0000,
+0x0F12, 0x4778,
+0x0F12, 0x46C0,
+0x0F12, 0xC000,
+0x0F12, 0xE59F,
+0x0F12, 0xFF1C,
+0x0F12, 0xE12F,
+0x0F12, 0x1857,
+0x0F12, 0x0001,
+0x0F12, 0x9F9E,
+0x0F12, 0x0000,
+0x002A, 0x157A,
+0x0F12, 0x0001,
+0x002A, 0x1578,
+0x0F12, 0x0001,
+0x002A, 0x1576,
+0x0F12, 0x0020,
+0x002A, 0x1574,
+0x0F12, 0x0006,
+0x002A, 0x156E,
+0x0F12, 0x0001,
+0x002A, 0x1568,
+0x0F12, 0x00FC,
+0x002A, 0x155A,
+0x0F12, 0x01CC,
+0x002A, 0x157E,
+0x0F12, 0x0C80,
+0x0F12, 0x0578,
+0x002A, 0x157C,
+0x0F12, 0x0190,
+0x002A, 0x1570,
+0x0F12, 0x00A0,
+0x0F12, 0x0010,
+0x002A, 0x12C4,
+0x0F12, 0x006A,
+0x002A, 0x12C8,
+0x0F12, 0x08AC,
+0x0F12, 0x0050,
+0x002A, 0x1696,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C6,
+0x0F12, 0x00C6,
+0x002A, 0x1690,
+0x0F12, 0x0001,
+0x002A, 0x12B0,
+0x0F12, 0x0055,
+0x0F12, 0x005A,
+0x002A, 0x337A,
+0x0F12, 0x0006,
+0x0F12, 0x0068,
+0x002A, 0x169E,
+0x0F12, 0x0007,
+0x002A, 0x0BF6,
+0x0F12, 0x0000,
+0x002A, 0x327C,
+0x0F12, 0x1000,
+0x0F12, 0x6998,
+0x0F12, 0x0078,
+0x0F12, 0x04FE,
+0x0F12, 0x8800,
+0x002A, 0x3274,
+0x0F12, 0x0155,
+0x0F12, 0x0155,
+0x0F12, 0x1555,
+0x0F12, 0x0555,
+0x0028, 0x7000,
+0x002A, 0x0572,
+0x0F12, 0x0007,
+0x0028, 0x7000,
+0x002A, 0x12D2,
+0x0F12, 0x0003,
+0x0F12, 0x0003,
+0x0F12, 0x0003,
+0x0F12, 0x0003,
+0x0F12, 0x0884,
+0x0F12, 0x08CF,
+0x0F12, 0x0500,
+0x0F12, 0x054B,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0885,
+0x0F12, 0x0467,
+0x0F12, 0x0501,
+0x0F12, 0x02A5,
+0x0F12, 0x0001,
+0x0F12, 0x046A,
+0x0F12, 0x0001,
+0x0F12, 0x02A8,
+0x0F12, 0x0885,
+0x0F12, 0x08D0,
+0x0F12, 0x0501,
+0x0F12, 0x054C,
+0x0F12, 0x0006,
+0x0F12, 0x0020,
+0x0F12, 0x0006,
+0x0F12, 0x0020,
+0x0F12, 0x0881,
+0x0F12, 0x0463,
+0x0F12, 0x04FD,
+0x0F12, 0x02A1,
+0x0F12, 0x0006,
+0x0F12, 0x0489,
+0x0F12, 0x0006,
+0x0F12, 0x02C7,
+0x0F12, 0x0881,
+0x0F12, 0x08CC,
+0x0F12, 0x04FD,
+0x0F12, 0x0548,
+0x0F12, 0x03A2,
+0x0F12, 0x01D3,
+0x0F12, 0x01E0,
+0x0F12, 0x00F2,
+0x0F12, 0x03F2,
+0x0F12, 0x0223,
+0x0F12, 0x0230,
+0x0F12, 0x0142,
+0x0F12, 0x03A2,
+0x0F12, 0x063C,
+0x0F12, 0x01E0,
+0x0F12, 0x0399,
+0x0F12, 0x03F2,
+0x0F12, 0x068C,
+0x0F12, 0x0230,
+0x0F12, 0x03E9,
+0x0F12, 0x0002,
+0x0F12, 0x0002,
+0x0F12, 0x0002,
+0x0F12, 0x0002,
+0x0F12, 0x003C,
+0x0F12, 0x003C,
+0x0F12, 0x003C,
+0x0F12, 0x003C,
+0x0F12, 0x01D3,
+0x0F12, 0x01D3,
+0x0F12, 0x00F2,
+0x0F12, 0x00F2,
+0x0F12, 0x020B,
+0x0F12, 0x024A,
+0x0F12, 0x012A,
+0x0F12, 0x0169,
+0x0F12, 0x0002,
+0x0F12, 0x046B,
+0x0F12, 0x0002,
+0x0F12, 0x02A9,
+0x0F12, 0x0419,
+0x0F12, 0x04A5,
+0x0F12, 0x0257,
+0x0F12, 0x02E3,
+0x0F12, 0x0630,
+0x0F12, 0x063C,
+0x0F12, 0x038D,
+0x0F12, 0x0399,
+0x0F12, 0x0668,
+0x0F12, 0x06B3,
+0x0F12, 0x03C5,
+0x0F12, 0x0410,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x03A2,
+0x0F12, 0x01D3,
+0x0F12, 0x01E0,
+0x0F12, 0x00F2,
+0x0F12, 0x0000,
+0x0F12, 0x0461,
+0x0F12, 0x0000,
+0x0F12, 0x029F,
+0x0F12, 0x0000,
+0x0F12, 0x063C,
+0x0F12, 0x0000,
+0x0F12, 0x0399,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x01D0,
+0x0F12, 0x01D0,
+0x0F12, 0x00EF,
+0x0F12, 0x00EF,
+0x0F12, 0x020C,
+0x0F12, 0x024B,
+0x0F12, 0x012B,
+0x0F12, 0x016A,
+0x0F12, 0x039F,
+0x0F12, 0x045E,
+0x0F12, 0x01DD,
+0x0F12, 0x029C,
+0x0F12, 0x041A,
+0x0F12, 0x04A6,
+0x0F12, 0x0258,
+0x0F12, 0x02E4,
+0x0F12, 0x062D,
+0x0F12, 0x0639,
+0x0F12, 0x038A,
+0x0F12, 0x0396,
+0x0F12, 0x0669,
+0x0F12, 0x06B4,
+0x0F12, 0x03C6,
+0x0F12, 0x0411,
+0x0F12, 0x087C,
+0x0F12, 0x08C7,
+0x0F12, 0x04F8,
+0x0F12, 0x0543,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x01D0,
+0x0F12, 0x01D0,
+0x0F12, 0x00EF,
+0x0F12, 0x00EF,
+0x0F12, 0x020F,
+0x0F12, 0x024E,
+0x0F12, 0x012E,
+0x0F12, 0x016D,
+0x0F12, 0x039F,
+0x0F12, 0x045E,
+0x0F12, 0x01DD,
+0x0F12, 0x029C,
+0x0F12, 0x041D,
+0x0F12, 0x04A9,
+0x0F12, 0x025B,
+0x0F12, 0x02E7,
+0x0F12, 0x062D,
+0x0F12, 0x0639,
+0x0F12, 0x038A,
+0x0F12, 0x0396,
+0x0F12, 0x066C,
+0x0F12, 0x06B7,
+0x0F12, 0x03C9,
+0x0F12, 0x0414,
+0x0F12, 0x087C,
+0x0F12, 0x08C7,
+0x0F12, 0x04F8,
+0x0F12, 0x0543,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x0040,
+0x0F12, 0x01D0,
+0x0F12, 0x01D0,
+0x0F12, 0x00EF,
+0x0F12, 0x00EF,
+0x0F12, 0x020F,
+0x0F12, 0x024E,
+0x0F12, 0x012E,
+0x0F12, 0x016D,
+0x0F12, 0x039F,
+0x0F12, 0x045E,
+0x0F12, 0x01DD,
+0x0F12, 0x029C,
+0x0F12, 0x041D,
+0x0F12, 0x04A9,
+0x0F12, 0x025B,
+0x0F12, 0x02E7,
+0x0F12, 0x062D,
+0x0F12, 0x0639,
+0x0F12, 0x038A,
+0x0F12, 0x0396,
+0x0F12, 0x066C,
+0x0F12, 0x06B7,
+0x0F12, 0x03C9,
+0x0F12, 0x0414,
+0x0F12, 0x087C,
+0x0F12, 0x08C7,
+0x0F12, 0x04F8,
+0x0F12, 0x0543,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x003D,
+0x0F12, 0x01D2,
+0x0F12, 0x01D2,
+0x0F12, 0x00F1,
+0x0F12, 0x00F1,
+0x0F12, 0x020C,
+0x0F12, 0x024B,
+0x0F12, 0x012B,
+0x0F12, 0x016A,
+0x0F12, 0x03A1,
+0x0F12, 0x0460,
+0x0F12, 0x01DF,
+0x0F12, 0x029E,
+0x0F12, 0x041A,
+0x0F12, 0x04A6,
+0x0F12, 0x0258,
+0x0F12, 0x02E4,
+0x0F12, 0x062F,
+0x0F12, 0x063B,
+0x0F12, 0x038C,
+0x0F12, 0x0398,
+0x0F12, 0x0669,
+0x0F12, 0x06B4,
+0x0F12, 0x03C6,
+0x0F12, 0x0411,
+0x0F12, 0x087E,
+0x0F12, 0x08C9,
+0x0F12, 0x04FA,
+0x0F12, 0x0545,
+0x0F12, 0x03A2,
+0x0F12, 0x01D3,
+0x0F12, 0x01E0,
+0x0F12, 0x00F2,
+0x0F12, 0x03AF,
+0x0F12, 0x01E0,
+0x0F12, 0x01ED,
+0x0F12, 0x00FF,
+0x0F12, 0x0000,
+0x0F12, 0x0461,
+0x0F12, 0x0000,
+0x0F12, 0x029F,
+0x0F12, 0x0000,
+0x0F12, 0x046E,
+0x0F12, 0x0000,
+0x0F12, 0x02AC,
+0x0F12, 0x0000,
+0x0F12, 0x063C,
+0x0F12, 0x0000,
+0x0F12, 0x0399,
+0x0F12, 0x0000,
+0x0F12, 0x0649,
+0x0F12, 0x0000,
+0x0F12, 0x03A6,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x03AA,
+0x0F12, 0x01DB,
+0x0F12, 0x01E8,
+0x0F12, 0x00FA,
+0x0F12, 0x03B7,
+0x0F12, 0x01E8,
+0x0F12, 0x01F5,
+0x0F12, 0x0107,
+0x0F12, 0x0000,
+0x0F12, 0x0469,
+0x0F12, 0x0000,
+0x0F12, 0x02A7,
+0x0F12, 0x0000,
+0x0F12, 0x0476,
+0x0F12, 0x0000,
+0x0F12, 0x02B4,
+0x0F12, 0x0000,
+0x0F12, 0x0644,
+0x0F12, 0x0000,
+0x0F12, 0x03A1,
+0x0F12, 0x0000,
+0x0F12, 0x0651,
+0x0F12, 0x0000,
+0x0F12, 0x03AE,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x0F12, 0x000F,
+0x0F12, 0x000F,
+0x0F12, 0x000F,
+0x0F12, 0x000F,
+0x0F12, 0x05AD,
+0x0F12, 0x03DE,
+0x0F12, 0x030A,
+0x0F12, 0x021C,
+0x0F12, 0x062F,
+0x0F12, 0x0460,
+0x0F12, 0x038C,
+0x0F12, 0x029E,
+0x0F12, 0x07FC,
+0x0F12, 0x0847,
+0x0F12, 0x0478,
+0x0F12, 0x04C3,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x002A, 0x01D4,
+0x0F12, 0x0000,
+0x002A, 0x01DE,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x002A, 0x01E4,
+0x0F12, 0x0041,
+0x002A, 0x01E8,
+0x0F12, 0x2A0C,
+0x0F12, 0x0190,
+0x002A, 0x025A,
+0x0F12, 0x0100,
+0x0F12, 0x0110,
+0x0F12, 0x0200,
+0x0F12, 0x0238,
+0x0F12, 0x018C,
+0x0F12, 0x01C0,
+0x0F12, 0x00E6,
+0x0F12, 0x0132,
+0x0F12, 0x0001,
+0x002A, 0x0586,
+0x0F12, 0x00FF,
+0x002A, 0x115E,
+0x0F12, 0x0003,
+0x002A, 0x10D4,
+0x0F12, 0x1000,
+0x002A, 0x10DE,
+0x0F12, 0x0004,
+0x002A, 0x106C,
+0x0F12, 0x0202,
+0x002A, 0x10CA,
+0x0F12, 0x00C0,
+0x002A, 0x1060,
+0x0F12, 0x0000,
+0x0F12, 0xB300,
+0x002A, 0x10F4,
+0x0F12, 0x0280,
+0x002A, 0x1100,
+0x0F12, 0x03A0,
+0x0F12, 0x0320,
+0x002A, 0x1134,
+0x0F12, 0x0030,
+0x002A, 0x1154,
+0x0F12, 0x0060,
+0x002A, 0x10E2,
+0x0F12, 0x0000,
+0x002A, 0x1072,
+0x0F12, 0x003C,
+0x002A, 0x1074,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0030,
+0x0F12, 0x0033,
+0x0F12, 0x0036,
+0x0F12, 0x0039,
+0x0F12, 0x003D,
+0x0F12, 0x0041,
+0x0F12, 0x0045,
+0x0F12, 0x0049,
+0x0F12, 0x004F,
+0x0F12, 0x0055,
+0x0F12, 0x005D,
+0x0F12, 0x0065,
+0x0F12, 0x006D,
+0x0F12, 0x0077,
+0x0F12, 0x0083,
+0x0F12, 0x008F,
+0x0F12, 0x009B,
+0x0F12, 0x00A7,
+0x0F12, 0x00B3,
+0x002A, 0x0252,
+0x0F12, 0x0003,
+0x002A, 0x12B8,
+0x0F12, 0x1000,
+0x002A, 0x158A,
+0x0F12, 0xEAF0,
+0x002A, 0x15C6,
+0x0F12, 0x0020,
+0x0F12, 0x0060,
+0x002A, 0x15BC,
+0x0F12, 0x0200,
+0x002A, 0x1608,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x002A, 0x0F70,
+0x0F12, 0x0040,
+0x002A, 0x0530,
+0x0F12, 0x3415,
+0x002A, 0x0534,
+0x0F12, 0x682A,
+0x002A, 0x167C,
+0x0F12, 0x8235,
+0x002A, 0x1680,
+0x0F12, 0xc350,
+0x002A, 0x0538,
+0x0F12, 0x3415,
+0x002A, 0x053C,
+0x0F12, 0x682A,
+0x002A, 0x1684,
+0x0F12, 0x8235,
+0x002A, 0x1688,
+0x0F12, 0xC350,
+0x002A, 0x0540,
+0x0F12, 0x01B3,
+0x0F12, 0x01B3,
+0x002A, 0x168C,
+0x0F12, 0x02A0,
+0x0F12, 0x0710,
+0x002A, 0x0544,
+0x0F12, 0x0100,
+0x0F12, 0x8000,
+0x002A, 0x1694,
+0x0F12, 0x0001,
+0x002A, 0x021A,
+0x0F12, 0x0000,
+0x002A, 0x04d2,
+0x0F12, 0x065f,
+0x002A, 0x04ba,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x002A, 0x06CE,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x00e0,
+0x0F12, 0x00f8,
+0x0F12, 0x00f8,
+0x0F12, 0x0100,
+0x0F12, 0x00e8,
+0x0F12, 0x00f8,
+0x0F12, 0x00f8,
+0x0F12, 0x0100,
+0x0F12, 0x00f0,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x00f0,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x00f8,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0010,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0020,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x0F12, 0x0036,
+0x0F12, 0x001F,
+0x0F12, 0x0020,
+0x0F12, 0x0000,
+0x002A, 0x075A,
+0x0F12, 0x0000,
+0x0F12, 0x0400,
+0x0F12, 0x0300,
+0x0F12, 0x0010,
+0x0F12, 0x0011,
+0x002A, 0x347C,
+0x0F12, 0x01D9,
+0x0F12, 0x019D,
+0x0F12, 0x015C,
+0x0F12, 0x0125,
+0x0F12, 0x00FE,
+0x0F12, 0x00E5,
+0x0F12, 0x00DA,
+0x0F12, 0x00E5,
+0x0F12, 0x0100,
+0x0F12, 0x012D,
+0x0F12, 0x016B,
+0x0F12, 0x01B3,
+0x0F12, 0x01F2,
+0x0F12, 0x01A7,
+0x0F12, 0x0165,
+0x0F12, 0x011E,
+0x0F12, 0x00E3,
+0x0F12, 0x00B6,
+0x0F12, 0x009C,
+0x0F12, 0x0092,
+0x0F12, 0x009D,
+0x0F12, 0x00BB,
+0x0F12, 0x00F0,
+0x0F12, 0x0133,
+0x0F12, 0x0182,
+0x0F12, 0x01CD,
+0x0F12, 0x0170,
+0x0F12, 0x012A,
+0x0F12, 0x00DC,
+0x0F12, 0x009A,
+0x0F12, 0x006E,
+0x0F12, 0x0053,
+0x0F12, 0x004A,
+0x0F12, 0x0055,
+0x0F12, 0x0076,
+0x0F12, 0x00AC,
+0x0F12, 0x00F5,
+0x0F12, 0x0147,
+0x0F12, 0x0196,
+0x0F12, 0x014C,
+0x0F12, 0x0102,
+0x0F12, 0x00B1,
+0x0F12, 0x006F,
+0x0F12, 0x0041,
+0x0F12, 0x0027,
+0x0F12, 0x001F,
+0x0F12, 0x002A,
+0x0F12, 0x004B,
+0x0F12, 0x0083,
+0x0F12, 0x00CE,
+0x0F12, 0x0128,
+0x0F12, 0x0177,
+0x0F12, 0x0133,
+0x0F12, 0x00E6,
+0x0F12, 0x0094,
+0x0F12, 0x0052,
+0x0F12, 0x0025,
+0x0F12, 0x000C,
+0x0F12, 0x0004,
+0x0F12, 0x0010,
+0x0F12, 0x0030,
+0x0F12, 0x0069,
+0x0F12, 0x00B6,
+0x0F12, 0x0112,
+0x0F12, 0x0168,
+0x0F12, 0x012F,
+0x0F12, 0x00E3,
+0x0F12, 0x008E,
+0x0F12, 0x004C,
+0x0F12, 0x0020,
+0x0F12, 0x0007,
+0x0F12, 0x0000,
+0x0F12, 0x000B,
+0x0F12, 0x002D,
+0x0F12, 0x0065,
+0x0F12, 0x00B4,
+0x0F12, 0x0114,
+0x0F12, 0x016B,
+0x0F12, 0x0138,
+0x0F12, 0x00EB,
+0x0F12, 0x0099,
+0x0F12, 0x0058,
+0x0F12, 0x002B,
+0x0F12, 0x0012,
+0x0F12, 0x000B,
+0x0F12, 0x0017,
+0x0F12, 0x0039,
+0x0F12, 0x0074,
+0x0F12, 0x00C2,
+0x0F12, 0x0121,
+0x0F12, 0x0177,
+0x0F12, 0x0158,
+0x0F12, 0x010C,
+0x0F12, 0x00BC,
+0x0F12, 0x007B,
+0x0F12, 0x004E,
+0x0F12, 0x0034,
+0x0F12, 0x002D,
+0x0F12, 0x003B,
+0x0F12, 0x005E,
+0x0F12, 0x0099,
+0x0F12, 0x00E7,
+0x0F12, 0x0145,
+0x0F12, 0x0197,
+0x0F12, 0x017E,
+0x0F12, 0x0138,
+0x0F12, 0x00EB,
+0x0F12, 0x00AC,
+0x0F12, 0x0080,
+0x0F12, 0x0067,
+0x0F12, 0x0061,
+0x0F12, 0x006E,
+0x0F12, 0x0091,
+0x0F12, 0x00CA,
+0x0F12, 0x0116,
+0x0F12, 0x016E,
+0x0F12, 0x01C0,
+0x0F12, 0x01BB,
+0x0F12, 0x0177,
+0x0F12, 0x0131,
+0x0F12, 0x00F7,
+0x0F12, 0x00CE,
+0x0F12, 0x00B6,
+0x0F12, 0x00AF,
+0x0F12, 0x00BD,
+0x0F12, 0x00DF,
+0x0F12, 0x0113,
+0x0F12, 0x0156,
+0x0F12, 0x01AA,
+0x0F12, 0x01F7,
+0x0F12, 0x01EF,
+0x0F12, 0x01B2,
+0x0F12, 0x0170,
+0x0F12, 0x013E,
+0x0F12, 0x0119,
+0x0F12, 0x0103,
+0x0F12, 0x00FF,
+0x0F12, 0x010D,
+0x0F12, 0x012B,
+0x0F12, 0x0158,
+0x0F12, 0x0194,
+0x0F12, 0x01DA,
+0x0F12, 0x0207,
+0x0F12, 0x0198,
+0x0F12, 0x0156,
+0x0F12, 0x011D,
+0x0F12, 0x00EF,
+0x0F12, 0x00C9,
+0x0F12, 0x00B2,
+0x0F12, 0x00A9,
+0x0F12, 0x00B1,
+0x0F12, 0x00C5,
+0x0F12, 0x00E7,
+0x0F12, 0x0113,
+0x0F12, 0x0152,
+0x0F12, 0x018C,
+0x0F12, 0x016E,
+0x0F12, 0x0127,
+0x0F12, 0x00E8,
+0x0F12, 0x00B6,
+0x0F12, 0x0090,
+0x0F12, 0x0078,
+0x0F12, 0x0070,
+0x0F12, 0x0078,
+0x0F12, 0x008F,
+0x0F12, 0x00B5,
+0x0F12, 0x00E7,
+0x0F12, 0x0126,
+0x0F12, 0x016C,
+0x0F12, 0x013D,
+0x0F12, 0x00F6,
+0x0F12, 0x00B5,
+0x0F12, 0x0080,
+0x0F12, 0x0058,
+0x0F12, 0x0040,
+0x0F12, 0x0038,
+0x0F12, 0x0042,
+0x0F12, 0x005B,
+0x0F12, 0x0083,
+0x0F12, 0x00B9,
+0x0F12, 0x00F9,
+0x0F12, 0x0141,
+0x0F12, 0x011E,
+0x0F12, 0x00D7,
+0x0F12, 0x0094,
+0x0F12, 0x005E,
+0x0F12, 0x0035,
+0x0F12, 0x001E,
+0x0F12, 0x0017,
+0x0F12, 0x0021,
+0x0F12, 0x003C,
+0x0F12, 0x0066,
+0x0F12, 0x009F,
+0x0F12, 0x00E2,
+0x0F12, 0x012A,
+0x0F12, 0x010A,
+0x0F12, 0x00C0,
+0x0F12, 0x007B,
+0x0F12, 0x0045,
+0x0F12, 0x001F,
+0x0F12, 0x0008,
+0x0F12, 0x0002,
+0x0F12, 0x000C,
+0x0F12, 0x0027,
+0x0F12, 0x0052,
+0x0F12, 0x008C,
+0x0F12, 0x00D2,
+0x0F12, 0x011E,
+0x0F12, 0x0106,
+0x0F12, 0x00BC,
+0x0F12, 0x0077,
+0x0F12, 0x0040,
+0x0F12, 0x001A,
+0x0F12, 0x0005,
+0x0F12, 0x0000,
+0x0F12, 0x000A,
+0x0F12, 0x0026,
+0x0F12, 0x0052,
+0x0F12, 0x008D,
+0x0F12, 0x00D5,
+0x0F12, 0x0121,
+0x0F12, 0x010A,
+0x0F12, 0x00C1,
+0x0F12, 0x007E,
+0x0F12, 0x0049,
+0x0F12, 0x0023,
+0x0F12, 0x000E,
+0x0F12, 0x0009,
+0x0F12, 0x0015,
+0x0F12, 0x0031,
+0x0F12, 0x005D,
+0x0F12, 0x0097,
+0x0F12, 0x00DF,
+0x0F12, 0x0129,
+0x0F12, 0x0121,
+0x0F12, 0x00DA,
+0x0F12, 0x009A,
+0x0F12, 0x0065,
+0x0F12, 0x0040,
+0x0F12, 0x002B,
+0x0F12, 0x0026,
+0x0F12, 0x0031,
+0x0F12, 0x004E,
+0x0F12, 0x007C,
+0x0F12, 0x00B6,
+0x0F12, 0x00FB,
+0x0F12, 0x0143,
+0x0F12, 0x0140,
+0x0F12, 0x00FB,
+0x0F12, 0x00BD,
+0x0F12, 0x008C,
+0x0F12, 0x0068,
+0x0F12, 0x0054,
+0x0F12, 0x004F,
+0x0F12, 0x005B,
+0x0F12, 0x0077,
+0x0F12, 0x00A2,
+0x0F12, 0x00DA,
+0x0F12, 0x011C,
+0x0F12, 0x0163,
+0x0F12, 0x0173,
+0x0F12, 0x012D,
+0x0F12, 0x00F5,
+0x0F12, 0x00C6,
+0x0F12, 0x00A5,
+0x0F12, 0x0092,
+0x0F12, 0x008F,
+0x0F12, 0x009B,
+0x0F12, 0x00B5,
+0x0F12, 0x00DC,
+0x0F12, 0x010C,
+0x0F12, 0x014C,
+0x0F12, 0x0197,
+0x0F12, 0x019F,
+0x0F12, 0x015F,
+0x0F12, 0x0128,
+0x0F12, 0x00FF,
+0x0F12, 0x00E1,
+0x0F12, 0x00D0,
+0x0F12, 0x00CF,
+0x0F12, 0x00DA,
+0x0F12, 0x00F4,
+0x0F12, 0x0116,
+0x0F12, 0x0142,
+0x0F12, 0x017A,
+0x0F12, 0x01A8,
+0x0F12, 0x0191,
+0x0F12, 0x0152,
+0x0F12, 0x0118,
+0x0F12, 0x00EB,
+0x0F12, 0x00C8,
+0x0F12, 0x00B4,
+0x0F12, 0x00AF,
+0x0F12, 0x00BB,
+0x0F12, 0x00D5,
+0x0F12, 0x00FE,
+0x0F12, 0x012E,
+0x0F12, 0x016E,
+0x0F12, 0x01AC,
+0x0F12, 0x0166,
+0x0F12, 0x0121,
+0x0F12, 0x00E3,
+0x0F12, 0x00B3,
+0x0F12, 0x008E,
+0x0F12, 0x0079,
+0x0F12, 0x0074,
+0x0F12, 0x0081,
+0x0F12, 0x009D,
+0x0F12, 0x00C7,
+0x0F12, 0x00FF,
+0x0F12, 0x013F,
+0x0F12, 0x0188,
+0x0F12, 0x0134,
+0x0F12, 0x00F1,
+0x0F12, 0x00B1,
+0x0F12, 0x007C,
+0x0F12, 0x0057,
+0x0F12, 0x0041,
+0x0F12, 0x003C,
+0x0F12, 0x0048,
+0x0F12, 0x0065,
+0x0F12, 0x0091,
+0x0F12, 0x00CA,
+0x0F12, 0x010C,
+0x0F12, 0x0157,
+0x0F12, 0x0118,
+0x0F12, 0x00D2,
+0x0F12, 0x0091,
+0x0F12, 0x005C,
+0x0F12, 0x0035,
+0x0F12, 0x001E,
+0x0F12, 0x0019,
+0x0F12, 0x0025,
+0x0F12, 0x0043,
+0x0F12, 0x0070,
+0x0F12, 0x00A9,
+0x0F12, 0x00EE,
+0x0F12, 0x0136,
+0x0F12, 0x0105,
+0x0F12, 0x00BD,
+0x0F12, 0x007B,
+0x0F12, 0x0046,
+0x0F12, 0x001F,
+0x0F12, 0x0009,
+0x0F12, 0x0003,
+0x0F12, 0x000E,
+0x0F12, 0x002B,
+0x0F12, 0x0057,
+0x0F12, 0x0091,
+0x0F12, 0x00D7,
+0x0F12, 0x0121,
+0x0F12, 0x0105,
+0x0F12, 0x00BC,
+0x0F12, 0x0078,
+0x0F12, 0x0043,
+0x0F12, 0x001D,
+0x0F12, 0x0006,
+0x0F12, 0x0000,
+0x0F12, 0x000B,
+0x0F12, 0x0026,
+0x0F12, 0x0052,
+0x0F12, 0x008C,
+0x0F12, 0x00D3,
+0x0F12, 0x011E,
+0x0F12, 0x010D,
+0x0F12, 0x00C5,
+0x0F12, 0x0083,
+0x0F12, 0x004E,
+0x0F12, 0x0027,
+0x0F12, 0x000F,
+0x0F12, 0x0008,
+0x0F12, 0x0012,
+0x0F12, 0x002E,
+0x0F12, 0x0059,
+0x0F12, 0x0091,
+0x0F12, 0x00D6,
+0x0F12, 0x0120,
+0x0F12, 0x012A,
+0x0F12, 0x00E2,
+0x0F12, 0x00A2,
+0x0F12, 0x006D,
+0x0F12, 0x0045,
+0x0F12, 0x002D,
+0x0F12, 0x0025,
+0x0F12, 0x002E,
+0x0F12, 0x0049,
+0x0F12, 0x0073,
+0x0F12, 0x00AA,
+0x0F12, 0x00EC,
+0x0F12, 0x0135,
+0x0F12, 0x0149,
+0x0F12, 0x0105,
+0x0F12, 0x00C9,
+0x0F12, 0x0096,
+0x0F12, 0x006F,
+0x0F12, 0x0056,
+0x0F12, 0x004E,
+0x0F12, 0x0056,
+0x0F12, 0x006F,
+0x0F12, 0x0096,
+0x0F12, 0x00CA,
+0x0F12, 0x0109,
+0x0F12, 0x0153,
+0x0F12, 0x0181,
+0x0F12, 0x013B,
+0x0F12, 0x0102,
+0x0F12, 0x00D2,
+0x0F12, 0x00AE,
+0x0F12, 0x0096,
+0x0F12, 0x008D,
+0x0F12, 0x0094,
+0x0F12, 0x00AA,
+0x0F12, 0x00CC,
+0x0F12, 0x00F8,
+0x0F12, 0x0135,
+0x0F12, 0x0183,
+0x0F12, 0x01B0,
+0x0F12, 0x016F,
+0x0F12, 0x0139,
+0x0F12, 0x010E,
+0x0F12, 0x00ED,
+0x0F12, 0x00D6,
+0x0F12, 0x00CD,
+0x0F12, 0x00D3,
+0x0F12, 0x00E8,
+0x0F12, 0x0106,
+0x0F12, 0x012D,
+0x0F12, 0x0163,
+0x0F12, 0x0195,
+0x0F12, 0x0146,
+0x0F12, 0x011B,
+0x0F12, 0x00EC,
+0x0F12, 0x00C6,
+0x0F12, 0x00AD,
+0x0F12, 0x009F,
+0x0F12, 0x009C,
+0x0F12, 0x00A6,
+0x0F12, 0x00BC,
+0x0F12, 0x00DF,
+0x0F12, 0x010B,
+0x0F12, 0x0146,
+0x0F12, 0x0176,
+0x0F12, 0x0120,
+0x0F12, 0x00EC,
+0x0F12, 0x00BA,
+0x0F12, 0x0093,
+0x0F12, 0x007A,
+0x0F12, 0x006C,
+0x0F12, 0x0069,
+0x0F12, 0x0073,
+0x0F12, 0x008B,
+0x0F12, 0x00AD,
+0x0F12, 0x00DD,
+0x0F12, 0x0118,
+0x0F12, 0x0156,
+0x0F12, 0x00F0,
+0x0F12, 0x00BF,
+0x0F12, 0x0089,
+0x0F12, 0x0062,
+0x0F12, 0x0047,
+0x0F12, 0x003A,
+0x0F12, 0x0038,
+0x0F12, 0x0041,
+0x0F12, 0x0058,
+0x0F12, 0x007C,
+0x0F12, 0x00AC,
+0x0F12, 0x00E7,
+0x0F12, 0x0123,
+0x0F12, 0x00D5,
+0x0F12, 0x00A1,
+0x0F12, 0x006C,
+0x0F12, 0x0044,
+0x0F12, 0x0029,
+0x0F12, 0x001B,
+0x0F12, 0x0018,
+0x0F12, 0x0022,
+0x0F12, 0x0039,
+0x0F12, 0x005D,
+0x0F12, 0x008E,
+0x0F12, 0x00CA,
+0x0F12, 0x0105,
+0x0F12, 0x00C1,
+0x0F12, 0x008C,
+0x0F12, 0x0057,
+0x0F12, 0x002F,
+0x0F12, 0x0014,
+0x0F12, 0x0006,
+0x0F12, 0x0003,
+0x0F12, 0x000B,
+0x0F12, 0x0022,
+0x0F12, 0x0046,
+0x0F12, 0x0076,
+0x0F12, 0x00B4,
+0x0F12, 0x00F0,
+0x0F12, 0x00C1,
+0x0F12, 0x008B,
+0x0F12, 0x0055,
+0x0F12, 0x002C,
+0x0F12, 0x0011,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x0F12, 0x0007,
+0x0F12, 0x001D,
+0x0F12, 0x0040,
+0x0F12, 0x0070,
+0x0F12, 0x00AF,
+0x0F12, 0x00EC,
+0x0F12, 0x00C6,
+0x0F12, 0x0092,
+0x0F12, 0x005D,
+0x0F12, 0x0035,
+0x0F12, 0x0019,
+0x0F12, 0x000A,
+0x0F12, 0x0006,
+0x0F12, 0x000E,
+0x0F12, 0x0024,
+0x0F12, 0x0046,
+0x0F12, 0x0074,
+0x0F12, 0x00B0,
+0x0F12, 0x00ED,
+0x0F12, 0x00E0,
+0x0F12, 0x00AA,
+0x0F12, 0x0078,
+0x0F12, 0x0050,
+0x0F12, 0x0034,
+0x0F12, 0x0024,
+0x0F12, 0x001F,
+0x0F12, 0x0026,
+0x0F12, 0x003A,
+0x0F12, 0x005D,
+0x0F12, 0x008B,
+0x0F12, 0x00C4,
+0x0F12, 0x00FE,
+0x0F12, 0x00FE,
+0x0F12, 0x00CB,
+0x0F12, 0x0099,
+0x0F12, 0x0074,
+0x0F12, 0x005A,
+0x0F12, 0x004B,
+0x0F12, 0x0046,
+0x0F12, 0x004A,
+0x0F12, 0x005C,
+0x0F12, 0x007A,
+0x0F12, 0x00A7,
+0x0F12, 0x00E0,
+0x0F12, 0x0119,
+0x0F12, 0x0131,
+0x0F12, 0x00FD,
+0x0F12, 0x00CF,
+0x0F12, 0x00AC,
+0x0F12, 0x0092,
+0x0F12, 0x0084,
+0x0F12, 0x007F,
+0x0F12, 0x0085,
+0x0F12, 0x0094,
+0x0F12, 0x00AE,
+0x0F12, 0x00CF,
+0x0F12, 0x0107,
+0x0F12, 0x0148,
+0x0F12, 0x015F,
+0x0F12, 0x012F,
+0x0F12, 0x0102,
+0x0F12, 0x00E3,
+0x0F12, 0x00CA,
+0x0F12, 0x00BD,
+0x0F12, 0x00B8,
+0x0F12, 0x00BC,
+0x0F12, 0x00CB,
+0x0F12, 0x00E4,
+0x0F12, 0x0104,
+0x0F12, 0x012E,
+0x0F12, 0x0148,
+0x002A, 0x074E,
+0x0F12, 0x0001,
+0x002A, 0x0D30,
+0x0F12, 0x02A8,
+0x0F12, 0x0347,
+0x002A, 0x06B8,
+0x0F12, 0x00C0,
+0x0F12, 0x00E0,
+0x0F12, 0x0120,
+0x0F12, 0x0124,
+0x0F12, 0x0156,
+0x0F12, 0x017F,
+0x0F12, 0x018F,
+0x002A, 0x0664,
+0x0F12, 0x013E,
+0x002A, 0x06C6,
+0x0F12, 0x010B,
+0x0F12, 0x0103,
+0x0F12, 0x00FC,
+0x0F12, 0x010C,
+0x002A, 0x0C48,
+0x0F12, 0x03C8,
+0x0F12, 0x03DE,
+0x0F12, 0x0372,
+0x0F12, 0x03EA,
+0x0F12, 0x0336,
+0x0F12, 0x03DE,
+0x0F12, 0x0302,
+0x0F12, 0x03A2,
+0x0F12, 0x02C8,
+0x0F12, 0x0368,
+0x0F12, 0x0292,
+0x0F12, 0x033A,
+0x0F12, 0x0276,
+0x0F12, 0x0306,
+0x0F12, 0x025A,
+0x0F12, 0x02C2,
+0x0F12, 0x0246,
+0x0F12, 0x02A2,
+0x0F12, 0x0232,
+0x0F12, 0x0298,
+0x0F12, 0x021E,
+0x0F12, 0x027E,
+0x0F12, 0x0208,
+0x0F12, 0x026C,
+0x0F12, 0x01EE,
+0x0F12, 0x025C,
+0x0F12, 0x01F0,
+0x0F12, 0x0248,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0005,
+0x002A, 0x0C9C,
+0x0F12, 0x000E,
+0x002A, 0x0CA0,
+0x0F12, 0x0108,
+0x002A, 0x0CE0,
+0x0F12, 0x03D4,
+0x0F12, 0x043E,
+0x0F12, 0x035C,
+0x0F12, 0x0438,
+0x0F12, 0x02F0,
+0x0F12, 0x042D,
+0x0F12, 0x029A,
+0x0F12, 0x03EF,
+0x0F12, 0x025E,
+0x0F12, 0x0395,
+0x0F12, 0x022E,
+0x0F12, 0x0346,
+0x0F12, 0x0200,
+0x0F12, 0x02F6,
+0x0F12, 0x01CE,
+0x0F12, 0x02C8,
+0x0F12, 0x01BB,
+0x0F12, 0x0287,
+0x0F12, 0x01E2,
+0x0F12, 0x0239,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0006,
+0x002A, 0x0D18,
+0x0F12, 0x00AE,
+0x002A, 0x0CA4,
+0x0F12, 0x026E,
+0x0F12, 0x02A4,
+0x0F12, 0x0262,
+0x0F12, 0x02A8,
+0x0F12, 0x0256,
+0x0F12, 0x02AE,
+0x0F12, 0x0248,
+0x0F12, 0x02A4,
+0x0F12, 0x023E,
+0x0F12, 0x029A,
+0x0F12, 0x023A,
+0x0F12, 0x0290,
+0x0F12, 0x023A,
+0x0F12, 0x027E,
+0x0F12, 0x0244,
+0x0F12, 0x0266,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0004,
+0x002A, 0x0CD8,
+0x0F12, 0x0008,
+0x002A, 0x0CDC,
+0x0F12, 0x0204,
+0x002A, 0x0D1C,
+0x0F12, 0x037C,
+0x002A, 0x0D20,
+0x0F12, 0x0157,
+0x002A, 0x0D24,
+0x0F12, 0x3EB8,
+0x002A, 0x0D2C,
+0x0F12, 0x013D,
+0x0F12, 0x011E,
+0x002A, 0x0D46,
+0x0F12, 0x04C0,
+0x002A, 0x0D28,
+0x0F12, 0x0270,
+0x0F12, 0x0240,
+0x002A, 0x0D5C,
+0x0F12, 0x7FFF,
+0x0F12, 0x0050,
+0x002A, 0x2316,
+0x0F12, 0x0006,
+0x002A, 0x0E44,
+0x0F12, 0x0525,
+0x0F12, 0x0400,
+0x0F12, 0x078C,
+0x002A, 0x0E36,
+0x0F12, 0x0028,
+0x0F12, 0xFFD8,
+0x0F12, 0x0000,
+0x002A, 0x0DD4,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0xFFF0,
+0x0F12, 0x0080,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0xFFF0,
+0x0F12, 0x0080,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0xFFF0,
+0x0F12, 0x0080,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0032,
+0x0F12, 0x0000,
+0x0F12, 0x0020,
+0x0F12, 0xFFC0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0032,
+0x0F12, 0x0000,
+0x0F12, 0x0020,
+0x0F12, 0xFFC0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0032,
+0x0F12, 0x0000,
+0x0F12, 0x0020,
+0x0F12, 0xFFC0,
+0x0F12, 0x02D9,
+0x0F12, 0x0357,
+0x0F12, 0x03D1,
+0x0F12, 0x0DF6,
+0x0F12, 0x0ED8,
+0x0F12, 0x0F51,
+0x0F12, 0x0F5C,
+0x0F12, 0x0F8F,
+0x0F12, 0x1006,
+0x0F12, 0x00AC,
+0x0F12, 0x00BD,
+0x0F12, 0x0049,
+0x0F12, 0x00F5,
+0x002A, 0x0E4A,
+0x0F12, 0x0002,
+0x002A, 0x051A,
+0x0F12, 0x010E,
+0x0F12, 0x00F5,
+0x002A, 0x0F76,
+0x0F12, 0x0007,
+0x002A, 0x1034,
+0x0F12, 0x00C0,
+0x0F12, 0x00E0,
+0x0F12, 0x0104,
+0x0F12, 0x0129,
+0x0F12, 0x0156,
+0x0F12, 0x017F,
+0x0F12, 0x018F,
+0x0F12, 0x0120,
+0x0F12, 0x0120,
+0x0F12, 0x0120,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x0F12, 0x0100,
+0x002A, 0x3288,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x0F12, 0x0000,
+0x0F12, 0x0008,
+0x0F12, 0x0013,
+0x0F12, 0x002C,
+0x0F12, 0x0062,
+0x0F12, 0x00CD,
+0x0F12, 0x0129,
+0x0F12, 0x0151,
+0x0F12, 0x0174,
+0x0F12, 0x01AA,
+0x0F12, 0x01D7,
+0x0F12, 0x01FE,
+0x0F12, 0x0221,
+0x0F12, 0x025D,
+0x0F12, 0x0291,
+0x0F12, 0x02EB,
+0x0F12, 0x033A,
+0x0F12, 0x0380,
+0x0F12, 0x03C2,
+0x0F12, 0x03FF,
+0x002A, 0x06A6,
+0x0F12, 0x00C0,
+0x0F12, 0x00E0,
+0x0F12, 0x0110,
+0x0F12, 0x0139,
+0x0F12, 0x0166,
+0x0F12, 0x019F,
+0x002A, 0x33A4,
+0x0F12, 0x0181,
+0x0F12, 0xFF88,
+0x0F12, 0xFF90,
+0x0F12, 0xFE6B,
+0x0F12, 0x0106,
+0x0F12, 0xFF0B,
+0x0F12, 0xFFDD,
+0x0F12, 0xFFEE,
+0x0F12, 0x01CB,
+0x0F12, 0x0187,
+0x0F12, 0x00A6,
+0x0F12, 0xFEBE,
+0x0F12, 0x021C,
+0x0F12, 0xFF5F,
+0x0F12, 0x0175,
+0x0F12, 0xFEE7,
+0x0F12, 0x0106,
+0x0F12, 0x00F3,
+0x0F12, 0x0181,
+0x0F12, 0xFF88,
+0x0F12, 0xFF90,
+0x0F12, 0xFE6B,
+0x0F12, 0x0106,
+0x0F12, 0xFF0B,
+0x0F12, 0xFFDD,
+0x0F12, 0xFFEE,
+0x0F12, 0x01CB,
+0x0F12, 0x0187,
+0x0F12, 0x00A6,
+0x0F12, 0xFEBE,
+0x0F12, 0x021C,
+0x0F12, 0xFF5F,
+0x0F12, 0x0175,
+0x0F12, 0xFEE7,
+0x0F12, 0x0106,
+0x0F12, 0x00F3,
+0x0F12, 0x0181,
+0x0F12, 0xFF88,
+0x0F12, 0xFF90,
+0x0F12, 0xFE6B,
+0x0F12, 0x0106,
+0x0F12, 0xFF0B,
+0x0F12, 0xFFDD,
+0x0F12, 0xFFEE,
+0x0F12, 0x01CB,
+0x0F12, 0x0187,
+0x0F12, 0x00A6,
+0x0F12, 0xFEBE,
+0x0F12, 0x021C,
+0x0F12, 0xFF5F,
+0x0F12, 0x0175,
+0x0F12, 0xFEE7,
+0x0F12, 0x0106,
+0x0F12, 0x00F3,
+0x0F12, 0x01FD,
+0x0F12, 0xFFAB,
+0x0F12, 0xFFED,
+0x0F12, 0xFEB5,
+0x0F12, 0x0112,
+0x0F12, 0xFEDC,
+0x0F12, 0xFFD2,
+0x0F12, 0x0015,
+0x0F12, 0x01A1,
+0x0F12, 0x0111,
+0x0F12, 0x009D,
+0x0F12, 0xFECB,
+0x0F12, 0x01FC,
+0x0F12, 0xFF99,
+0x0F12, 0x01A9,
+0x0F12, 0xFF26,
+0x0F12, 0x012B,
+0x0F12, 0x00DF,
+0x0F12, 0x01E3,
+0x0F12, 0xFFA4,
+0x0F12, 0xFFDB,
+0x0F12, 0xFEB5,
+0x0F12, 0x0112,
+0x0F12, 0xFEDC,
+0x0F12, 0xFFD2,
+0x0F12, 0xFFFE,
+0x0F12, 0x01B7,
+0x0F12, 0x00E8,
+0x0F12, 0x0095,
+0x0F12, 0xFF0D,
+0x0F12, 0x0182,
+0x0F12, 0xFF29,
+0x0F12, 0x0146,
+0x0F12, 0xFF26,
+0x0F12, 0x012B,
+0x0F12, 0x00DF,
+0x0F12, 0x01E3,
+0x0F12, 0xFFA4,
+0x0F12, 0xFFDB,
+0x0F12, 0xFEB5,
+0x0F12, 0x0112,
+0x0F12, 0xFEDC,
+0x0F12, 0xFFD2,
+0x0F12, 0xFFFE,
+0x0F12, 0x01B7,
+0x0F12, 0x00E8,
+0x0F12, 0x0095,
+0x0F12, 0xFF0D,
+0x0F12, 0x0182,
+0x0F12, 0xFF29,
+0x0F12, 0x0146,
+0x0F12, 0xFF26,
+0x0F12, 0x012B,
+0x0F12, 0x00DF,
+0x002A, 0x3380,
+0x0F12, 0x020E,
+0x0F12, 0xFF88,
+0x0F12, 0xFFCE,
+0x0F12, 0xFE3D,
+0x0F12, 0x0158,
+0x0F12, 0xFF03,
+0x0F12, 0xFF99,
+0x0F12, 0x0018,
+0x0F12, 0x0235,
+0x0F12, 0x0101,
+0x0F12, 0x0116,
+0x0F12, 0xFF00,
+0x0F12, 0x01C5,
+0x0F12, 0xFF80,
+0x0F12, 0x019D,
+0x0F12, 0xFE7A,
+0x0F12, 0x0179,
+0x0F12, 0x0179,
+0x002A, 0x0764,
+0x0F12, 0x0049,
+0x0F12, 0x005F,
+0x0F12, 0x00CB,
+0x0F12, 0x01E0,
+0x0F12, 0x0220,
+0x002A, 0x07C4,
+0x0F12, 0x0014,
+0x0F12, 0x0000,
+0x0F12, 0x0014,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C1,
+0x0F12, 0x03FF,
+0x0F12, 0x009C,
+0x0F12, 0x0251,
+0x0F12, 0x03FF,
+0x0F12, 0x000C,
+0x0F12, 0x0010,
+0x0F12, 0x012C,
+0x0F12, 0x03E8,
+0x0F12, 0x0046,
+0x0F12, 0x005A,
+0x0F12, 0x0070,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x01AA,
+0x0F12, 0x003C,
+0x0F12, 0x003C,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x003E,
+0x0F12, 0x0008,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x0A24,
+0x0F12, 0x1701,
+0x0F12, 0x0229,
+0x0F12, 0x1403,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00FF,
+0x0F12, 0x045A,
+0x0F12, 0x1414,
+0x0F12, 0x0301,
+0x0F12, 0xFF07,
+0x0F12, 0x081E,
+0x0F12, 0x0A14,
+0x0F12, 0x0F0F,
+0x0F12, 0x0A00,
+0x0F12, 0x0032,
+0x0F12, 0x000E,
+0x0F12, 0x0002,
+0x0F12, 0x00FF,
+0x0F12, 0x1102,
+0x0F12, 0x001B,
+0x0F12, 0x0900,
+0x0F12, 0x0600,
+0x0F12, 0x0504,
+0x0F12, 0x0306,
+0x0F12, 0x4603,
+0x0F12, 0x0480,
+0x0F12, 0x003C,
+0x0F12, 0x0080,
+0x0F12, 0x0101,
+0x0F12, 0x0707,
+0x0F12, 0x4601,
+0x0F12, 0x4944,
+0x0F12, 0x5044,
+0x0F12, 0x0500,
+0x0F12, 0x0003,
+0x0F12, 0x5400,
+0x0F12, 0x0714,
+0x0F12, 0x32FF,
+0x0F12, 0x5A04,
+0x0F12, 0x201E,
+0x0F12, 0x4012,
+0x0F12, 0x0204,
+0x0F12, 0x1403,
+0x0F12, 0x0114,
+0x0F12, 0x0101,
+0x0F12, 0x4446,
+0x0F12, 0x646E,
+0x0F12, 0x0028,
+0x0F12, 0x030A,
+0x0F12, 0x0000,
+0x0F12, 0x141E,
+0x0F12, 0xFF07,
+0x0F12, 0x0432,
+0x0F12, 0x0000,
+0x0F12, 0x0F0F,
+0x0F12, 0x0440,
+0x0F12, 0x0302,
+0x0F12, 0x1414,
+0x0F12, 0x0101,
+0x0F12, 0x4601,
+0x0F12, 0x6E44,
+0x0F12, 0x2864,
+0x0F12, 0x0A00,
+0x0F12, 0x0003,
+0x0F12, 0x1E00,
+0x0F12, 0x0714,
+0x0F12, 0x32FF,
+0x0F12, 0x0004,
+0x0F12, 0x0F00,
+0x0F12, 0x400F,
+0x0F12, 0x0204,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0014,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C1,
+0x0F12, 0x03FF,
+0x0F12, 0x009C,
+0x0F12, 0x0251,
+0x0F12, 0x03FF,
+0x0F12, 0x000C,
+0x0F12, 0x0010,
+0x0F12, 0x012C,
+0x0F12, 0x03E8,
+0x0F12, 0x0046,
+0x0F12, 0x005A,
+0x0F12, 0x0070,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x01AE,
+0x0F12, 0x001E,
+0x0F12, 0x001E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x003E,
+0x0F12, 0x0008,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x0A24,
+0x0F12, 0x1701,
+0x0F12, 0x0229,
+0x0F12, 0x1403,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00FF,
+0x0F12, 0x045A,
+0x0F12, 0x1414,
+0x0F12, 0x0301,
+0x0F12, 0xFF07,
+0x0F12, 0x081E,
+0x0F12, 0x0A14,
+0x0F12, 0x0F0F,
+0x0F12, 0x0A00,
+0x0F12, 0x0032,
+0x0F12, 0x000E,
+0x0F12, 0x0002,
+0x0F12, 0x00FF,
+0x0F12, 0x1102,
+0x0F12, 0x001B,
+0x0F12, 0x0900,
+0x0F12, 0x0600,
+0x0F12, 0x0504,
+0x0F12, 0x0306,
+0x0F12, 0x4603,
+0x0F12, 0x0480,
+0x0F12, 0x0046,
+0x0F12, 0x0080,
+0x0F12, 0x0101,
+0x0F12, 0x0707,
+0x0F12, 0x1E01,
+0x0F12, 0x491E,
+0x0F12, 0x5044,
+0x0F12, 0x0500,
+0x0F12, 0x0004,
+0x0F12, 0x3C0A,
+0x0F12, 0x0714,
+0x0F12, 0x3214,
+0x0F12, 0x5A03,
+0x0F12, 0x121E,
+0x0F12, 0x4012,
+0x0F12, 0x0604,
+0x0F12, 0x1E06,
+0x0F12, 0x011E,
+0x0F12, 0x0101,
+0x0F12, 0x3A3C,
+0x0F12, 0x585A,
+0x0F12, 0x0028,
+0x0F12, 0x030A,
+0x0F12, 0x0000,
+0x0F12, 0x141E,
+0x0F12, 0xFF07,
+0x0F12, 0x0432,
+0x0F12, 0x0000,
+0x0F12, 0x0F0F,
+0x0F12, 0x0440,
+0x0F12, 0x0302,
+0x0F12, 0x1E1E,
+0x0F12, 0x0101,
+0x0F12, 0x3C01,
+0x0F12, 0x5A3A,
+0x0F12, 0x2858,
+0x0F12, 0x0A00,
+0x0F12, 0x0003,
+0x0F12, 0x1E00,
+0x0F12, 0x0714,
+0x0F12, 0x32FF,
+0x0F12, 0x0004,
+0x0F12, 0x0F00,
+0x0F12, 0x400F,
+0x0F12, 0x0204,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C1,
+0x0F12, 0x03FF,
+0x0F12, 0x009C,
+0x0F12, 0x0251,
+0x0F12, 0x03FF,
+0x0F12, 0x000C,
+0x0F12, 0x0010,
+0x0F12, 0x012C,
+0x0F12, 0x03E8,
+0x0F12, 0x0046,
+0x0F12, 0x005A,
+0x0F12, 0x0070,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0226,
+0x0F12, 0x001E,
+0x0F12, 0x001E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x004E,
+0x0F12, 0x0000,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x003C,
+0x0F12, 0x001E,
+0x0F12, 0x0A24,
+0x0F12, 0x1701,
+0x0F12, 0x0229,
+0x0F12, 0x1403,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0906,
+0x0F12, 0x00FF,
+0x0F12, 0x045A,
+0x0F12, 0x1414,
+0x0F12, 0x0301,
+0x0F12, 0xFF07,
+0x0F12, 0x081E,
+0x0F12, 0x0A14,
+0x0F12, 0x0F0F,
+0x0F12, 0x0A00,
+0x0F12, 0x0090,
+0x0F12, 0x000A,
+0x0F12, 0x0002,
+0x0F12, 0x00FF,
+0x0F12, 0x1102,
+0x0F12, 0x001B,
+0x0F12, 0x0900,
+0x0F12, 0x0600,
+0x0F12, 0x0504,
+0x0F12, 0x0306,
+0x0F12, 0x4602,
+0x0F12, 0x0880,
+0x0F12, 0x0080,
+0x0F12, 0x0080,
+0x0F12, 0x0101,
+0x0F12, 0x0707,
+0x0F12, 0x1E01,
+0x0F12, 0x3C1E,
+0x0F12, 0x5028,
+0x0F12, 0x0500,
+0x0F12, 0x1A04,
+0x0F12, 0x280A,
+0x0F12, 0x080C,
+0x0F12, 0x1414,
+0x0F12, 0x6A03,
+0x0F12, 0x121E,
+0x0F12, 0x4012,
+0x0F12, 0x0604,
+0x0F12, 0x2806,
+0x0F12, 0x0128,
+0x0F12, 0x0101,
+0x0F12, 0x2224,
+0x0F12, 0x3236,
+0x0F12, 0x0028,
+0x0F12, 0x030A,
+0x0F12, 0x0410,
+0x0F12, 0x141E,
+0x0F12, 0xFF07,
+0x0F12, 0x0432,
+0x0F12, 0x4050,
+0x0F12, 0x0F0F,
+0x0F12, 0x0440,
+0x0F12, 0x0302,
+0x0F12, 0x2828,
+0x0F12, 0x0101,
+0x0F12, 0x2401,
+0x0F12, 0x3622,
+0x0F12, 0x2832,
+0x0F12, 0x0A00,
+0x0F12, 0x1003,
+0x0F12, 0x1E04,
+0x0F12, 0x0714,
+0x0F12, 0x32FF,
+0x0F12, 0x5004,
+0x0F12, 0x0F40,
+0x0F12, 0x400F,
+0x0F12, 0x0204,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C1,
+0x0F12, 0x03FF,
+0x0F12, 0x009C,
+0x0F12, 0x0251,
+0x0F12, 0x03FF,
+0x0F12, 0x000C,
+0x0F12, 0x0010,
+0x0F12, 0x00C8,
+0x0F12, 0x03E8,
+0x0F12, 0x0046,
+0x0F12, 0x0050,
+0x0F12, 0x0070,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0226,
+0x0F12, 0x0014,
+0x0F12, 0x0014,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x004E,
+0x0F12, 0x0000,
+0x0F12, 0x002D,
+0x0F12, 0x0019,
+0x0F12, 0x002D,
+0x0F12, 0x0019,
+0x0F12, 0x0A24,
+0x0F12, 0x1701,
+0x0F12, 0x0229,
+0x0F12, 0x1403,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0906,
+0x0F12, 0x00FF,
+0x0F12, 0x045A,
+0x0F12, 0x1414,
+0x0F12, 0x0301,
+0x0F12, 0xFF07,
+0x0F12, 0x081E,
+0x0F12, 0x0A14,
+0x0F12, 0x0F0F,
+0x0F12, 0x0A00,
+0x0F12, 0x0090,
+0x0F12, 0x000A,
+0x0F12, 0x0001,
+0x0F12, 0x00FF,
+0x0F12, 0x1002,
+0x0F12, 0x001E,
+0x0F12, 0x0900,
+0x0F12, 0x0600,
+0x0F12, 0x0504,
+0x0F12, 0x0307,
+0x0F12, 0x5002,
+0x0F12, 0x0080,
+0x0F12, 0x0080,
+0x0F12, 0x0080,
+0x0F12, 0x0101,
+0x0F12, 0x0707,
+0x0F12, 0x1E01,
+0x0F12, 0x2A1E,
+0x0F12, 0x5020,
+0x0F12, 0x0500,
+0x0F12, 0x1A04,
+0x0F12, 0x280A,
+0x0F12, 0x080C,
+0x0F12, 0x1414,
+0x0F12, 0x6A03,
+0x0F12, 0x121E,
+0x0F12, 0x4012,
+0x0F12, 0x0604,
+0x0F12, 0x3C06,
+0x0F12, 0x013C,
+0x0F12, 0x0101,
+0x0F12, 0x1C1E,
+0x0F12, 0x1E22,
+0x0F12, 0x0028,
+0x0F12, 0x030A,
+0x0F12, 0x0214,
+0x0F12, 0x0E14,
+0x0F12, 0xFF06,
+0x0F12, 0x0432,
+0x0F12, 0x4052,
+0x0F12, 0x150C,
+0x0F12, 0x0440,
+0x0F12, 0x0302,
+0x0F12, 0x3C3C,
+0x0F12, 0x0101,
+0x0F12, 0x1E01,
+0x0F12, 0x221C,
+0x0F12, 0x281E,
+0x0F12, 0x0A00,
+0x0F12, 0x1403,
+0x0F12, 0x1402,
+0x0F12, 0x060E,
+0x0F12, 0x32FF,
+0x0F12, 0x5204,
+0x0F12, 0x0C40,
+0x0F12, 0x4015,
+0x0F12, 0x0204,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x00C1,
+0x0F12, 0x03FF,
+0x0F12, 0x009C,
+0x0F12, 0x0251,
+0x0F12, 0x03FF,
+0x0F12, 0x000C,
+0x0F12, 0x0010,
+0x0F12, 0x0032,
+0x0F12, 0x028A,
+0x0F12, 0x0032,
+0x0F12, 0x01F4,
+0x0F12, 0x0070,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x01AA,
+0x0F12, 0x003C,
+0x0F12, 0x0050,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0044,
+0x0F12, 0x0014,
+0x0F12, 0x0046,
+0x0F12, 0x0019,
+0x0F12, 0x0046,
+0x0F12, 0x0019,
+0x0F12, 0x0A24,
+0x0F12, 0x1701,
+0x0F12, 0x0229,
+0x0F12, 0x0503,
+0x0F12, 0x080F,
+0x0F12, 0x0808,
+0x0F12, 0x0000,
+0x0F12, 0x00FF,
+0x0F12, 0x012D,
+0x0F12, 0x1414,
+0x0F12, 0x0301,
+0x0F12, 0xFF07,
+0x0F12, 0x061E,
+0x0F12, 0x0A1E,
+0x0F12, 0x0606,
+0x0F12, 0x0A03,
+0x0F12, 0x378B,
+0x0F12, 0x1028,
+0x0F12, 0x0001,
+0x0F12, 0x00FF,
+0x0F12, 0x1002,
+0x0F12, 0x001E,
+0x0F12, 0x0900,
+0x0F12, 0x0600,
+0x0F12, 0x0504,
+0x0F12, 0x0307,
+0x0F12, 0x5001,
+0x0F12, 0x0080,
+0x0F12, 0x0080,
+0x0F12, 0x0080,
+0x0F12, 0x0E0E,
+0x0F12, 0x0101,
+0x0F12, 0x3201,
+0x0F12, 0x1832,
+0x0F12, 0x210C,
+0x0F12, 0x0A00,
+0x0F12, 0x1E04,
+0x0F12, 0x0A08,
+0x0F12, 0x070C,
+0x0F12, 0x3264,
+0x0F12, 0x5A02,
+0x0F12, 0x1040,
+0x0F12, 0x4012,
+0x0F12, 0x0604,
+0x0F12, 0x4606,
+0x0F12, 0x0146,
+0x0F12, 0x0101,
+0x0F12, 0x1C18,
+0x0F12, 0x1819,
+0x0F12, 0x0028,
+0x0F12, 0x030A,
+0x0F12, 0x0514,
+0x0F12, 0x0C14,
+0x0F12, 0xFF05,
+0x0F12, 0x0432,
+0x0F12, 0x4052,
+0x0F12, 0x1514,
+0x0F12, 0x0440,
+0x0F12, 0x0302,
+0x0F12, 0x4646,
+0x0F12, 0x0101,
+0x0F12, 0x1801,
+0x0F12, 0x191C,
+0x0F12, 0x2818,
+0x0F12, 0x0A00,
+0x0F12, 0x1403,
+0x0F12, 0x1405,
+0x0F12, 0x050C,
+0x0F12, 0x32FF,
+0x0F12, 0x5204,
+0x0F12, 0x1440,
+0x0F12, 0x4015,
+0x0F12, 0x0204,
+0x0F12, 0x0003,
+0x0F12, 0x7DFA,
+0x0F12, 0xFFBD,
+0x0F12, 0x26FE,
+0x0F12, 0xF7BC,
+0x0F12, 0x7E06,
+0x0F12, 0x00D3,
+0x002A, 0x3904,
+0x0F12, 0x0007,
+0x0F12, 0x00E2,
+0x0F12, 0x0005,
+0x0F12, 0x00E2,
+0x002A, 0x0F7E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0201,
+0x0F12, 0x0102,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0202,
+0x0F12, 0x0202,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0202,
+0x0F12, 0x0202,
+0x0F12, 0x0101,
+0x0F12, 0x0201,
+0x0F12, 0x0202,
+0x0F12, 0x0202,
+0x0F12, 0x0102,
+0x0F12, 0x0201,
+0x0F12, 0x0202,
+0x0F12, 0x0202,
+0x0F12, 0x0102,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x0F12, 0x0101,
+0x002A, 0x01CC,
+0x0F12, 0x5DC0,
+0x0F12, 0x0000,
+0x002A, 0x01EE,
+0x0F12, 0x0003,
+0x0F12, 0x0000,
+0x002A, 0x01F6,
+0x0F12, 0x1F40,
+0x0F12, 0x32A8,
+0x0F12, 0x32E8,
+0x0F12, 0x1F40,
+0x0F12, 0x2ea0,
+0x0F12, 0x2f00,
+0x0F12, 0x38A4,
+0x0F12, 0x37A4,
+0x0F12, 0x39A4,
+0x002A, 0x0208,
+0x0F12, 0x0001,
+};
+
+uint32_t s5k5ca_default_regs_init2[]={
+0x0028, 0x7000,
+0x002A, 0x026C,
+0x0F12, 0x0280,
+0x0F12, 0x01E0,
+0x0F12, 0x0005,
+0x0F12, 0x32e8,
+0x0F12, 0x32A8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0001,
+0x0F12, 0x029a,
+0x0F12, 0x014E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+
+//Preview config[1] 320 240
+0x0028, 0x7000,
+0x002A, 0x029C,
+0x0F12, 0x0140,
+0x0F12, 0x00F0,
+0x0F12, 0x0005,
+0x0F12, 0x32E8,
+0x0F12, 0x32a8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0001,
+0x0F12, 0x029A,
+0x0F12, 0x014E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+
+//Preview config[2] 176 144
+0x0028, 0x7000,
+0x002A, 0x02CC,
+0x0F12, 0x00B0,
+0x0F12, 0x0090,
+0x0F12, 0x0005,
+0x0F12, 0x32E8,
+0x0F12, 0x32a8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0001,
+0x0F12, 0x029A,
+0x0F12, 0x014E,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+
+//Preview config[3] night
+0x0028, 0x7000,
+0x002A, 0x02FC,
+0x0F12, 0x0280,
+0x0F12, 0x01E0,
+0x0F12, 0x0005,
+0x0F12, 0x32E8,
+0x0F12, 0x32a8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0001,
+0x0F12, 0x0535,
+0x0F12, 0x029A,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+
+0x002A, 0x035C,
+0x0F12, 0x0000,
+0x0F12, 0x0800,
+0x0F12, 0x0600,
+0x0F12, 0x0005,
+0x0F12, 0x32E8,
+0x0F12, 0x32a8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0002,
+0x0F12, 0x0535,
+0x0F12, 0x0535,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0800,
+0x0F12, 0x0600,
+0x0F12, 0x0005,
+0x0F12, 0x32E8,
+0x0F12, 0x32a8,
+0x0F12, 0x0100,
+0x0F12, 0x0800,
+0x0F12, 0x0046,
+0x0F12, 0x0010,
+0x0F12, 0x01E0,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0002,
+0x0F12, 0x09C4,
+0x0F12, 0x0535,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+0x0F12, 0x0000,
+};
+
+uint32_t s5k5ca_default_regs_init3[]={
+0x002A, 0x0208,
+0x0F12, 0x0001,
+0x002A, 0x023C,
+0x0F12, 0x0000,
+0x002A, 0x0244,
+0x0F12, 0x0000,
+0x002A, 0x0240,
+0x0F12, 0x0001,
+0x002A, 0x0230,
+0x0F12, 0x0001,
+0x002A, 0x023E,
+0x0F12, 0x0001,
+0x002A, 0x0246,
+0x0F12, 0x0001,
+0x002A, 0x0220,
+0x0F12, 0x0001,
+0x0F12, 0x0001,
+0x1000, 0x0001,
+};
+
+uint32_t s5k5ca_default_regs_init4[]={
+0x002A, 0x0DA0,
+0x0F12, 0x0005,
+0x002A, 0x0D88,
+0x0F12, 0x0038,
+0x0F12, 0x0074,
+0x0F12, 0xFFF1,
+0x0F12, 0x00BF,
+0x0F12, 0xFF9B,
+0x0F12, 0x00DB,
+0x0F12, 0xFF56,
+0x0F12, 0x00F0,
+0x0F12, 0xFEFF,
+0x0F12, 0x010F,
+0x0F12, 0x0E74,
+0x002A, 0x0DA8,
+0x0F12, 0x0BB8,
+0x002A, 0x0DA4,
+0x0F12, 0x274E,
+0x002A, 0x0DCA,
+0x0F12, 0x0030,
+0x002A, 0x3286,
+0x0F12, 0x0001,
+0x002A, 0x032C,
+0x0F12, 0xAAAA,
+0x002A, 0x032E,
+0x0F12, 0xFFFE,
+0x0F12, 0x0000,
+0x0F12, 0x001C,
+0x0F12, 0x0000,
+};
+
+#endif
+
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.c b/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.c
new file mode 100755
index 00000000..f5565774
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.c
@@ -0,0 +1,328 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "sid130b.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, sid130b_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, sid130b_640_480_regs),
+ CMOS_WIN_SIZE("UXGA", 1600, 1200, sid130b_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = sid130b_wb_auto;
+ size = ARRAY_SIZE(sid130b_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = sid130b_wb_incandescent;
+ size = ARRAY_SIZE(sid130b_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = sid130b_wb_daylight;
+ size = ARRAY_SIZE(sid130b_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = sid130b_wb_cloudy;
+ size = ARRAY_SIZE(sid130b_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = sid130b_wb_fluorescent;
+ size = ARRAY_SIZE(sid130b_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = sid130b_scene_mode_auto;
+ size = ARRAY_SIZE(sid130b_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = sid130b_scene_mode_night;
+ size = ARRAY_SIZE(sid130b_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = sid130b_exposure_neg6;
+ size = ARRAY_SIZE(sid130b_exposure_neg6);
+ break;
+ case -1:
+ regs = sid130b_exposure_neg3;
+ size = ARRAY_SIZE(sid130b_exposure_neg3);
+ break;
+ case 0:
+ regs = sid130b_exposure_zero;
+ size = ARRAY_SIZE(sid130b_exposure_zero);
+ break;
+ case 1:
+ regs = sid130b_exposure_pos3;
+ size = ARRAY_SIZE(sid130b_exposure_pos3);
+ break;
+ case 2:
+ regs = sid130b_exposure_pos6;
+ size = ARRAY_SIZE(sid130b_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x00);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x00);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ sensor_write(sd, 0x0, 0x0);
+
+ data = sensor_read(sd, 0x01);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, sid130b_default_regs_init,
+ ARRAY_SIZE(sid130b_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops sid130b_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev sid130b = {
+ .name = "sid130b",
+ .i2c_addr = 0x37,
+ .id = 0x1b,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &sid130b_ops,
+};
+
+#if 0
+static int __init sid130b_init(void)
+{
+ return cmos_register_sudbdev(&sid130b);
+}
+
+static void __exit sid130b_exit(void)
+{
+ return cmos_unregister_subdev(&sid130b);
+}
+
+module_init(sid130b_init);
+module_exit(sid130b_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.h b/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.h
new file mode 100755
index 00000000..614fb629
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sid130b/sid130b.h
@@ -0,0 +1,957 @@
+
+#ifndef __SIV130B_H_
+#define __SIV130B_H_
+
+// Scene Mode
+uint8_t sid130b_scene_mode_auto[] = {
+ 0x00,0x01,
+ 0x11,0x0c,//0a,
+ 0x40,0x45,//00,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_scene_mode_night[] = {
+ 0x00,0x01,
+ 0x11,0x0e,//14,
+ 0x40,0x60,
+ 0xff,0xff,
+};
+
+
+// White Balance
+uint8_t sid130b_wb_auto [] = {
+ 0x00,0x02,
+ 0x10,0xd0,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_wb_incandescent [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x50,0xaa,
+ 0x51,0xbe,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_wb_fluorescent [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x50,0xc2,
+ 0x51,0x9e,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_wb_daylight [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x50,0xaa,
+ 0x51,0x90,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_wb_cloudy [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x50,0xd0,
+ 0x51,0x88,
+ 0xff,0xff,
+};
+
+uint8_t sid130b_wb_tungsten [] = {
+};
+
+
+// Exposure
+uint8_t sid130b_exposure_neg6[] = {
+
+ 0x00,0x04,
+ 0xb6,0xc0,//00,
+
+
+
+
+};
+
+uint8_t sid130b_exposure_neg3[] = {
+
+ 0x00,0x04,
+ 0xb6,0xb0,//00,
+
+
+
+};
+
+uint8_t sid130b_exposure_zero[] = {
+
+ 0x00,0x04,
+ 0xb6,0x90,//00,
+
+
+
+};
+
+uint8_t sid130b_exposure_pos3[] = {
+
+ 0x00,0x04,
+ 0xb6,0x00,//00,
+
+
+};
+
+uint8_t sid130b_exposure_pos6[] = {
+
+ 0x00,0x04,
+ 0xb6,0x10,//00,
+
+
+
+};
+
+
+// Color Effect
+uint8_t sid130b_colorfx_none[] = {
+};
+
+uint8_t sid130b_colorfx_bw[] = {
+};
+
+uint8_t sid130b_colorfx_sepia[] = {
+};
+
+uint8_t sid130b_colorfx_negative[] = {
+};
+
+uint8_t sid130b_colorfx_emboss[] = {
+};
+
+uint8_t sid130b_colorfx_sketch[] = {
+};
+
+uint8_t sid130b_colorfx_sky_blue[] = {
+};
+
+uint8_t sid130b_colorfx_grass_green[] = {
+};
+
+uint8_t sid130b_colorfx_skin_whiten[] = {
+};
+
+uint8_t sid130b_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sid130b_brightness_neg4[] = {
+
+};
+
+uint8_t sid130b_brightness_neg3[] = {
+};
+
+uint8_t sid130b_brightness_neg2[] = {
+};
+
+uint8_t sid130b_brightness_neg1[] = {
+};
+
+uint8_t sid130b_brightness_zero[] = {
+};
+
+uint8_t sid130b_brightness_pos1[] = {
+};
+
+uint8_t sid130b_brightness_pos2[] = {
+};
+
+uint8_t sid130b_brightness_pos3[] = {
+};
+
+uint8_t sid130b_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t sid130b_contrast_neg4[] = {
+};
+
+uint8_t sid130b_contrast_neg3[] = {
+};
+
+uint8_t sid130b_contrast_neg2[] = {
+};
+
+uint8_t sid130b_contrast_neg1[] = {
+};
+
+uint8_t sid130b_contrast_zero[] = {
+};
+
+uint8_t sid130b_contrast_pos1[] = {
+};
+
+uint8_t sid130b_contrast_pos2[] = {
+};
+
+uint8_t sid130b_contrast_pos3[] = {
+};
+
+uint8_t sid130b_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t sid130b_saturation_neg4[] = {
+};
+
+uint8_t sid130b_saturation_neg3[] = {
+};
+
+uint8_t sid130b_saturation_neg2[] = {
+};
+
+uint8_t sid130b_saturation_neg1[] = {
+};
+
+uint8_t sid130b_saturation_zero[] = {
+};
+
+uint8_t sid130b_saturation_pos1[] = {
+};
+
+uint8_t sid130b_saturation_pos2[] = {
+};
+
+uint8_t sid130b_saturation_pos3[] = {
+};
+
+uint8_t sid130b_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QVGA
+uint8_t sid130b_320_240_regs[]={
+
+ 0x00,0x03,
+ 0x94,0x01,
+ 0x95,0x40,
+ 0x96,0x00,
+ 0x97,0xf0,
+ 0xff,0xff,
+
+};
+
+// VGA
+uint8_t sid130b_640_480_regs[]={
+
+ 0x00,0x00,
+ 0x04,0x00,
+ 0x05,0x0f,
+ 0x06,0x0f,
+ 0x00,0x03,
+ 0x94,0x06, //0x02
+ 0x95,0x40, //0x80
+ 0x96,0x04, //0x01
+ 0x97,0xb0, //0xe0
+
+ 0x00,0x04,
+ 0xe0,0xe0,
+ 0xe1,0x66,
+ 0xe2,0x66,
+ 0xe3,0x00,
+ 0xe4,0x50,
+ 0xe5,0x03,
+ 0xe6,0xc5,//00,
+ 0xe7,0x02,//00,
+ 0xe8,0x80,//00,
+ 0xff,0xff,
+
+
+
+
+};
+//SVGA
+uint8_t sid130b_800_600_regs[]={
+ 0x00,0x00,
+ 0x04,0x10,
+ 0x05,0x0f,
+ 0x06,0x8e,
+ 0x00,0x03,
+ 0x94,0x03, //0x02
+ 0x95,0x20, //0x80
+ 0x96,0x02, //0x01
+ 0x97,0x58, //0xe0
+ 0x00,0x04,
+ 0xe0,0x00,
+ 0xe1,0x00,
+ 0xe2,0x00,
+ 0xe3,0x00,
+ 0xe4,0x00,
+ 0xe5,0x00,
+ 0xe6,0x00,
+ 0xe7,0x00,
+ 0xe8,0x00,
+ 0xff,0xff,
+};
+
+
+// UXGA
+uint8_t sid130b_1600_1200_regs[]={
+ 0x00,0x00,
+ 0x04,0x10,
+ 0x05,0x0f,
+ 0x00,0x03,
+ 0x94,0x06,
+ 0x95,0x40,
+ 0x96,0x04,
+ 0x97,0xb0,
+ 0x00,0x04,
+ 0xe0,0x00,
+ 0xe1,0x00,
+ 0xe2,0x00,
+ 0xe3,0x00,
+ 0xe4,0x00,
+ 0xe5,0x00,
+ 0xe6,0x00,
+ 0xe7,0x00,
+ 0xe8,0x00,
+ 0xff,0xff,
+};
+
+ // Initiliztion
+ uint8_t sid130b_default_regs_init[] = {
+ 0x00,0x00,
+ 0x04,0x00,
+ 0x05,0x0F,
+ 0x06,0x0f,//86,
+ 0x07,0x88,//08,
+ 0x08,0xa2,
+ 0x09,0x11,
+ 0x0A,0x11,
+ 0x10,0x11,//17,
+ 0x11,0x01,
+ 0x12,0x8A,
+ 0x13,0x1a,//16,
+ 0x17,0xcb,//CF,
+ 0x18,0x38,//34,
+
+ 0x40,0x0f,
+ 0x41,0x17,
+ 0x42,0x52,
+ 0x43,0x80,
+ 0x44,0x00,
+ 0x45,0x00,
+
+ 0x00,0x00,
+ 0x20,0x00,
+ 0x21,0x02,
+ 0x23,0x51,//29,
+ 0x00,0x01,
+ 0x35,0x78,//50,
+ 0x00,0x00,
+ 0x24,0x02,
+ //0x25,0xe6,
+ 0x27,0x51,//29,
+ 0x00,0x01,
+ 0x34,0x78,//50,
+
+ 0x00,0x01,
+ 0x10,0x80,
+ 0x11,0x0c,//10,//0c,
+ 0x12,0x75,
+ 0x13,0x75,
+ 0x14,0x75,
+ 0x17,0xC4,
+ //0x1c,0x02,
+ //0x19,0x00,
+ //0x1A,0x00,
+ //0x1c,0x02,
+ 0x36,0x40,
+
+ 0x40,0x45,
+ 0x41,0x28,//20,
+ 0x42,0x20,
+ 0x43,0x00,
+ 0x44,0x00,
+ 0x45,0x01,
+ 0x46,0x03,
+ 0x47,0x05,
+ 0x48,0x0a,
+ 0x49,0x0e,
+ 0x4A,0x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,0x00,
+
+ 0x99,0x00,
+ 0xA0,0x00,
+ 0xA1,0x00,
+ 0xA2,0x00,
+ 0xA3,0x00,
+ 0xA4,0x00,
+ 0xA5,0x00,
+ 0xA6,0x00,
+ 0xA7,0x00,
+ 0xA8,0x00,
+ 0xA9,0x00,
+ 0xAA,0x00,
+ 0xAB,0x00,
+ 0xAC,0x00,
+ 0xAD,0x00,
+ 0xAE,0x00,
+ 0xAF,0x00,
+
+ 0xB0,0xf0,
+ 0xB1,0x00,
+ 0xB5,0x00,
+ 0xB8,0x00,
+ 0xB9,0x00,
+ 0xBa,0x00,
+ 0xBb,0x00,
+
+ 0xc0, 0x00,
+ 0xc1, 0x03,
+ 0xc2, 0x06,
+ 0xc3, 0x0d,
+ 0xc4, 0x1d,
+ 0xc5, 0x2e,
+ 0xc6, 0x3e,
+ 0xc7, 0x4f,
+ 0xc8, 0x60,
+ 0xc9, 0x70,
+ 0xca, 0x80,
+ 0xcb, 0xa0,
+ 0xcc, 0xc0,
+ 0xcd, 0xe0,
+ 0xce, 0xf0,
+ 0xcf, 0xff,
+
+ //0xe0,0x01,
+ //0xe1,0x03,
+ //0xe2,0x04,
+ //0xe3,0x0c,
+ //0xe4,0x11,
+ //0xe5,0x16,
+ //0xe6,0x1b,
+ //0xe7,0x24,
+ //0xe8,0x30,
+ 0x00,0x00,
+ 0x03,0xc5,
+ 0x00,0x01,
+ 0x10,0x80,
+ };
+
+// Exit
+uint8_t sid130b_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __SIV130B_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.c b/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.c
new file mode 100755
index 00000000..7a57ceeb
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.c
@@ -0,0 +1,332 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "siv120d.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, siv120d_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, siv120d_640_480_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = siv120d_wb_auto;
+ size = ARRAY_SIZE(siv120d_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = siv120d_wb_incandescent;
+ size = ARRAY_SIZE(siv120d_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = siv120d_wb_daylight;
+ size = ARRAY_SIZE(siv120d_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = siv120d_wb_cloudy;
+ size = ARRAY_SIZE(siv120d_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = siv120d_wb_fluorescent;
+ size = ARRAY_SIZE(siv120d_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = siv120d_scene_mode_auto;
+ size = ARRAY_SIZE(siv120d_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = siv120d_scene_mode_night;
+ size = ARRAY_SIZE(siv120d_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = siv120d_exposure_neg6;
+ size = ARRAY_SIZE(siv120d_exposure_neg6);
+ break;
+ case -1:
+ regs = siv120d_exposure_neg3;
+ size = ARRAY_SIZE(siv120d_exposure_neg3);
+ break;
+ case 0:
+ regs = siv120d_exposure_zero;
+ size = ARRAY_SIZE(siv120d_exposure_zero);
+ break;
+ case 1:
+ regs = siv120d_exposure_pos3;
+ size = ARRAY_SIZE(siv120d_exposure_pos3);
+ break;
+ case 2:
+ regs = siv120d_exposure_pos6;
+ size = ARRAY_SIZE(siv120d_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x00);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x00);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ sensor_write(sd, 0x00, 0x0);
+
+ data = sensor_read(sd, 0x01);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ int version;
+
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ version = sensor_read(sd, 0x02);
+ printk("version:0x%x\n",version);
+ sensor_write_array(sd, siv120d_default_regs_init_120d,
+ ARRAY_SIZE(siv120d_default_regs_init_120d));
+
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops siv120d_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev siv120d = {
+ .name = "siv120d",
+ .i2c_addr = 0x33,
+ .id = 0x12,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &siv120d_ops,
+};
+
+#if 0
+static int __init siv120d_init(void)
+{
+ return cmos_register_sudbdev(&siv120d);
+}
+
+static void __exit siv120d_exit(void)
+{
+ return cmos_unregister_subdev(&siv120d);
+}
+
+module_init(siv120d_init);
+module_exit(siv120d_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.h b/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.h
new file mode 100755
index 00000000..f95e06c0
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/siv120d/siv120d.h
@@ -0,0 +1,485 @@
+#ifndef SIV120D_H
+#define SIV120D_H
+
+
+// Scene Mode
+uint8_t siv120d_scene_mode_auto[] = {
+ 0x00,0x01,
+ 0x11,0x10,
+ 0x40,0x40,
+};
+
+uint8_t siv120d_scene_mode_night[] = {
+ 0x00,0x01,
+ 0x11,0x14,
+ 0x40,0x50,
+};
+
+
+// White Balance
+uint8_t siv120d_wb_auto [] = {
+ 0x00,0x02,
+ //0x60,0x96,
+ //0x61,0x90,
+ //0x62,0x60,
+ 0x10,0xd3,
+};
+
+uint8_t siv120d_wb_incandescent [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x60,0x98,
+ 0x61,0xC8,
+};
+
+uint8_t siv120d_wb_fluorescent [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x60,0xAA,
+ 0x61,0xBE,
+};
+
+uint8_t siv120d_wb_daylight [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x60,0xb0,
+ 0x61,0x74,
+};
+
+uint8_t siv120d_wb_cloudy [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x60,0xb4,
+ 0x61,0x64,
+};
+
+uint8_t siv120d_wb_tungsten [] = {
+ 0x00,0x02,
+ 0x10,0x00,
+ 0x60,0x90,
+ 0x61,0xC0,
+};
+
+
+// Exposure
+uint8_t siv120d_exposure_neg6[] = {
+ 0x00,0x03,
+ 0xAB,0xa8,
+};
+
+uint8_t siv120d_exposure_neg3[] = {
+ 0x00,0x03,
+ 0xAB,0x00,
+};
+
+uint8_t siv120d_exposure_zero[] = {
+ 0x00,0x03,
+ 0xAB,0x18,
+};
+
+uint8_t siv120d_exposure_pos3[] = {
+ 0x00,0x03,
+ 0xAB,0x28,
+};
+
+uint8_t siv120d_exposure_pos6[] = {
+ 0x00,0x03,
+ 0xAB,0x38,
+};
+
+// Color Effect
+uint8_t siv120d_colorfx_none[] = {
+ 0x00,0x03,
+ 0xB6,0x00,
+};
+
+uint8_t siv120d_colorfx_bw[] = {
+ 0x00,0x03,
+ 0xB6,0x40,
+};
+
+uint8_t siv120d_colorfx_sepia[] = {
+ 0x00,0x03,
+ 0xB6,0x80,
+ 0xB7,0x60,
+ 0xB8,0xA0,
+};
+
+uint8_t siv120d_colorfx_negative[] = {
+ 0x00,0x03,
+ 0xB6,0x20,
+
+};
+
+uint8_t siv120d_colorfx_emboss[] = {
+ 0x00,0x03,
+ 0xB6,0x08,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv120d_colorfx_sketch[] = {
+ 0x00,0x03,
+ 0xB6,0x04,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv120d_colorfx_sky_blue[] = {
+ 0x00,0x03,
+ 0xB6,0xa0,
+ 0xB7,0xc0,
+ 0xB8,0x50,
+};
+
+uint8_t siv120d_colorfx_grass_green[] = {
+ 0x00,0x03,
+ 0xB6,0x80,
+ 0xB7,0x50,
+ 0xB8,0x50,
+};
+
+uint8_t siv120d_colorfx_skin_whiten[] = {
+};
+
+// Resolution
+uint8_t siv120d_320_240_regs[]={
+
+
+0x00,0x00,
+0x06,0x06,
+0x12,0x3d,
+0x00,0x03,
+0xc0,0x10,
+0xc1,0x00,
+0xc2,0x40,
+0xc3,0x00,
+0xc4,0xf0,
+
+ };
+
+uint8_t siv120d_640_480_regs[]={
+0x00,0x00,
+0x06,0x04,
+0x12,0x3d,
+0x00,0x03,
+0xc0,0x24,
+0xc1,0x00,
+0xc2,0x80,
+0xc3,0x00,
+0xc4,0xe0,
+
+};
+
+uint8_t siv120d_default_regs_init_120d[]={
+
+ 0x00, 0x00,
+ 0x04, 0x00,
+ 0x05, 0x03, //VGA Output
+ 0x07, 0x70,
+ 0x10, 0x34,
+ 0x11, 0x27,
+ 0x12, 0x21,//33}},
+ 0x16, 0xc6,
+ 0x17, 0xaa,
+
+ // SIV120D 50Hz - 24MHz
+ 0x20,0x10,
+ 0x21,0xc3,
+ 0x23,0x4d,
+ 0x00,0x01,
+ 0x34,0x60,
+
+ // SIV120D 50Hz - Still Mode
+ 0x00,0x00,
+ 0x24,0x10,
+ 0x25,0xC3,
+ 0x27,0x4D,
+
+ // Vendor recommended value ##Don't change##
+ 0x00,0x00,
+ 0x40,0x00,
+ 0x41,0x00,
+ 0x42,0x00,
+ 0x43,0x00,
+
+ // AE
+ 0x00, 0x01,
+ 0x11, 0x14, // 6fps at lowlux
+ 0x12, 0x78,//79}},//7d}},//80}},//78}},// D65 target 0x74
+ 0x13, 0x78,//79}},//7d}},//80}},//78}},// CWF target 0x74
+ 0x14, 0x78,//79}},//7d}},//80}},//78}},// A target , 0x74
+ 0x1E, 0x08,// ini gain, 0x08
+ 0x34, 0x1f,//0x1A //STST
+ 0x40, 0x36,//48}},//0x50 //0x38 // Max x6
+ /*
+ 0x41, 0x20, //AG_TOP1 0x28
+ 0x42, 0x20, //AG_TOP0 0x28
+ 0x43, 0x00, //AG_MIN1 0x08
+ 0x44, 0x00, //AG_MIN0 0x08
+ 0x45, 0x00, //G50_dec 0x09
+ 0x46, 0x0a, //G33_dec 0x17
+ 0x47, 0x10, //G25_dec 0x1d
+ 0x48, 0x13, //G20_dec 0x21
+ 0x49, 0x15, //G12_dec 0x23
+ 0x4a, 0x18, //G09_dec 0x24
+ 0x4b, 0x1a, //G06_dec 0x26
+ 0x4c, 0x1d, //G03_dec 0x27
+ 0x4d, 0x20, //G100_inc 0x27
+ 0x4e, 0x10, //G50_inc 0x1a
+ 0x4f, 0x0a, //G33_inc 0x14
+ 0x50, 0x08, //G25_inc 0x11
+ 0x51, 0x06, //G20_inc 0x0f
+ 0x52, 0x05, //G12_inc 0x0d
+ 0x53, 0x04, //G09_inc 0x0c
+ 0x54, 0x02,// //G06_inc 0x0a
+ 0x55, 0x01,// //G03_inc 0x09
+ */
+ //AWB
+ 0x00, 0x02,
+ 0x10, 0x00,
+ 0x11, 0xc0,
+ 0x12, 0x80,
+ 0x13, 0x80,
+ 0x14, 0x80,
+ 0x15, 0xfe, // R gain Top
+ 0x16, 0x80, // R gain bottom
+ 0x17, 0xcb, // B gain Top
+ 0x18, 0x70, // B gain bottom 0x80
+ 0x19, 0x94, // Cr top value 0x90
+ 0x1a, 0x6c, // Cr bottom value 0x70
+ 0x1b, 0x94, // Cb top value 0x90
+ 0x1c, 0x6c, // Cb bottom value 0x70
+ 0x1d, 0x94, // 0xa0
+ 0x1e, 0x6c, // 0x60
+ 0x20, 0xe8, // AWB luminous top value
+ 0x21, 0x30, // AWB luminous bottom value 0x20
+ 0x22, 0xa4,
+ 0x23, 0x20,
+ 0x25, 0x20,
+ 0x26, 0x0f,
+ 0x27, 0x10, // 60 BRTSRT
+ 0x28, 0xcb,//cb}}, // b4 BRTRGNTOP result 0xb2
+ 0x29, 0xc8, // b0 BRTRGNBOT
+ 0x2a, 0xa0, // 92 BRTBGNTOP result 0x90
+ 0x2b, 0x98, // 8e BRTBGNBOT
+ 0x2c, 0x88, // RGAINCONT
+ 0x2d, 0x88, // BGAINCONT
+
+ 0x30, 0x00,
+ 0x31, 0x10,
+ 0x32, 0x00,
+ 0x33, 0x10,
+ 0x34, 0x02,
+ 0x35, 0x76,
+ 0x36, 0x01,
+ 0x37, 0xd6,
+ 0x40, 0x01,
+ 0x41, 0x04,
+ 0x42, 0x08,
+ 0x43, 0x10,
+ 0x44, 0x12,
+ 0x45, 0x35,
+ 0x46, 0x64,
+ 0x50, 0x33,
+ 0x51, 0x20,
+ 0x52, 0xe5,
+ 0x53, 0xfb,
+ 0x54, 0x13,
+ 0x55, 0x26,
+ 0x56, 0x07,
+ 0x57, 0xf5,
+ 0x58, 0xea,
+ 0x59, 0x21,
+
+ 0x62, 0x88, // G gain
+
+ 0x63, 0xb3, // R D30 to D20
+ 0x64, 0xb8,
+ 0x65, 0xb3, // R D20 to D30
+ 0x66, 0xb8,
+
+ 0x67, 0xdd, // R D65 to D30
+ 0x68, 0xa0, // B D65 to D30
+ 0x69, 0xdd, // R D30 to D65
+ 0x6a, 0xa0, // B D30 to D65
+
+ //IDP
+ 0x00,0x03,
+ 0x10,0xFF, // IDP function enable
+ 0x11,0x1D, // PCLK polarity
+ 0x12,0x7d, // Y,Cb,Cr order sequence
+ 0x14,0x04, // don't change
+ 0x8c,0x10, //CMA select
+
+
+ // DPCNR
+ 0x17, 0x28, // DPCNRCTRL
+ 0x18, 0x04, // DPTHR
+ 0x19, 0x50, // C DP Number {{ Normal [7:6] Dark [5:4] }} | [3:0] DPTHRMIN
+ 0x1A, 0x50, // G DP Number {{ Normal [7:6] Dark [5:4] }} | [3:0] DPTHRMAX
+ 0x1B, 0x12, // DPTHRSLP{{ [7:4] @ Normal | [3:0] @ Dark }}
+ 0x1C, 0x00, // NRTHR
+ 0x1D, 0x0f,//08}}, // [5:0] NRTHRMIN 0x48
+ 0x1E, 0x0f,//08}}, // [5:0] NRTHRMAX 0x48
+ 0x1F, 0x3f,//28}}, // NRTHRSLP{{ [7:4] @ Normal | [3:0] @ Dark }}, 0x2f
+ 0x20, 0x04, // IllumiInfo STRTNOR
+ 0x21, 0x0f, // IllumiInfo STRTDRK
+
+ // Gamma
+ //0x30, 0x00 , //0x0
+ 0x31, 0x03 ,//0x080x31, 0x04 },//0x08 0x03
+ 0x32, 0x0b ,//0x100x32, 0x0b },//0x10 0x08
+ 0x33, 0x1e,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34, 0x46,//0x370x34, 0x49 },//0x37 0x36
+ 0x35, 0x62,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36, 0x78,//0x600x36, 0x7C },//0x60 0x77
+ 0x37, 0x8b,//0x720x37, 0x8D },//0x72 0x88
+ 0x38, 0x9B,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39, 0xA8,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a, 0xb6,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b, 0xcc,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c, 0xdf,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d, 0xf0,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Sha0x3f, 0xFFding Register Setting }},
+ 0x40, 0x0a,
+ 0x41, 0xdc,
+ 0x42, 0x77,
+ 0x43, 0x66,
+ 0x44, 0x55,
+ 0x45, 0x44,
+ 0x46, 0x11, // left R gain[7:4], right R gain[3:0]
+ 0x47, 0x11, // top R gain[7:4], bottom R gain[3:0]
+ 0x48, 0x10, // left Gr gain[7:4], right Gr gain[3:0] 0x21
+ 0x49, 0x00, // top Gr gain[7:4], bottom Gr gain[3:0]
+ 0x4a, 0x00, // left Gb gain[7:4], right Gb gain[3:0] 0x02
+ 0x4b, 0x00, // top Gb gain[7:4], bottom Gb gain[3:0]
+ 0x4c, 0x00, // left B gain[7:4], right B gain[3:0]
+ 0x4d, 0x11, // top B gain[7:4], bottom B gain[3:0]
+ 0x4e, 0x04, // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4f, 0x98, // X-axis center low[7:0] 0x50
+ 0x50, 0xd8, // Y-axis center low[7:0] 0xf6
+ 0x51, 0x80, // Shading Center Gain
+ 0x52, 0x00, // Shading R Offset
+ 0x53, 0x00, // Shading Gr Offset
+ 0x54, 0x00, // Shading Gb Offset
+ 0x55, 0x00, // Shading B Offset
+
+ // Interpolation
+ 0x60, 0x57, //INT outdoor condition
+ 0x61, 0x57, //INT normal condition
+
+ 0x62, 0x77, //ASLPCTRL 7:4 GE, 3:0 YE
+ 0x63, 0x38, //YDTECTRL {{YE}} [7] fixed,
+ 0x64, 0x38, //GPEVCTRL {{GE}} [7] fixed,
+
+ 0x66, 0x0c, //SATHRMIN
+ 0x67, 0xff,
+ 0x68, 0x04, //SATHRSRT
+ 0x69, 0x08, //SATHRSLP
+
+ 0x6a, 0xaf, //PTDFATHR [7] fixed, [5:0] value
+ 0x6b, 0x58, //PTDLOTHR [6] fixed, [5:0] value
+ 0x6d, 0x88, //PTDLOTHR [6] fixed, [5:0] value
+
+ 0x8f, 0x00, //Cb/Cr coring
+
+ // Color matrix {{D65}} - Daylight
+
+
+ 0x71, 0x42,
+ 0x72, 0xbf,
+ 0x73, 0x00,
+ 0x74, 0x0f,
+ 0x75, 0x31,
+ 0x76, 0x00,
+ 0x77, 0x00,
+ 0x78, 0xbc,
+ 0x79, 0x44,
+
+ // Color matrix (D30) - CWF
+ 0x7a, 0x3a,
+ 0x7b, 0xcd,
+ 0x7c, 0xfa,
+ 0x7d, 0x12,
+ 0x7e, 0x2c,
+ 0x7f, 0x02,
+ 0x80, 0xf7,
+ 0x81, 0xc7,
+ 0x82, 0x42,
+
+ // Color matrix (D20) - A
+ 0x83, 0x3a,
+ 0x84, 0xcd,
+ 0x85, 0xfa,
+ 0x86, 0x12,
+ 0x87, 0x2c,
+ 0x88, 0x02,
+ 0x89, 0xf7,
+ 0x8a, 0xc7,
+ 0x8b, 0x42,
+
+ 0x8c, 0x10,
+ 0x8d, 0x04,
+ 0x8e, 0x02,
+ 0x8f, 0x00,
+
+ 0x90, 0x10,
+ 0x91, 0x10,
+ 0x92, 0x02,
+
+ 0x96, 0x02,
+
+ 0x9f, 0x0c,
+ 0xa0, 0x0c,
+ 0xa1, 0x22,
+
+ 0xa9, 0x12,
+ 0xaa, 0x12,
+ 0xab, 0x90,
+ 0xae, 0x40,
+ 0xaf, 0x86,
+ 0xb9, 0x10,
+ 0xba, 0x20,
+
+ // inverse color space conversion
+ 0xcc, 0x40,
+ 0xcd, 0x00,
+ 0xce, 0x58,
+ 0xcf, 0x40,
+ 0xd0, 0xea,
+ 0xd1, 0xd3,
+ 0xd2, 0x40,
+ 0xd3, 0x6f,
+ 0xd4, 0x00,
+
+ // ee/nr
+ 0xd9, 0x0b,
+ 0xda, 0x1f,
+ 0xdb, 0x05,
+ 0xdc, 0x08,
+ 0xdd, 0x3C,
+ 0xde, 0xF9, //NOIZCTRL
+
+ //window
+ 0xc0, 0x24,
+ 0xC1, 0x00,
+ 0xC2, 0x80,
+ 0xC3, 0x00,
+ 0xC4, 0xE0,
+ // memory speed
+ 0xe5, 0x15,
+ 0xe6, 0x20,
+ 0xe7, 0x04,
+
+ 0x00, 0x02,
+ 0x10, 0xd3,
+
+ //Sensor On
+ 0x00, 0x00,
+ 0x03, 0x05,
+
+};
+
+#endif
\ No newline at end of file
diff --git a/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d-kyt-093-du.h b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d-kyt-093-du.h
new file mode 100755
index 00000000..2d83463c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d-kyt-093-du.h
@@ -0,0 +1,1128 @@
+#ifndef SIV121D_H
+#define SIV121D_H
+
+
+// Scene Mode
+uint8_t siv121d_scene_mode_auto[] = {
+ 0x00,0x02,
+ 0x11,0x10,
+ 0x40,0x40,
+};
+
+uint8_t siv121d_scene_mode_night[] = {
+ 0x00,0x02,
+ 0x11,0x18,
+ 0x40,0x60,
+};
+
+
+// White Balance
+uint8_t siv121d_wb_auto [] = {
+ 0x00,0x03,
+ 0x10,0xd0,
+ //0x60,0xC5,
+ //0x61,0x95,
+};
+
+uint8_t siv121d_wb_incandescent [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0x80,
+ 0x61,0xE0,
+};
+
+uint8_t siv121d_wb_fluorescent [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xB8,
+ 0x61,0xCC,
+};
+
+uint8_t siv121d_wb_daylight [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xD8,
+ 0x61,0x90,
+};
+
+uint8_t siv121d_wb_cloudy [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xB4,
+ 0x61,0x90,
+};
+
+uint8_t siv121d_wb_tungsten [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0x7B,
+ 0x61,0xa0,
+};
+
+
+// Exposure
+uint8_t siv121d_exposure_neg6[] = {
+ 0x00,0x04,
+ 0xAB,0xa8,
+};
+
+uint8_t siv121d_exposure_neg3[] = {
+ 0x00,0x04,
+ 0xAB,0x90,
+};
+
+uint8_t siv121d_exposure_zero[] = {
+ 0x00,0x04,
+ 0xAB,0x00,
+};
+
+uint8_t siv121d_exposure_pos3[] = {
+ 0x00,0x04,
+ 0xAB,0x18,
+};
+
+uint8_t siv121d_exposure_pos6[] = {
+ 0x00,0x04,
+ 0xAB,0x30,
+};
+
+// Color Effect
+uint8_t siv121d_colorfx_none[] = {
+ 0x00,0x04,
+ 0xB6,0x00,
+};
+
+uint8_t siv121d_colorfx_bw[] = {
+ 0x00,0x04,
+ 0xB6,0x40,
+};
+
+uint8_t siv121d_colorfx_sepia[] = {
+ 0x00,0x04,
+ 0xB6,0x80,
+ 0xB7,0x60,
+ 0xB8,0xA0,
+};
+
+uint8_t siv121d_colorfx_negative[] = {
+ 0x00,0x04,
+ 0xB6,0x20,
+
+};
+
+uint8_t siv121d_colorfx_emboss[] = {
+ 0x00,0x04,
+ 0xB6,0x08,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv121d_colorfx_sketch[] = {
+ 0x00,0x04,
+ 0xB6,0x04,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv121d_colorfx_sky_blue[] = {
+ 0x00,0x04,
+ 0xB6,0xa0,
+ 0xB7,0xc0,
+ 0xB8,0x50,
+};
+
+uint8_t siv121d_colorfx_grass_green[] = {
+ 0x00,0x04,
+ 0xB6,0x80,
+ 0xB7,0x50,
+ 0xB8,0x50,
+};
+
+uint8_t siv121d_colorfx_skin_whiten[] = {
+};
+
+uint8_t sensor_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sensor_brightness_neg4[] = {
+ 0x00,0x04,
+ 0xAB,0xC0,
+};
+
+uint8_t sensor_brightness_neg3[] = {
+ 0x00,0x04,
+ 0xAB,0xB0,
+};
+
+uint8_t sensor_brightness_neg2[] = {
+ 0x00,0x04,
+ 0xAB,0xA0,
+};
+
+uint8_t sensor_brightness_neg1[] = {
+ 0x00,0x04,
+ 0xAB,0x90,
+};
+
+uint8_t sensor_brightness_zero[] = {
+ 0x00,0x04,
+ 0xAB,0x00,
+};
+
+uint8_t sensor_brightness_pos1[] = {
+ 0x00,0x04,
+ 0xAB,0x10,
+};
+
+uint8_t sensor_brightness_pos2[] = {
+ 0x00,0x04,
+ 0xAB,0x20,
+};
+
+uint8_t sensor_brightness_pos3[] = {
+ 0x00,0x04,
+ 0xAB,0x30,
+};
+
+uint8_t sensor_brightness_pos4[] = {
+ 0x00,0x04,
+ 0xAB,0x40,
+};
+
+
+// Contrast
+uint8_t sensor_contrast_neg4[] = {
+ 0x00,0x04,
+ 0xA8,0x0D,
+
+};
+
+uint8_t sensor_contrast_neg3[] = {
+ 0x00,0x04,
+ 0xA8,0x0E,
+};
+
+uint8_t sensor_contrast_neg2[] = {
+ 0x00,0x04,
+ 0xA8,0x0F,
+};
+
+uint8_t sensor_contrast_neg1[] = {
+ 0x00,0x04,
+ 0xA8,0x10,
+};
+
+uint8_t sensor_contrast_zero[] = {
+ 0x00,0x04,
+ 0xA8,0x10,
+};
+
+uint8_t sensor_contrast_pos1[] = {
+ 0x00,0x04,
+ 0xA8,0x12,
+};
+
+uint8_t sensor_contrast_pos2[] = {
+ 0x00,0x04,
+ 0xA8,0x13,
+};
+
+uint8_t sensor_contrast_pos3[] = {
+ 0x00,0x04,
+ 0xA8,0x14,
+};
+
+uint8_t sensor_contrast_pos4[] = {
+ 0x00,0x04,
+ 0xA8,0x15,
+};
+
+// Saturation
+uint8_t sensor_saturation_neg4[] = {
+};
+
+uint8_t sensor_saturation_neg3[] = {
+};
+
+uint8_t sensor_saturation_neg2[] = {
+};
+
+uint8_t sensor_saturation_neg1[] = {
+};
+
+uint8_t sensor_saturation_zero[] = {
+};
+
+uint8_t sensor_saturation_pos1[] = {
+};
+
+uint8_t sensor_saturation_pos2[] = {
+};
+
+uint8_t sensor_saturation_pos3[] = {
+};
+
+uint8_t sensor_saturation_pos4[] = {
+};
+
+
+// Resolution
+uint8_t siv121d_320_240_regs[]={
+ 0x00,0x01,
+ 0x06,0x06,
+ 0x00,0x04,
+ 0xc0,0x10,
+ 0xc1,0x00,
+ 0xc2,0x40,
+ 0xc3,0x00,
+ 0xc4,0xf0,
+};
+
+uint8_t siv121d_640_480_regs[]={
+ 0x00,0x01,
+ 0x06,0x04,
+ 0x00,0x04,
+ 0xc0,0x24,
+ 0xc1,0x00,
+ 0xc2,0x80,
+ 0xc3,0x00,
+ 0xc4,0xe0,
+};
+
+uint8_t siv121d_default_regs_init_121d[]={
+#if 1
+ 0x00 ,0x00 ,
+ 0x00 ,0x01 ,
+ 0x03 ,0x0a ,
+
+ 0x00 ,0x01 ,
+ 0x03 ,0x0a ,
+
+ 0x00 ,0x00 ,
+ 0x03 ,0x04 ,
+ 0x10 ,0x85 , //85
+ 0x11 ,0x74 , //0x11 0x61 davis20120514
+
+ 0x00 ,0x01 ,
+ 0x04 ,0x00 , //00
+ 0x06 ,0x04 ,
+ 0x10 ,0x46 ,
+ 0x11 ,0x23 ,
+ 0x12 ,0x21 ,
+ 0x17 ,0x86 ,
+ 0x18 ,0x00 ,
+ 0x20 ,0x00 ,
+ 0x21 ,0x05 ,
+ 0x22 ,0x01 ,
+ 0x23 ,0x69 , //add
+ 0x40 ,0x0F ,
+ 0x41 ,0x90 ,
+ 0x42 ,0xd2 ,
+ 0x43 ,0x00 ,
+
+ // AE
+ 0x00 ,0x02 ,
+ 0x10 ,0x80 ,
+ 0x11 ,0x10 ,
+ 0x12 ,0x65 , // D65 target 60
+ 0x14 ,0x62 , // A target 5
+ 0x34 ,0x96 ,
+ 0x40 ,0x40 , // 40
+ 0x5f ,0x01 ,
+ 0x41 ,0x28 ,//20 ,
+ 0x42 ,0x28 ,//20 ,
+ 0x44 ,0x08 ,//00 ,
+ 0x45 ,0x08 ,//00 ,
+ 0x46 ,0x15 ,//0a ,
+ 0x47 ,0x1c ,//10 ,
+ 0x48 ,0x20 ,//13 ,
+ 0x49 ,0x21 ,//15 ,
+ 0x4a ,0x23 ,//18 ,
+ 0x4b ,0x24 ,//1a ,
+ 0x4c ,0x25 ,//1d ,
+ 0x4d ,0x28 ,//20 ,
+ 0x4e ,0x1c ,//10 ,
+ 0x4f ,0x15 ,//0a ,
+
+ 0x50 ,0x10 ,//08 ,
+ 0x51 ,0x10 ,//06 ,
+ 0x52 ,0x0e ,//05 ,
+ 0x53 ,0x0c ,//04 ,
+ 0x54 ,0x0b ,//02 ,
+ 0x55 ,0x0a ,//01 ,
+ 0x90 ,0x80 ,
+ 0x91 ,0x80 ,
+
+ // AWB
+ 0x00 ,0x03 ,
+ 0x10 ,0xd0 , //
+ 0x11 ,0xc0 ,//c0
+ 0x13 ,0x81 , //Cr target
+ 0x14 ,0x7d , //Cb target 7d
+ 0x15 ,0xc0 , // R gain Top e0
+ 0x16 ,0x8c , // R gain bottom 8c //
+ 0x17 ,0xe0 , // B gain Top e0
+ 0x18 ,0x70 , // B gain bottom 0x80 //
+ 0x19 ,0x8c , // Cr top value 8c //
+ 0x1a ,0x64 , // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b ,0x98 , // Cb top value 0x98
+ 0x1c ,0x6c , // Cb bottom value 0x6c // 0x01
+ 0x1d ,0x94 , // 0xa0
+ 0x1e ,0x6c , // 0x60
+ 0x20 ,0xe8 , // AWB luminous top value
+ 0x21 ,0x30 , // AWB luminous bottom value 0x20
+ 0x22 ,0xb8 ,
+ 0x23 ,0x10 ,
+ 0x25 ,0x20 ,
+ 0x26 ,0x0f ,
+ 0x27 ,0x08 , // BRTSRT
+ 0x28 ,0x0f , // BRTEND
+ 0x29 ,0xba , // BRTRGNBOT
+ 0x2a ,0xa0 , // BRTBGNTOP
+
+ 0x40 ,0x01 ,
+ 0x41 ,0x04 ,
+ 0x42 ,0x08 ,
+ 0x43 ,0x10 ,
+ 0x44 ,0x12 , // 0x12
+ 0x45 ,0x35 , //35
+ 0x46 ,0xfc , // fc
+ 0x62 ,0x84 , //84 //
+ 0x63 ,0x90 , // R D30 to D20
+ 0x64 ,0xd0 , // B D30 to D20
+ 0x65 ,0x90 , // R D20 to D30
+ 0x66 ,0xd0 , // B D20 to D30
+
+ // IDP
+ 0x00 ,0x04 ,
+ 0x10 ,0xff ,
+ // 0x11 ,0x1d ,
+ 0x11 ,0x1d , //zhongwei changed
+ 0x12 ,0x3d ,//zhongwei++
+
+
+ // DPCBNR
+ 0x18 ,0xbe ,//fe , // DPCNRCTRL
+ 0x19 ,0x00 ,//04 , // DPCTHV
+ 0x1A ,0x00 ,//01 , // DPCTHVSLP
+ 0x1B ,0x00 ,//08 , // DPCTHVDIFSRT
+ 0x1C ,0x0f ,//08 , // DPCTHVDIFSLP
+ 0x1d ,0xFF , // DPCTHVMAX
+
+ 0x1E ,0x04 , // BNRTHV 0c
+ 0x1F ,0x04 , // BNRTHVSLPN 10
+ 0x20 ,0x10 , // BNRTHVSLPD
+ 0x21 ,0x00 , /// BNRNEICNT / 0x08
+ 0x22 ,0x10 , // STRTNOR // 0x03
+ 0x23 ,0x40 , // STRTDRK
+
+ // Gamma
+ 0x31 ,0x08 ,//0x080x31, 0x04 },//0x08 0x03
+ 0x32 ,0x12 ,//0x100x32, 0x0b },//0x10 0x08
+ 0x33 ,0x24 ,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34 ,0x47 ,//0x370x34, 0x49 },//0x37 0x36
+ 0x35 ,0x64 ,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36 ,0x7c ,//0x600x36, 0x7C },//0x60 0x77
+ 0x37 ,0x8f ,//0x720x37, 0x8D },//0x72 0x88
+ 0x38 ,0x9f ,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39 ,0xad ,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a ,0xba ,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b ,0xcf ,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c ,0xe2 ,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d ,0xf0 ,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40 ,0x04 , //06
+ 0x41 ,0x44 ,
+ 0x42 ,0x43 ,
+ 0x43 ,0x20 ,
+ 0x44 ,0x11 , // left R gain[7:4], right R gain[3:0] 22
+ 0x45 ,0x11 , // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46 ,0x00 , // left G gain[7:4], right G gain[3:0]
+ 0x47 ,0x00 , // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48 ,0x00 , // left B gain[7:4], right B gain[3:0]
+ 0x49 ,0x00 , // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a ,0x04 , // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b ,0x60 , // X-axis center low[7:0] 48
+ 0x4c ,0xe0 , // Y-axis center low[7:0] e8
+ 0x4d ,0x88 , // Shading Center Gain 80
+ 0x4e ,0x00 , // Shading R Offset
+ 0x4f ,0x00 , // Shading Gr Offset
+ 0x50 ,0x00 , // Shading B Offset
+
+
+ // Interpolation
+ 0x60 ,0x7f ,
+ 0x61 ,0x08 ,
+
+ // Color matrix (D65) - Daylight
+ 0x71 ,0x34 , //0x34 0x39
+ 0x72 ,0xCe , //0xCe 0xCc
+ 0x73 ,0xFe , //0xFe 0xFb
+ 0x74 ,0x13 , //0x13 0x10
+ 0x75 ,0x25 , //0x25 0x21
+ 0x76 ,0x08 , //0x08 0x0f
+ 0x77 ,0xec , //0xec 0xf8
+ 0x78 ,0xd1 , //0xd1 0xc0
+ 0x79 ,0x47 , //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83 ,0x38 , //0x3c
+ 0x84 ,0xd1 , //0xc6
+ 0x85 ,0xf7 , //0xff
+ 0x86 ,0x12 , //0x12
+ 0x87 ,0x25 , //0x24
+ 0x88 ,0x09 , //0x0a
+ 0x89 ,0xe1 , //0xed
+ 0x8a ,0xc7 , //0xc2
+ 0x8b ,0x58 , //0x51
+
+ 0x8c ,0x10 , //CMA select
+
+ //G Edge
+ 0x90 ,0x20 , //Upper gain
+ 0x91 ,0x40 , //down gain
+ 0x92 ,0x44 , //[7:4] upper coring [3:0] down coring
+ 0x9a ,0x40 ,
+ 0x9b ,0x40 ,
+ 0x9c ,0x38 , //edge suppress start 30
+ 0x9d ,0x30 , //edge suppress slope
+ 0xa8 ,0x10 ,
+ 0xa9 ,0x13 ,
+ 0xaa ,0x13 ,
+ 0xb9 ,0x30 , // nightmode 38 at gain 0x48 5fps
+ 0xba ,0x44 , // nightmode 80 at gain 0x48 5fps
+ 0xde ,0x80 ,
+
+ 0xe5 ,0x15 ,
+ 0xe6 ,0x02 ,
+ 0xe7 ,0x04 ,
+
+ //Sensor On //Sensor On
+ 0x00 ,0x01 ,
+ 0x03 ,0x01 ,
+ 0x00 ,0x00 ,
+#else
+ 0x00,0x00,
+ 0x03,0x04,
+ 0x10,0x86,//8d}}, //85
+ 0x11,0x74,// f1}}, //0x11 0x61 davis20120514
+
+ 0x00,0x01,
+ 0x04,0x00, //00
+ 0x06,0x04,
+ 0x10,0x11,//46}},
+ 0x11,0x25,//23}},
+ 0x12,0x21,
+ 0x17,0x94,//86}},
+ 0x18,0x00,
+ 0x20,0x00,
+ 0x21,0x05,
+ 0x22,0x01,
+ 0x23,0x69, //add
+ 0x40,0x0F,
+ 0x41,0x90,
+ 0x42,0xd2,
+ 0x43,0x00,
+
+ // AE
+ 0x00,0x02,
+ 0x10,0x84,
+ 0x11,0x14,//0c}},//10}},
+ 0x12,0x68,//71,//70}}, // D65 target 60
+ 0x14,0x40,//68, // A target 5d
+ 0x34,0x96,
+ 0x40,0x38,//48}},//40}}, // 40
+ 0x44,0x08,//00}},
+
+
+ // AWB
+ 0x00,0x03,
+ 0x10,0xD0,//c3}}, //
+ 0x11,0xc1,//c0}},//c0
+ 0x12,0x80,
+ 0x13,0x80, //Cr target 0x7e
+ 0x14,0x80, //Cb target 7f
+ 0x15,0xe0,//c0}}, // R gain Top e0
+ 0x16,0x7C,//88}},//8c}}, // R gain bottom 8c //
+ 0x17,0xe0, // B gain Top e0
+ 0x18,0x80,//70}}, // B gain bottom 0x80 //
+ 0x19,0x8C,//90}}, // Cr top value 8c //
+ 0x1a,0x64, // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b,0x94, // Cb top value 0x98
+ 0x1c,0x6c, // Cb bottom value 0x6c // 0x01
+ 0x1d,0x94, // 0xa0
+ 0x1e,0x6c, // 0x60
+ 0x20,0xe8, // AWB luminous top value
+ 0x21,0x30, // AWB luminous bottom value 0x20
+ 0x22,0xb8,
+ 0x23,0x10,
+ 0x25,0x08,//20}},
+ 0x26,0x0f,//0f}},
+ 0x27,0x60, // BRTSRT
+ 0x28,0x70, // BRTEND
+ 0x29,0xb7, // BRTRGNBOT
+ 0x2a,0xa3, // BRTBGNTOP
+
+ 0x40,0x01,
+ 0x41,0x03,//04}},
+ 0x42,0x08,
+ 0x43,0x10,
+ 0x44,0x13,//12}}, // 0x12
+ 0x45,0x6a,//35}}, //35
+ 0x46,0xca, // fc
+
+ 0x62,0x80,//84}}, //84 //
+
+ 0x63,0x90,//9c}}, // R D30 to D20
+ 0x64,0xD0,//d4}}, // B D30 to D20
+ 0x65,0x98,//a0}},//90}}, // R D20 to D30
+ 0x66,0xd0, // B D20 to D30
+
+ // IDP
+ 0x00,0x04,
+ 0x10,0x7f,//f,
+
+ 0x11,0x1d, // changed
+ 0x12,0x3d,//++
+ 0x13,0xfe,//++
+ 0x14,0x01,//++
+
+
+ // DPCBNR
+ 0x18,0xbf,//fe, // DPCNRCTRL
+ 0x19,0x00,//04, // DPCTHV
+ 0x1A,0x00,//01, // DPCTHVSLP
+ 0x1B,0x00,//08,//08}}, // DPCTHVDIFSRT
+
+
+
+ 0x1E,0x04, // BNRTHV 0c
+ 0x1F,0x08,//04}}, // BNRTHVSLPN 10
+ 0x20,0x20, // BNRTHVSLPD
+ 0x21,0x00, /// BNRNEICNT / 0x08
+ 0x22,0x08, // STRTNOR // 0x03
+ 0x23,0x38,//40}}, // STRTDRK
+ 0x24,0x00,
+
+ // Gamma
+
+ 0x31, 0x11,//03,//0x080x31, 0x04 },//0x08 0x03
+ 0x32, 0x21,//0b,//0x100x32, 0x0b },//0x10 0x08
+ 0x33, 0x37,//1e,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34, 0x54,//46,//0x370x34, 0x49 },//0x37 0x36
+ 0x35, 0x6e,//62,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36, 0x84,//0x600x36, 0x7C },//0x60 0x77
+ 0x37, 0x96,//0x720x37, 0x8D },//0x72 0x88
+ 0x38, 0xa7,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39, 0xb7,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a, 0xc4,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b, 0xd9,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c, 0xea,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d, 0xf9,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40,0x55,//04}}, //06
+ 0x41,0x44,
+ 0x42,0x33,//43}},
+ 0x43,0x00,
+ 0x44,0x22, // left R gain[7:4], right R gain[3:0] 22
+ 0x45,0x22, // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46,0x00, // left G gain[7:4], right G gain[3:0]
+ 0x47,0x03, // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48,0x01, // left B gain[7:4], right B gain[3:0]
+ 0x49,0x11, // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a,0x05, // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b,0x40, // X-axis center low[7:0] 48
+ 0x4c,0x10, // Y-axis center low[7:0] e8
+ 0x4d,0x80, // Shading Center Gain 80
+ 0x4e,0x00, // Shading R Offset
+ 0x4f,0x00, // Shading Gr Offset
+ 0x50,0x00, // Shading B Offset
+
+
+ // Interpolation
+ 0x60,0x7f,
+ 0x61,0x08,
+
+ // Color matrix (D65) - Daylight
+
+
+ 0x71,0x39, //0x34 0x39
+ 0x72,0xC8, //0xCe 0xCc
+ 0x73,0xff, //0xFe 0xFb
+ 0x74,0x13, //0x13 0x10
+ 0x75,0x25, //0x25 0x21
+ 0x76,0x08, //0x08 0x0f
+ 0x77,0xf8, //0xec 0xf8
+ 0x78,0xc0, //0xd1 0xc0
+ 0x79,0x48, //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83,0x34, //0x3c
+ 0x84,0xd4, //0xc6
+ 0x85,0xf8, //0xff
+ 0x86,0x12, //0x12
+ 0x87,0x25, //0x24
+ 0x88,0x09, //0x0a
+ 0x89,0xf0, //0xed
+ 0x8a,0xbe, //0xc2
+ 0x8b,0x54, //0x51
+
+
+ 0x8c,0x10, //CMA select
+
+ //G Edge
+ 0x90,0x30, //Upper gain
+ 0x91,0x40, //down gain
+ 0x92,0x33,//22}}, //[7:4] upper coring [3:0] down coring
+ 0x9a,0x40,
+ 0x9b,0x40,
+ 0x9c,0x38, //edge suppress start 30
+ 0x9d,0x30, //edge suppress slope
+
+ 0x9f,0x26,
+ 0xa0,0x11,
+
+ 0xa8,0x11,//10}},
+ 0xa9,0x11,//10}},
+ 0xaa,0x11,
+
+ 0xbf,0x20,
+
+ 0xb9,0x28,//30}}, // nightmode 38 at gain 0x48 5fps
+ 0xba,0x41,//44}}, // nightmode 80 at gain 0x48 5fps
+ 0xde,0x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 ,
+ 0x51 ,0x10 ,//06 ,
+ 0x52 ,0x0e ,//05 ,
+ 0x53 ,0x0c ,//04 ,
+ 0x54 ,0x0b ,//02 ,
+ 0x55 ,0x0a ,//01 ,
+ 0x90 ,0x80 ,
+ 0x91 ,0x80 ,
+
+ // AWB
+ 0x00 ,0x03 ,
+ 0x10 ,0xd0 , //
+ 0x11 ,0xc0 ,//c0
+ 0x13 ,0x81 , //Cr target
+ 0x14 ,0x7d , //Cb target 7d
+ 0x15 ,0xc0 , // R gain Top e0
+ 0x16 ,0x8c , // R gain bottom 8c //
+ 0x17 ,0xe0 , // B gain Top e0
+ 0x18 ,0x70 , // B gain bottom 0x80 //
+ 0x19 ,0x8c , // Cr top value 8c //
+ 0x1a ,0x64 , // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b ,0x98 , // Cb top value 0x98
+ 0x1c ,0x6c , // Cb bottom value 0x6c // 0x01
+ 0x1d ,0x94 , // 0xa0
+ 0x1e ,0x6c , // 0x60
+ 0x20 ,0xe8 , // AWB luminous top value
+ 0x21 ,0x30 , // AWB luminous bottom value 0x20
+ 0x22 ,0xb8 ,
+ 0x23 ,0x10 ,
+ 0x25 ,0x20 ,
+ 0x26 ,0x0f ,
+ 0x27 ,0x08 , // BRTSRT
+ 0x28 ,0x0f , // BRTEND
+ 0x29 ,0xba , // BRTRGNBOT
+ 0x2a ,0xa0 , // BRTBGNTOP
+
+ 0x40 ,0x01 ,
+ 0x41 ,0x04 ,
+ 0x42 ,0x08 ,
+ 0x43 ,0x10 ,
+ 0x44 ,0x12 , // 0x12
+ 0x45 ,0x35 , //35
+ 0x46 ,0xfc , // fc
+ 0x62 ,0x84 , //84 //
+ 0x63 ,0x90 , // R D30 to D20
+ 0x64 ,0xd0 , // B D30 to D20
+ 0x65 ,0x90 , // R D20 to D30
+ 0x66 ,0xd0 , // B D20 to D30
+
+ // IDP
+ 0x00 ,0x04 ,
+ 0x10 ,0xff ,
+ // 0x11 ,0x1d ,
+ 0x11 ,0x1d , //zhongwei changed
+ 0x12 ,0x3d ,//zhongwei++
+
+
+ // DPCBNR
+ 0x18 ,0xbe ,//fe , // DPCNRCTRL
+ 0x19 ,0x00 ,//04 , // DPCTHV
+ 0x1A ,0x00 ,//01 , // DPCTHVSLP
+ 0x1B ,0x00 ,//08 , // DPCTHVDIFSRT
+ 0x1C ,0x0f ,//08 , // DPCTHVDIFSLP
+ 0x1d ,0xFF , // DPCTHVMAX
+
+ 0x1E ,0x04 , // BNRTHV 0c
+ 0x1F ,0x04 , // BNRTHVSLPN 10
+ 0x20 ,0x10 , // BNRTHVSLPD
+ 0x21 ,0x00 , /// BNRNEICNT / 0x08
+ 0x22 ,0x10 , // STRTNOR // 0x03
+ 0x23 ,0x40 , // STRTDRK
+
+ // Gamma
+ 0x31 ,0x08 ,//0x080x31, 0x04 },//0x08 0x03
+ 0x32 ,0x12 ,//0x100x32, 0x0b },//0x10 0x08
+ 0x33 ,0x24 ,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34 ,0x47 ,//0x370x34, 0x49 },//0x37 0x36
+ 0x35 ,0x64 ,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36 ,0x7c ,//0x600x36, 0x7C },//0x60 0x77
+ 0x37 ,0x8f ,//0x720x37, 0x8D },//0x72 0x88
+ 0x38 ,0x9f ,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39 ,0xad ,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a ,0xba ,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b ,0xcf ,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c ,0xe2 ,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d ,0xf0 ,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40 ,0x04 , //06
+ 0x41 ,0x44 ,
+ 0x42 ,0x43 ,
+ 0x43 ,0x20 ,
+ 0x44 ,0x11 , // left R gain[7:4], right R gain[3:0] 22
+ 0x45 ,0x11 , // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46 ,0x00 , // left G gain[7:4], right G gain[3:0]
+ 0x47 ,0x00 , // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48 ,0x00 , // left B gain[7:4], right B gain[3:0]
+ 0x49 ,0x00 , // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a ,0x04 , // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b ,0x60 , // X-axis center low[7:0] 48
+ 0x4c ,0xe0 , // Y-axis center low[7:0] e8
+ 0x4d ,0x88 , // Shading Center Gain 80
+ 0x4e ,0x00 , // Shading R Offset
+ 0x4f ,0x00 , // Shading Gr Offset
+ 0x50 ,0x00 , // Shading B Offset
+
+
+ // Interpolation
+ 0x60 ,0x7f ,
+ 0x61 ,0x08 ,
+
+ // Color matrix (D65) - Daylight
+ 0x71 ,0x34 , //0x34 0x39
+ 0x72 ,0xCe , //0xCe 0xCc
+ 0x73 ,0xFe , //0xFe 0xFb
+ 0x74 ,0x13 , //0x13 0x10
+ 0x75 ,0x25 , //0x25 0x21
+ 0x76 ,0x08 , //0x08 0x0f
+ 0x77 ,0xec , //0xec 0xf8
+ 0x78 ,0xd1 , //0xd1 0xc0
+ 0x79 ,0x47 , //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83 ,0x38 , //0x3c
+ 0x84 ,0xd1 , //0xc6
+ 0x85 ,0xf7 , //0xff
+ 0x86 ,0x12 , //0x12
+ 0x87 ,0x25 , //0x24
+ 0x88 ,0x09 , //0x0a
+ 0x89 ,0xe1 , //0xed
+ 0x8a ,0xc7 , //0xc2
+ 0x8b ,0x58 , //0x51
+
+ 0x8c ,0x10 , //CMA select
+
+ //G Edge
+ 0x90 ,0x20 , //Upper gain
+ 0x91 ,0x40 , //down gain
+ 0x92 ,0x44 , //[7:4] upper coring [3:0] down coring
+ 0x9a ,0x40 ,
+ 0x9b ,0x40 ,
+ 0x9c ,0x38 , //edge suppress start 30
+ 0x9d ,0x30 , //edge suppress slope
+ 0xa8 ,0x10 ,
+ 0xa9 ,0x13 ,
+ 0xaa ,0x13 ,
+ 0xb9 ,0x30 , // nightmode 38 at gain 0x48 5fps
+ 0xba ,0x44 , // nightmode 80 at gain 0x48 5fps
+ 0xde ,0x80 ,
+
+ 0xe5 ,0x15 ,
+ 0xe6 ,0x02 ,
+ 0xe7 ,0x04 ,
+
+ //Sensor On //Sensor On
+ 0x00 ,0x01 ,
+ 0x03 ,0x01 ,
+ 0x00 ,0x00 ,
+#else
+ 0x00,0x00,
+ 0x03,0x04,
+ 0x10,0x86,//8d}}, //85
+ 0x11,0x74,// f1}}, //0x11 0x61 davis20120514
+
+ 0x00,0x01,
+ 0x04,0x00, //00
+ 0x06,0x04,
+ 0x10,0x11,//46}},
+ 0x11,0x25,//23}},
+ 0x12,0x21,
+ 0x17,0x94,//86}},
+ 0x18,0x00,
+ 0x20,0x00,
+ 0x21,0x05,
+ 0x22,0x01,
+ 0x23,0x69, //add
+ 0x40,0x0F,
+ 0x41,0x90,
+ 0x42,0xd2,
+ 0x43,0x00,
+
+ // AE
+ 0x00,0x02,
+ 0x10,0x84,
+ 0x11,0x14,//0c}},//10}},
+ 0x12,0x68,//71,//70}}, // D65 target 60
+ 0x14,0x40,//68, // A target 5d
+ 0x34,0x96,
+ 0x40,0x38,//48}},//40}}, // 40
+ 0x44,0x08,//00}},
+
+
+ // AWB
+ 0x00,0x03,
+ 0x10,0xD0,//c3}}, //
+ 0x11,0xc1,//c0}},//c0
+ 0x12,0x80,
+ 0x13,0x80, //Cr target 0x7e
+ 0x14,0x80, //Cb target 7f
+ 0x15,0xe0,//c0}}, // R gain Top e0
+ 0x16,0x7C,//88}},//8c}}, // R gain bottom 8c //
+ 0x17,0xe0, // B gain Top e0
+ 0x18,0x80,//70}}, // B gain bottom 0x80 //
+ 0x19,0x8C,//90}}, // Cr top value 8c //
+ 0x1a,0x64, // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b,0x94, // Cb top value 0x98
+ 0x1c,0x6c, // Cb bottom value 0x6c // 0x01
+ 0x1d,0x94, // 0xa0
+ 0x1e,0x6c, // 0x60
+ 0x20,0xe8, // AWB luminous top value
+ 0x21,0x30, // AWB luminous bottom value 0x20
+ 0x22,0xb8,
+ 0x23,0x10,
+ 0x25,0x08,//20}},
+ 0x26,0x0f,//0f}},
+ 0x27,0x60, // BRTSRT
+ 0x28,0x70, // BRTEND
+ 0x29,0xb7, // BRTRGNBOT
+ 0x2a,0xa3, // BRTBGNTOP
+
+ 0x40,0x01,
+ 0x41,0x03,//04}},
+ 0x42,0x08,
+ 0x43,0x10,
+ 0x44,0x13,//12}}, // 0x12
+ 0x45,0x6a,//35}}, //35
+ 0x46,0xca, // fc
+
+ 0x62,0x80,//84}}, //84 //
+
+ 0x63,0x90,//9c}}, // R D30 to D20
+ 0x64,0xD0,//d4}}, // B D30 to D20
+ 0x65,0x98,//a0}},//90}}, // R D20 to D30
+ 0x66,0xd0, // B D20 to D30
+
+ // IDP
+ 0x00,0x04,
+ 0x10,0x7f,//f,
+
+ 0x11,0x1d, // changed
+ 0x12,0x3d,//++
+ 0x13,0xfe,//++
+ 0x14,0x01,//++
+
+
+ // DPCBNR
+ 0x18,0xbf,//fe, // DPCNRCTRL
+ 0x19,0x00,//04, // DPCTHV
+ 0x1A,0x00,//01, // DPCTHVSLP
+ 0x1B,0x00,//08,//08}}, // DPCTHVDIFSRT
+
+
+
+ 0x1E,0x04, // BNRTHV 0c
+ 0x1F,0x08,//04}}, // BNRTHVSLPN 10
+ 0x20,0x20, // BNRTHVSLPD
+ 0x21,0x00, /// BNRNEICNT / 0x08
+ 0x22,0x08, // STRTNOR // 0x03
+ 0x23,0x38,//40}}, // STRTDRK
+ 0x24,0x00,
+
+ // Gamma
+
+ 0x31, 0x11,//03,//0x080x31, 0x04 },//0x08 0x03
+ 0x32, 0x21,//0b,//0x100x32, 0x0b },//0x10 0x08
+ 0x33, 0x37,//1e,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34, 0x54,//46,//0x370x34, 0x49 },//0x37 0x36
+ 0x35, 0x6e,//62,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36, 0x84,//0x600x36, 0x7C },//0x60 0x77
+ 0x37, 0x96,//0x720x37, 0x8D },//0x72 0x88
+ 0x38, 0xa7,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39, 0xb7,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a, 0xc4,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b, 0xd9,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c, 0xea,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d, 0xf9,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40,0x55,//04}}, //06
+ 0x41,0x44,
+ 0x42,0x33,//43}},
+ 0x43,0x00,
+ 0x44,0x22, // left R gain[7:4], right R gain[3:0] 22
+ 0x45,0x22, // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46,0x00, // left G gain[7:4], right G gain[3:0]
+ 0x47,0x03, // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48,0x01, // left B gain[7:4], right B gain[3:0]
+ 0x49,0x11, // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a,0x05, // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b,0x40, // X-axis center low[7:0] 48
+ 0x4c,0x10, // Y-axis center low[7:0] e8
+ 0x4d,0x80, // Shading Center Gain 80
+ 0x4e,0x00, // Shading R Offset
+ 0x4f,0x00, // Shading Gr Offset
+ 0x50,0x00, // Shading B Offset
+
+
+ // Interpolation
+ 0x60,0x7f,
+ 0x61,0x08,
+
+ // Color matrix (D65) - Daylight
+
+
+ 0x71,0x39, //0x34 0x39
+ 0x72,0xC8, //0xCe 0xCc
+ 0x73,0xff, //0xFe 0xFb
+ 0x74,0x13, //0x13 0x10
+ 0x75,0x25, //0x25 0x21
+ 0x76,0x08, //0x08 0x0f
+ 0x77,0xf8, //0xec 0xf8
+ 0x78,0xc0, //0xd1 0xc0
+ 0x79,0x48, //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83,0x34, //0x3c
+ 0x84,0xd4, //0xc6
+ 0x85,0xf8, //0xff
+ 0x86,0x12, //0x12
+ 0x87,0x25, //0x24
+ 0x88,0x09, //0x0a
+ 0x89,0xf0, //0xed
+ 0x8a,0xbe, //0xc2
+ 0x8b,0x54, //0x51
+
+
+ 0x8c,0x10, //CMA select
+
+ //G Edge
+ 0x90,0x30, //Upper gain
+ 0x91,0x40, //down gain
+ 0x92,0x33,//22}}, //[7:4] upper coring [3:0] down coring
+ 0x9a,0x40,
+ 0x9b,0x40,
+ 0x9c,0x38, //edge suppress start 30
+ 0x9d,0x30, //edge suppress slope
+
+ 0x9f,0x26,
+ 0xa0,0x11,
+
+ 0xa8,0x11,//10}},
+ 0xa9,0x11,//10}},
+ 0xaa,0x11,
+
+ 0xbf,0x20,
+
+ 0xb9,0x28,//30}}, // nightmode 38 at gain 0x48 5fps
+ 0xba,0x41,//44}}, // nightmode 80 at gain 0x48 5fps
+ 0xde,0x80,
+
+ 0xe5,0x15,
+ 0xe6,0x02,
+ 0xe7,0x04,
+
+ //Sensor On //Sensor On
+ 0x00,0x01,
+ 0x03,0x01,
+
+ 0x00,0x00,
+#endif
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.c b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.c
new file mode 100755
index 00000000..55c80db7
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.c
@@ -0,0 +1,337 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "siv121d.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, siv121d_320_240_regs),
+ CMOS_WIN_SIZE("VGA", 640, 480, siv121d_640_480_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = siv121d_wb_auto;
+ size = ARRAY_SIZE(siv121d_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = siv121d_wb_incandescent;
+ size = ARRAY_SIZE(siv121d_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = siv121d_wb_daylight;
+ size = ARRAY_SIZE(siv121d_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = siv121d_wb_cloudy;
+ size = ARRAY_SIZE(siv121d_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = siv121d_wb_fluorescent;
+ size = ARRAY_SIZE(siv121d_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = siv121d_scene_mode_auto;
+ size = ARRAY_SIZE(siv121d_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = siv121d_scene_mode_night;
+ size = ARRAY_SIZE(siv121d_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, enum v4l2_exposure_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = siv121d_exposure_neg6;
+ size = ARRAY_SIZE(siv121d_exposure_neg6);
+ break;
+ case -1:
+ regs = siv121d_exposure_neg3;
+ size = ARRAY_SIZE(siv121d_exposure_neg3);
+ break;
+ case 0:
+ regs = siv121d_exposure_zero;
+ size = ARRAY_SIZE(siv121d_exposure_zero);
+ break;
+ case 1:
+ regs = siv121d_exposure_pos3;
+ size = ARRAY_SIZE(siv121d_exposure_pos3);
+ break;
+ case 2:
+ regs = siv121d_exposure_pos6;
+ size = ARRAY_SIZE(siv121d_exposure_pos6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x01);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x01;
+ break;
+ case 1:
+ data |= 0x01;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0x00, 0x01);
+
+ data = sensor_read(sd, 0x04);
+
+ switch (value) {
+ case 0:
+ data &= ~0x02;
+ break;
+ case 1:
+ data |= 0x02;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return sensor_write(sd, 0x04, data);
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ int data;
+
+ sensor_write(sd, 0x00, 0x0);
+
+ data = sensor_read(sd, 0x01);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ int version;
+
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ version = sensor_read(sd, 0x02);
+ printk("version:0x%x\n",version);
+ if (version == 0x10) {
+ sensor_write_array(sd, siv121d_default_regs_init_121d,
+ ARRAY_SIZE(siv121d_default_regs_init_121d));
+ } else if (version == 0x15) {
+ sensor_write_array(sd, siv121d_default_regs_init_121du,
+ ARRAY_SIZE(siv121d_default_regs_init_121du));
+
+ }
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ return 0;
+}
+
+static struct cmos_subdev_ops siv121d_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev siv121d = {
+ .name = "siv121d",
+ .i2c_addr = 0x33,
+ .id = 0xde,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &siv121d_ops,
+};
+
+#if 0
+static int __init siv121d_init(void)
+{
+ return cmos_register_sudbdev(&siv121d);
+}
+
+static void __exit siv121d_exit(void)
+{
+ return cmos_unregister_subdev(&siv121d);
+}
+
+module_init(siv121d_init);
+module_exit(siv121d_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.h b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.h
new file mode 100755
index 00000000..eb7a8e72
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/siv121d/siv121d.h
@@ -0,0 +1,1128 @@
+#ifndef SIV121D_H
+#define SIV121D_H
+
+
+// Scene Mode
+uint8_t siv121d_scene_mode_auto[] = {
+ 0x00,0x02,
+ 0x11,0x10,
+ 0x40,0x40,
+};
+
+uint8_t siv121d_scene_mode_night[] = {
+ 0x00,0x02,
+ 0x11,0x18,
+ 0x40,0x60,
+};
+
+
+// White Balance
+uint8_t siv121d_wb_auto [] = {
+ 0x00,0x03,
+ 0x10,0xd0,
+ //0x60,0xC5,
+ //0x61,0x95,
+};
+
+uint8_t siv121d_wb_incandescent [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0x80,
+ 0x61,0xE0,
+};
+
+uint8_t siv121d_wb_fluorescent [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xB8,
+ 0x61,0xCC,
+};
+
+uint8_t siv121d_wb_daylight [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xD8,
+ 0x61,0x90,
+};
+
+uint8_t siv121d_wb_cloudy [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0xB4,
+ 0x61,0x90,
+};
+
+uint8_t siv121d_wb_tungsten [] = {
+ 0x00,0x03,
+ 0x10,0x00,
+ 0x60,0x7B,
+ 0x61,0xa0,
+};
+
+
+// Exposure
+uint8_t siv121d_exposure_neg6[] = {
+ 0x00,0x04,
+ 0xAB,0xa8,
+};
+
+uint8_t siv121d_exposure_neg3[] = {
+ 0x00,0x04,
+ 0xAB,0x90,
+};
+
+uint8_t siv121d_exposure_zero[] = {
+ 0x00,0x04,
+ 0xAB,0x00,
+};
+
+uint8_t siv121d_exposure_pos3[] = {
+ 0x00,0x04,
+ 0xAB,0x18,
+};
+
+uint8_t siv121d_exposure_pos6[] = {
+ 0x00,0x04,
+ 0xAB,0x30,
+};
+
+// Color Effect
+uint8_t siv121d_colorfx_none[] = {
+ 0x00,0x04,
+ 0xB6,0x00,
+};
+
+uint8_t siv121d_colorfx_bw[] = {
+ 0x00,0x04,
+ 0xB6,0x40,
+};
+
+uint8_t siv121d_colorfx_sepia[] = {
+ 0x00,0x04,
+ 0xB6,0x80,
+ 0xB7,0x60,
+ 0xB8,0xA0,
+};
+
+uint8_t siv121d_colorfx_negative[] = {
+ 0x00,0x04,
+ 0xB6,0x20,
+
+};
+
+uint8_t siv121d_colorfx_emboss[] = {
+ 0x00,0x04,
+ 0xB6,0x08,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv121d_colorfx_sketch[] = {
+ 0x00,0x04,
+ 0xB6,0x04,
+ 0xB7,0x00,
+ 0xB8,0x00,
+};
+
+uint8_t siv121d_colorfx_sky_blue[] = {
+ 0x00,0x04,
+ 0xB6,0xa0,
+ 0xB7,0xc0,
+ 0xB8,0x50,
+};
+
+uint8_t siv121d_colorfx_grass_green[] = {
+ 0x00,0x04,
+ 0xB6,0x80,
+ 0xB7,0x50,
+ 0xB8,0x50,
+};
+
+uint8_t siv121d_colorfx_skin_whiten[] = {
+};
+
+uint8_t sensor_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sensor_brightness_neg4[] = {
+ 0x00,0x04,
+ 0xAB,0xC0,
+};
+
+uint8_t sensor_brightness_neg3[] = {
+ 0x00,0x04,
+ 0xAB,0xB0,
+};
+
+uint8_t sensor_brightness_neg2[] = {
+ 0x00,0x04,
+ 0xAB,0xA0,
+};
+
+uint8_t sensor_brightness_neg1[] = {
+ 0x00,0x04,
+ 0xAB,0x90,
+};
+
+uint8_t sensor_brightness_zero[] = {
+ 0x00,0x04,
+ 0xAB,0x00,
+};
+
+uint8_t sensor_brightness_pos1[] = {
+ 0x00,0x04,
+ 0xAB,0x10,
+};
+
+uint8_t sensor_brightness_pos2[] = {
+ 0x00,0x04,
+ 0xAB,0x20,
+};
+
+uint8_t sensor_brightness_pos3[] = {
+ 0x00,0x04,
+ 0xAB,0x30,
+};
+
+uint8_t sensor_brightness_pos4[] = {
+ 0x00,0x04,
+ 0xAB,0x40,
+};
+
+
+// Contrast
+uint8_t sensor_contrast_neg4[] = {
+ 0x00,0x04,
+ 0xA8,0x0D,
+
+};
+
+uint8_t sensor_contrast_neg3[] = {
+ 0x00,0x04,
+ 0xA8,0x0E,
+};
+
+uint8_t sensor_contrast_neg2[] = {
+ 0x00,0x04,
+ 0xA8,0x0F,
+};
+
+uint8_t sensor_contrast_neg1[] = {
+ 0x00,0x04,
+ 0xA8,0x10,
+};
+
+uint8_t sensor_contrast_zero[] = {
+ 0x00,0x04,
+ 0xA8,0x10,
+};
+
+uint8_t sensor_contrast_pos1[] = {
+ 0x00,0x04,
+ 0xA8,0x12,
+};
+
+uint8_t sensor_contrast_pos2[] = {
+ 0x00,0x04,
+ 0xA8,0x13,
+};
+
+uint8_t sensor_contrast_pos3[] = {
+ 0x00,0x04,
+ 0xA8,0x14,
+};
+
+uint8_t sensor_contrast_pos4[] = {
+ 0x00,0x04,
+ 0xA8,0x15,
+};
+
+// Saturation
+uint8_t sensor_saturation_neg4[] = {
+};
+
+uint8_t sensor_saturation_neg3[] = {
+};
+
+uint8_t sensor_saturation_neg2[] = {
+};
+
+uint8_t sensor_saturation_neg1[] = {
+};
+
+uint8_t sensor_saturation_zero[] = {
+};
+
+uint8_t sensor_saturation_pos1[] = {
+};
+
+uint8_t sensor_saturation_pos2[] = {
+};
+
+uint8_t sensor_saturation_pos3[] = {
+};
+
+uint8_t sensor_saturation_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,
+ 0x49 ,0x21 ,//15 ,
+ 0x4a ,0x23 ,//18 ,
+ 0x4b ,0x24 ,//1a ,
+ 0x4c ,0x25 ,//1d ,
+ 0x4d ,0x28 ,//20 ,
+ 0x4e ,0x1c ,//10 ,
+ 0x4f ,0x15 ,//0a ,
+
+ 0x50 ,0x10 ,//08 ,
+ 0x51 ,0x10 ,//06 ,
+ 0x52 ,0x0e ,//05 ,
+ 0x53 ,0x0c ,//04 ,
+ 0x54 ,0x0b ,//02 ,
+ 0x55 ,0x0a ,//01 ,
+ 0x90 ,0x80 ,
+ 0x91 ,0x80 ,
+
+ // AWB
+ 0x00 ,0x03 ,
+ 0x10 ,0xd0 , //
+ 0x11 ,0xc0 ,//c0
+ 0x13 ,0x81 , //Cr target
+ 0x14 ,0x7d , //Cb target 7d
+ 0x15 ,0xc0 , // R gain Top e0
+ 0x16 ,0x8c , // R gain bottom 8c //
+ 0x17 ,0xe0 , // B gain Top e0
+ 0x18 ,0x70 , // B gain bottom 0x80 //
+ 0x19 ,0x8c , // Cr top value 8c //
+ 0x1a ,0x64 , // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b ,0x98 , // Cb top value 0x98
+ 0x1c ,0x6c , // Cb bottom value 0x6c // 0x01
+ 0x1d ,0x94 , // 0xa0
+ 0x1e ,0x6c , // 0x60
+ 0x20 ,0xe8 , // AWB luminous top value
+ 0x21 ,0x30 , // AWB luminous bottom value 0x20
+ 0x22 ,0xb8 ,
+ 0x23 ,0x10 ,
+ 0x25 ,0x20 ,
+ 0x26 ,0x0f ,
+ 0x27 ,0x08 , // BRTSRT
+ 0x28 ,0x0f , // BRTEND
+ 0x29 ,0xba , // BRTRGNBOT
+ 0x2a ,0xa0 , // BRTBGNTOP
+
+ 0x40 ,0x01 ,
+ 0x41 ,0x04 ,
+ 0x42 ,0x08 ,
+ 0x43 ,0x10 ,
+ 0x44 ,0x12 , // 0x12
+ 0x45 ,0x35 , //35
+ 0x46 ,0xfc , // fc
+ 0x62 ,0x84 , //84 //
+ 0x63 ,0x90 , // R D30 to D20
+ 0x64 ,0xd0 , // B D30 to D20
+ 0x65 ,0x90 , // R D20 to D30
+ 0x66 ,0xd0 , // B D20 to D30
+
+ // IDP
+ 0x00 ,0x04 ,
+ 0x10 ,0xff ,
+ // 0x11 ,0x1d ,
+ 0x11 ,0x1d , //zhongwei changed
+ 0x12 ,0x3d ,//zhongwei++
+
+
+ // DPCBNR
+ 0x18 ,0xbe ,//fe , // DPCNRCTRL
+ 0x19 ,0x00 ,//04 , // DPCTHV
+ 0x1A ,0x00 ,//01 , // DPCTHVSLP
+ 0x1B ,0x00 ,//08 , // DPCTHVDIFSRT
+ 0x1C ,0x0f ,//08 , // DPCTHVDIFSLP
+ 0x1d ,0xFF , // DPCTHVMAX
+
+ 0x1E ,0x04 , // BNRTHV 0c
+ 0x1F ,0x04 , // BNRTHVSLPN 10
+ 0x20 ,0x10 , // BNRTHVSLPD
+ 0x21 ,0x00 , /// BNRNEICNT / 0x08
+ 0x22 ,0x10 , // STRTNOR // 0x03
+ 0x23 ,0x40 , // STRTDRK
+
+ // Gamma
+ 0x31 ,0x08 ,//0x080x31, 0x04 },//0x08 0x03
+ 0x32 ,0x12 ,//0x100x32, 0x0b },//0x10 0x08
+ 0x33 ,0x24 ,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34 ,0x47 ,//0x370x34, 0x49 },//0x37 0x36
+ 0x35 ,0x64 ,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36 ,0x7c ,//0x600x36, 0x7C },//0x60 0x77
+ 0x37 ,0x8f ,//0x720x37, 0x8D },//0x72 0x88
+ 0x38 ,0x9f ,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39 ,0xad ,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a ,0xba ,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b ,0xcf ,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c ,0xe2 ,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d ,0xf0 ,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40 ,0x04 , //06
+ 0x41 ,0x44 ,
+ 0x42 ,0x43 ,
+ 0x43 ,0x20 ,
+ 0x44 ,0x11 , // left R gain[7:4], right R gain[3:0] 22
+ 0x45 ,0x11 , // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46 ,0x00 , // left G gain[7:4], right G gain[3:0]
+ 0x47 ,0x00 , // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48 ,0x00 , // left B gain[7:4], right B gain[3:0]
+ 0x49 ,0x00 , // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a ,0x04 , // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b ,0x60 , // X-axis center low[7:0] 48
+ 0x4c ,0xe0 , // Y-axis center low[7:0] e8
+ 0x4d ,0x88 , // Shading Center Gain 80
+ 0x4e ,0x00 , // Shading R Offset
+ 0x4f ,0x00 , // Shading Gr Offset
+ 0x50 ,0x00 , // Shading B Offset
+
+
+ // Interpolation
+ 0x60 ,0x7f ,
+ 0x61 ,0x08 ,
+
+ // Color matrix (D65) - Daylight
+ 0x71 ,0x34 , //0x34 0x39
+ 0x72 ,0xCe , //0xCe 0xCc
+ 0x73 ,0xFe , //0xFe 0xFb
+ 0x74 ,0x13 , //0x13 0x10
+ 0x75 ,0x25 , //0x25 0x21
+ 0x76 ,0x08 , //0x08 0x0f
+ 0x77 ,0xec , //0xec 0xf8
+ 0x78 ,0xd1 , //0xd1 0xc0
+ 0x79 ,0x47 , //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83 ,0x38 , //0x3c
+ 0x84 ,0xd1 , //0xc6
+ 0x85 ,0xf7 , //0xff
+ 0x86 ,0x12 , //0x12
+ 0x87 ,0x25 , //0x24
+ 0x88 ,0x09 , //0x0a
+ 0x89 ,0xe1 , //0xed
+ 0x8a ,0xc7 , //0xc2
+ 0x8b ,0x58 , //0x51
+
+ 0x8c ,0x10 , //CMA select
+
+ //G Edge
+ 0x90 ,0x20 , //Upper gain
+ 0x91 ,0x40 , //down gain
+ 0x92 ,0x44 , //[7:4] upper coring [3:0] down coring
+ 0x9a ,0x40 ,
+ 0x9b ,0x40 ,
+ 0x9c ,0x38 , //edge suppress start 30
+ 0x9d ,0x30 , //edge suppress slope
+ 0xa8 ,0x10 ,
+ 0xa9 ,0x13 ,
+ 0xaa ,0x13 ,
+ 0xb9 ,0x30 , // nightmode 38 at gain 0x48 5fps
+ 0xba ,0x44 , // nightmode 80 at gain 0x48 5fps
+ 0xde ,0x80 ,
+
+ 0xe5 ,0x15 ,
+ 0xe6 ,0x02 ,
+ 0xe7 ,0x04 ,
+
+ //Sensor On //Sensor On
+ 0x00 ,0x01 ,
+ 0x03 ,0x01 ,
+ 0x00 ,0x00 ,
+#else
+ 0x00,0x00,
+ 0x03,0x04,
+ 0x10,0x86,//8d}}, //85
+ 0x11,0x74,// f1}}, //0x11 0x61 davis20120514
+
+ 0x00,0x01,
+ 0x04,0x00, //00
+ 0x06,0x04,
+ 0x10,0x11,//46}},
+ 0x11,0x25,//23}},
+ 0x12,0x21,
+ 0x17,0x94,//86}},
+ 0x18,0x00,
+ 0x20,0x00,
+ 0x21,0x05,
+ 0x22,0x01,
+ 0x23,0x69, //add
+ 0x40,0x0F,
+ 0x41,0x90,
+ 0x42,0xd2,
+ 0x43,0x00,
+
+ // AE
+ 0x00,0x02,
+ 0x10,0x84,
+ 0x11,0x14,//0c}},//10}},
+ 0x12,0x68,//71,//70}}, // D65 target 60
+ 0x14,0x40,//68, // A target 5d
+ 0x34,0x96,
+ 0x40,0x38,//48}},//40}}, // 40
+ 0x44,0x08,//00}},
+
+
+ // AWB
+ 0x00,0x03,
+ 0x10,0xD0,//c3}}, //
+ 0x11,0xc1,//c0}},//c0
+ 0x12,0x80,
+ 0x13,0x80, //Cr target 0x7e
+ 0x14,0x80, //Cb target 7f
+ 0x15,0xe0,//c0}}, // R gain Top e0
+ 0x16,0x7C,//88}},//8c}}, // R gain bottom 8c //
+ 0x17,0xe0, // B gain Top e0
+ 0x18,0x80,//70}}, // B gain bottom 0x80 //
+ 0x19,0x8C,//90}}, // Cr top value 8c //
+ 0x1a,0x64, // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b,0x94, // Cb top value 0x98
+ 0x1c,0x6c, // Cb bottom value 0x6c // 0x01
+ 0x1d,0x94, // 0xa0
+ 0x1e,0x6c, // 0x60
+ 0x20,0xe8, // AWB luminous top value
+ 0x21,0x30, // AWB luminous bottom value 0x20
+ 0x22,0xb8,
+ 0x23,0x10,
+ 0x25,0x08,//20}},
+ 0x26,0x0f,//0f}},
+ 0x27,0x60, // BRTSRT
+ 0x28,0x70, // BRTEND
+ 0x29,0xb7, // BRTRGNBOT
+ 0x2a,0xa3, // BRTBGNTOP
+
+ 0x40,0x01,
+ 0x41,0x03,//04}},
+ 0x42,0x08,
+ 0x43,0x10,
+ 0x44,0x13,//12}}, // 0x12
+ 0x45,0x6a,//35}}, //35
+ 0x46,0xca, // fc
+
+ 0x62,0x80,//84}}, //84 //
+
+ 0x63,0x90,//9c}}, // R D30 to D20
+ 0x64,0xD0,//d4}}, // B D30 to D20
+ 0x65,0x98,//a0}},//90}}, // R D20 to D30
+ 0x66,0xd0, // B D20 to D30
+
+ // IDP
+ 0x00,0x04,
+ 0x10,0x7f,//f,
+
+ 0x11,0x1d, // changed
+ 0x12,0x3d,//++
+ 0x13,0xfe,//++
+ 0x14,0x01,//++
+
+
+ // DPCBNR
+ 0x18,0xbf,//fe, // DPCNRCTRL
+ 0x19,0x00,//04, // DPCTHV
+ 0x1A,0x00,//01, // DPCTHVSLP
+ 0x1B,0x00,//08,//08}}, // DPCTHVDIFSRT
+
+
+
+ 0x1E,0x04, // BNRTHV 0c
+ 0x1F,0x08,//04}}, // BNRTHVSLPN 10
+ 0x20,0x20, // BNRTHVSLPD
+ 0x21,0x00, /// BNRNEICNT / 0x08
+ 0x22,0x08, // STRTNOR // 0x03
+ 0x23,0x38,//40}}, // STRTDRK
+ 0x24,0x00,
+
+ // Gamma
+
+ 0x31, 0x11,//03,//0x080x31, 0x04 },//0x08 0x03
+ 0x32, 0x21,//0b,//0x100x32, 0x0b },//0x10 0x08
+ 0x33, 0x37,//1e,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34, 0x54,//46,//0x370x34, 0x49 },//0x37 0x36
+ 0x35, 0x6e,//62,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36, 0x84,//0x600x36, 0x7C },//0x60 0x77
+ 0x37, 0x96,//0x720x37, 0x8D },//0x72 0x88
+ 0x38, 0xa7,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39, 0xb7,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a, 0xc4,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b, 0xd9,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c, 0xea,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d, 0xf9,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40,0x55,//04}}, //06
+ 0x41,0x44,
+ 0x42,0x33,//43}},
+ 0x43,0x00,
+ 0x44,0x22, // left R gain[7:4], right R gain[3:0] 22
+ 0x45,0x22, // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46,0x00, // left G gain[7:4], right G gain[3:0]
+ 0x47,0x03, // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48,0x01, // left B gain[7:4], right B gain[3:0]
+ 0x49,0x11, // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a,0x05, // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b,0x40, // X-axis center low[7:0] 48
+ 0x4c,0x10, // Y-axis center low[7:0] e8
+ 0x4d,0x80, // Shading Center Gain 80
+ 0x4e,0x00, // Shading R Offset
+ 0x4f,0x00, // Shading Gr Offset
+ 0x50,0x00, // Shading B Offset
+
+
+ // Interpolation
+ 0x60,0x7f,
+ 0x61,0x08,
+
+ // Color matrix (D65) - Daylight
+
+
+ 0x71,0x39, //0x34 0x39
+ 0x72,0xC8, //0xCe 0xCc
+ 0x73,0xff, //0xFe 0xFb
+ 0x74,0x13, //0x13 0x10
+ 0x75,0x25, //0x25 0x21
+ 0x76,0x08, //0x08 0x0f
+ 0x77,0xf8, //0xec 0xf8
+ 0x78,0xc0, //0xd1 0xc0
+ 0x79,0x48, //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83,0x34, //0x3c
+ 0x84,0xd4, //0xc6
+ 0x85,0xf8, //0xff
+ 0x86,0x12, //0x12
+ 0x87,0x25, //0x24
+ 0x88,0x09, //0x0a
+ 0x89,0xf0, //0xed
+ 0x8a,0xbe, //0xc2
+ 0x8b,0x54, //0x51
+
+
+ 0x8c,0x10, //CMA select
+
+ //G Edge
+ 0x90,0x30, //Upper gain
+ 0x91,0x40, //down gain
+ 0x92,0x33,//22}}, //[7:4] upper coring [3:0] down coring
+ 0x9a,0x40,
+ 0x9b,0x40,
+ 0x9c,0x38, //edge suppress start 30
+ 0x9d,0x30, //edge suppress slope
+
+ 0x9f,0x26,
+ 0xa0,0x11,
+
+ 0xa8,0x11,//10}},
+ 0xa9,0x11,//10}},
+ 0xaa,0x11,
+
+ 0xbf,0x20,
+
+ 0xb9,0x28,//30}}, // nightmode 38 at gain 0x48 5fps
+ 0xba,0x41,//44}}, // nightmode 80 at gain 0x48 5fps
+ 0xde,0x80,
+
+ 0xe5,0x15,
+ 0xe6,0x02,
+ 0xe7,0x04,
+
+ //Sensor On //Sensor On
+ 0x00,0x01,
+ 0x03,0x01,
+
+ 0x00,0x00,
+#endif
+};
+
+uint8_t siv121d_default_regs_init_121du[] = {
+#if 0
+ 0x00 ,0x00 ,
+ 0x00 ,0x01 ,
+ 0x03 ,0x0a ,
+
+ 0x00 ,0x01 ,
+ 0x03 ,0x0a ,
+
+ 0x00 ,0x00 ,
+ 0x03 ,0x04 ,
+ 0x10 ,0x85 , //85
+ 0x11 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8c , // R gain bottom 8c //
+ 0x17 ,0xe0 , // B gain Top e0
+ 0x18 ,0x70 , // B gain bottom 0x80 //
+ 0x19 ,0x8c , // Cr top value 8c //
+ 0x1a ,0x64 , // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b ,0x98 , // Cb top value 0x98
+ 0x1c ,0x6c , // Cb bottom value 0x6c // 0x01
+ 0x1d ,0x94 , // 0xa0
+ 0x1e ,0x6c , // 0x60
+ 0x20 ,0xe8 , // AWB luminous top value
+ 0x21 ,0x30 , // AWB luminous bottom value 0x20
+ 0x22 ,0xb8 ,
+ 0x23 ,0x10 ,
+ 0x25 ,0x20 ,
+ 0x26 ,0x0f ,
+ 0x27 ,0x08 , // BRTSRT
+ 0x28 ,0x0f , // BRTEND
+ 0x29 ,0xba , // BRTRGNBOT
+ 0x2a ,0xa0 , // BRTBGNTOP
+
+ 0x40 ,0x01 ,
+ 0x41 ,0x04 ,
+ 0x42 ,0x08 ,
+ 0x43 ,0x10 ,
+ 0x44 ,0x12 , // 0x12
+ 0x45 ,0x35 , //35
+ 0x46 ,0xfc , // fc
+ 0x62 ,0x84 , //84 //
+ 0x63 ,0x90 , // R D30 to D20
+ 0x64 ,0xd0 , // B D30 to D20
+ 0x65 ,0x90 , // R D20 to D30
+ 0x66 ,0xd0 , // B D20 to D30
+
+ // IDP
+ 0x00 ,0x04 ,
+ 0x10 ,0xff ,
+ // 0x11 ,0x1d ,
+ 0x11 ,0x1d , //zhongwei changed
+ 0x12 ,0x3d ,//zhongwei++
+
+
+ // DPCBNR
+ 0x18 ,0xbe ,//fe , // DPCNRCTRL
+ 0x19 ,0x00 ,//04 , // DPCTHV
+ 0x1A ,0x00 ,//01 , // DPCTHVSLP
+ 0x1B ,0x00 ,//08 , // DPCTHVDIFSRT
+ 0x1C ,0x0f ,//08 , // DPCTHVDIFSLP
+ 0x1d ,0xFF , // DPCTHVMAX
+
+ 0x1E ,0x04 , // BNRTHV 0c
+ 0x1F ,0x04 , // BNRTHVSLPN 10
+ 0x20 ,0x10 , // BNRTHVSLPD
+ 0x21 ,0x00 , /// BNRNEICNT / 0x08
+ 0x22 ,0x10 , // STRTNOR // 0x03
+ 0x23 ,0x40 , // STRTDRK
+
+ // Gamma
+ 0x31 ,0x08 ,//0x080x31, 0x04 },//0x08 0x03
+ 0x32 ,0x12 ,//0x100x32, 0x0b },//0x10 0x08
+ 0x33 ,0x24 ,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34 ,0x47 ,//0x370x34, 0x49 },//0x37 0x36
+ 0x35 ,0x64 ,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36 ,0x7c ,//0x600x36, 0x7C },//0x60 0x77
+ 0x37 ,0x8f ,//0x720x37, 0x8D },//0x72 0x88
+ 0x38 ,0x9f ,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39 ,0xad ,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a ,0xba ,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b ,0xcf ,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c ,0xe2 ,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d ,0xf0 ,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40 ,0x04 , //06
+ 0x41 ,0x44 ,
+ 0x42 ,0x43 ,
+ 0x43 ,0x20 ,
+ 0x44 ,0x11 , // left R gain[7:4], right R gain[3:0] 22
+ 0x45 ,0x11 , // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46 ,0x00 , // left G gain[7:4], right G gain[3:0]
+ 0x47 ,0x00 , // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48 ,0x00 , // left B gain[7:4], right B gain[3:0]
+ 0x49 ,0x00 , // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a ,0x04 , // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b ,0x60 , // X-axis center low[7:0] 48
+ 0x4c ,0xe0 , // Y-axis center low[7:0] e8
+ 0x4d ,0x88 , // Shading Center Gain 80
+ 0x4e ,0x00 , // Shading R Offset
+ 0x4f ,0x00 , // Shading Gr Offset
+ 0x50 ,0x00 , // Shading B Offset
+
+
+ // Interpolation
+ 0x60 ,0x7f ,
+ 0x61 ,0x08 ,
+
+ // Color matrix (D65) - Daylight
+ 0x71 ,0x34 , //0x34 0x39
+ 0x72 ,0xCe , //0xCe 0xCc
+ 0x73 ,0xFe , //0xFe 0xFb
+ 0x74 ,0x13 , //0x13 0x10
+ 0x75 ,0x25 , //0x25 0x21
+ 0x76 ,0x08 , //0x08 0x0f
+ 0x77 ,0xec , //0xec 0xf8
+ 0x78 ,0xd1 , //0xd1 0xc0
+ 0x79 ,0x47 , //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83 ,0x38 , //0x3c
+ 0x84 ,0xd1 , //0xc6
+ 0x85 ,0xf7 , //0xff
+ 0x86 ,0x12 , //0x12
+ 0x87 ,0x25 , //0x24
+ 0x88 ,0x09 , //0x0a
+ 0x89 ,0xe1 , //0xed
+ 0x8a ,0xc7 , //0xc2
+ 0x8b ,0x58 , //0x51
+
+ 0x8c ,0x10 , //CMA select
+
+ //G Edge
+ 0x90 ,0x20 , //Upper gain
+ 0x91 ,0x40 , //down gain
+ 0x92 ,0x44 , //[7:4] upper coring [3:0] down coring
+ 0x9a ,0x40 ,
+ 0x9b ,0x40 ,
+ 0x9c ,0x38 , //edge suppress start 30
+ 0x9d ,0x30 , //edge suppress slope
+ 0xa8 ,0x10 ,
+ 0xa9 ,0x13 ,
+ 0xaa ,0x13 ,
+ 0xb9 ,0x30 , // nightmode 38 at gain 0x48 5fps
+ 0xba ,0x44 , // nightmode 80 at gain 0x48 5fps
+ 0xde ,0x80 ,
+
+ 0xe5 ,0x15 ,
+ 0xe6 ,0x02 ,
+ 0xe7 ,0x04 ,
+
+ //Sensor On //Sensor On
+ 0x00 ,0x01 ,
+ 0x03 ,0x01 ,
+ 0x00 ,0x00 ,
+#else
+ 0x00,0x00,
+ 0x03,0x04,
+ 0x10,0x86,//8d}}, //85
+ 0x11,0x74,// f1}}, //0x11 0x61 davis20120514
+
+ 0x00,0x01,
+ 0x04,0x00, //00
+ 0x06,0x04,
+ 0x10,0x11,//46}},
+ 0x11,0x25,//23}},
+ 0x12,0x21,
+ 0x17,0x94,//86}},
+ 0x18,0x00,
+ 0x20,0x00,
+ 0x21,0x05,
+ 0x22,0x01,
+ 0x23,0x69, //add
+ 0x40,0x0F,
+ 0x41,0x90,
+ 0x42,0xd2,
+ 0x43,0x00,
+
+ // AE
+ 0x00,0x02,
+ 0x10,0x84,
+ 0x11,0x14,//0c}},//10}},
+ 0x12,0x68,//71,//70}}, // D65 target 60
+ 0x14,0x40,//68, // A target 5d
+ 0x34,0x96,
+ 0x40,0x38,//48}},//40}}, // 40
+ 0x44,0x08,//00}},
+
+
+ // AWB
+ 0x00,0x03,
+ 0x10,0xD0,//c3}}, //
+ 0x11,0xc1,//c0}},//c0
+ 0x12,0x80,
+ 0x13,0x80, //Cr target 0x7e
+ 0x14,0x80, //Cb target 7f
+ 0x15,0xe0,//c0}}, // R gain Top e0
+ 0x16,0x7C,//88}},//8c}}, // R gain bottom 8c //
+ 0x17,0xe0, // B gain Top e0
+ 0x18,0x80,//70}}, // B gain bottom 0x80 //
+ 0x19,0x8C,//90}}, // Cr top value 8c //
+ 0x1a,0x64, // Cr bottom value 0x64 60 //YCbYCr
+ 0x1b,0x94, // Cb top value 0x98
+ 0x1c,0x6c, // Cb bottom value 0x6c // 0x01
+ 0x1d,0x94, // 0xa0
+ 0x1e,0x6c, // 0x60
+ 0x20,0xe8, // AWB luminous top value
+ 0x21,0x30, // AWB luminous bottom value 0x20
+ 0x22,0xb8,
+ 0x23,0x10,
+ 0x25,0x08,//20}},
+ 0x26,0x0f,//0f}},
+ 0x27,0x60, // BRTSRT
+ 0x28,0x70, // BRTEND
+ 0x29,0xb7, // BRTRGNBOT
+ 0x2a,0xa3, // BRTBGNTOP
+
+ 0x40,0x01,
+ 0x41,0x03,//04}},
+ 0x42,0x08,
+ 0x43,0x10,
+ 0x44,0x13,//12}}, // 0x12
+ 0x45,0x6a,//35}}, //35
+ 0x46,0xca, // fc
+
+ 0x62,0x80,//84}}, //84 //
+
+ 0x63,0x90,//9c}}, // R D30 to D20
+ 0x64,0xD0,//d4}}, // B D30 to D20
+ 0x65,0x98,//a0}},//90}}, // R D20 to D30
+ 0x66,0xd0, // B D20 to D30
+
+ // IDP
+ 0x00,0x04,
+ 0x10,0x7f,//f,
+
+ 0x11,0x0d, // changed
+ 0x12,0x3d,//++
+ 0x13,0xfe,//++
+ 0x14,0x01,//++
+
+
+ // DPCBNR
+ 0x18,0xbf,//fe, // DPCNRCTRL
+ 0x19,0x00,//04, // DPCTHV
+ 0x1A,0x00,//01, // DPCTHVSLP
+ 0x1B,0x00,//08,//08}}, // DPCTHVDIFSRT
+
+
+
+ 0x1E,0x04, // BNRTHV 0c
+ 0x1F,0x08,//04}}, // BNRTHVSLPN 10
+ 0x20,0x20, // BNRTHVSLPD
+ 0x21,0x00, /// BNRNEICNT / 0x08
+ 0x22,0x08, // STRTNOR // 0x03
+ 0x23,0x38,//40}}, // STRTDRK
+ 0x24,0x00,
+
+ // Gamma
+
+ 0x31, 0x11,//03,//0x080x31, 0x04 },//0x08 0x03
+ 0x32, 0x21,//0b,//0x100x32, 0x0b },//0x10 0x08
+ 0x33, 0x37,//1e,//0x1B0x33, 0x24 },//0x1B 0x16
+ 0x34, 0x54,//46,//0x370x34, 0x49 },//0x37 0x36
+ 0x35, 0x6e,//62,//0x4D0x35, 0x66 },//0x4D 0x56
+ 0x36, 0x84,//0x600x36, 0x7C },//0x60 0x77
+ 0x37, 0x96,//0x720x37, 0x8D },//0x72 0x88
+ 0x38, 0xa7,//0x820x38, 0x9B },//0x82 0x9a
+ 0x39, 0xb7,//0x910x39, 0xAA },//0x91 0xA9
+ 0x3a, 0xc4,//0xA00x3a, 0xb6 },//0xA0 0xb5
+ 0x3b, 0xd9,//0xBA0x3b, 0xca },//0xBA 0xca
+ 0x3c, 0xea,//0xD30x3c, 0xdc },//0xD3 0xdd
+ 0x3d, 0xf9,//0xEA0x3d, 0xef },//0xEA 0xee
+
+ // Shading Register Setting
+ 0x40,0x55,//04}}, //06
+ 0x41,0x44,
+ 0x42,0x33,//43}},
+ 0x43,0x00,
+ 0x44,0x22, // left R gain[7:4], right R gain[3:0] 22
+ 0x45,0x22, // top R gain[7:4], bottom R gain[3:0] 22
+ 0x46,0x00, // left G gain[7:4], right G gain[3:0]
+ 0x47,0x03, // top G gain[7:4], bottom G gain[3:0] 11
+ 0x48,0x01, // left B gain[7:4], right B gain[3:0]
+ 0x49,0x11, // top B gain[7:4], bottom B gain[3:0] //color matrix default
+ 0x4a,0x05, // X-axis center high[3:2], Y-axis center high[1:0]
+ 0x4b,0x40, // X-axis center low[7:0] 48
+ 0x4c,0x10, // Y-axis center low[7:0] e8
+ 0x4d,0x80, // Shading Center Gain 80
+ 0x4e,0x00, // Shading R Offset
+ 0x4f,0x00, // Shading Gr Offset
+ 0x50,0x00, // Shading B Offset
+
+
+ // Interpolation
+ 0x60,0x7f,
+ 0x61,0x08,
+
+ // Color matrix (D65) - Daylight
+
+
+ 0x71,0x39, //0x34 0x39
+ 0x72,0xC8, //0xCe 0xCc
+ 0x73,0xff, //0xFe 0xFb
+ 0x74,0x13, //0x13 0x10
+ 0x75,0x25, //0x25 0x21
+ 0x76,0x08, //0x08 0x0f
+ 0x77,0xf8, //0xec 0xf8
+ 0x78,0xc0, //0xd1 0xc0
+ 0x79,0x48, //0x47 0x48
+
+ // Color matrix (D20) - A
+ 0x83,0x34, //0x3c
+ 0x84,0xd4, //0xc6
+ 0x85,0xf8, //0xff
+ 0x86,0x12, //0x12
+ 0x87,0x25, //0x24
+ 0x88,0x09, //0x0a
+ 0x89,0xf0, //0xed
+ 0x8a,0xbe, //0xc2
+ 0x8b,0x54, //0x51
+
+
+ 0x8c,0x10, //CMA select
+
+ //G Edge
+ 0x90,0x30, //Upper gain
+ 0x91,0x40, //down gain
+ 0x92,0x33,//22}}, //[7:4] upper coring [3:0] down coring
+ 0x9a,0x40,
+ 0x9b,0x40,
+ 0x9c,0x38, //edge suppress start 30
+ 0x9d,0x30, //edge suppress slope
+
+ 0x9f,0x26,
+ 0xa0,0x11,
+
+ 0xa8,0x11,//10}},
+ 0xa9,0x11,//10}},
+ 0xaa,0x11,
+
+ 0xbf,0x20,
+
+ 0xb9,0x28,//30}}, // nightmode 38 at gain 0x48 5fps
+ 0xba,0x41,//44}}, // nightmode 80 at gain 0x48 5fps
+ 0xde,0x80,
+
+ 0xe5,0x15,
+ 0xe6,0x02,
+ 0xe7,0x04,
+
+ //Sensor On //Sensor On
+ 0x00,0x01,
+ 0x03,0x01,
+
+ 0x00,0x00,
+#endif
+};
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718-gt7302-gmt.h b/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718-gt7302-gmt.h
new file mode 100755
index 00000000..986da258
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718-gt7302-gmt.h
@@ -0,0 +1,992 @@
+
+#ifndef __SP0718_H_
+#define __SP0718_H_
+
+#define SP0718_NORMAL_Y0ffset 0x20
+#define SP0718_LOWLIGHT_Y0ffset 0x25
+//AE target
+#define SP0718_P1_0xeb 0x78
+#define SP0718_P1_0xec 0x6c
+//HEQ
+#define SP0718_P1_0x10 0x00//outdoor
+#define SP0718_P1_0x14 0x1e //0x18
+#define SP0718_P1_0x11 0x00//nr
+#define SP0718_P1_0x15 0x14 //0x10
+#define SP0718_P1_0x12 0x00//dummy
+#define SP0718_P1_0x16 0x14 //0x10
+#define SP0718_P1_0x13 0x00//low
+#define SP0718_P1_0x17 0x08
+//AWB pre gain
+#define SP0718_P2_0x26 0xc8
+#define SP0718_P2_0x27 0xb6
+//SAT u
+#define SP0718_P1_0xd3 0x9c
+#define SP0718_P1_0xd4 0x98
+#define SP0718_P1_0xd5 0x8c
+#define SP0718_P1_0xd6 0x84
+//SAT v
+#define SP0718_P1_0xd7 0x9c
+#define SP0718_P1_0xd8 0x98
+#define SP0718_P1_0xd9 0x8c
+#define SP0718_P1_0xda 0x84
+
+
+// Scene Mode
+uint8_t sp0718_scene_mode_auto[] = {
+ 0xfd,0x01,
+ 0xcd,SP0718_NORMAL_Y0ffset,
+ 0xce,0x1f,
+ //capture preview daylight 24M 50hz 15-8FPS
+
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xb0,
+ 0x06,0x00,
+ 0x09,0x03,
+ 0x0a,0x31,
+ 0xfd,0x01,
+ 0xef,0x48,
+ 0xf0,0x00,
+ 0x02,0x0e,
+ 0x03,0x01,
+ 0x06,0x42,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Status,
+ 0xfd,0x02,
+ 0xbe,0xf0,
+ 0xbf,0x03,
+ 0xd0,0xf0,
+ 0xd1,0x03,
+ 0xfd,0x01,
+ 0x5b,0x03,
+ 0x5c,0xf0,
+
+
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_scene_mode_night[] = {
+ 0xfd,0x01,
+ 0xcd,SP0718_LOWLIGHT_Y0ffset,
+ 0xce,0x1f,
+ //capture preview night 24M 50hz 15-6FPS
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xce,
+ 0x06,0x00,
+ 0x09,0x02,
+ 0x0a,0xc4,
+ 0xfd,0x01,
+ 0xef,0x4d,
+ 0xf0,0x00,
+ 0x02,0x10,
+ 0x03,0x01,
+ 0x06,0x47,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Statu
+ 0xfd,0x02,
+ 0xbe,0xd0,
+ 0xbf,0x04,
+ 0xd0,0xd0,
+ 0xd1,0x04,
+ 0xfd,0x01,
+ 0x5b,0x04,
+ 0x5c,0xd0,
+
+ 0xfd,0x00,
+};
+
+// White Balance
+uint8_t sp0718_wb_auto[] = {
+ 0xfd,0x01,
+ 0x32,0x15,
+ 0xfd,0x02,
+ 0x26,0xc8,
+ 0x27,0xb6,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_incandescent[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xaa,
+ 0x27,0xce,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_fluorescent[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0x91,
+ 0x27,0xc8,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_daylight[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xc8,
+ 0x27,0x89,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_cloudy[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xdc,
+ 0x27,0x75,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_tungsten[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0x75,
+ 0x27,0xe2,
+ 0xfd,0x00,
+};
+
+
+// Exposure
+uint8_t sp0718_exposure_neg2[] = {
+ 0xfd,0x01,
+ 0xdb,0xe0,//level -3
+};
+
+uint8_t sp0718_exposure_neg1[] = {
+ 0xfd,0x01,
+ 0xdb,0xf0,
+};
+
+uint8_t sp0718_exposure_zero[] = {
+ 0xfd,0x01,
+ 0xdb,0x00,//level -3
+};
+
+uint8_t sp0718_exposure_pos1[] = {
+ 0xfd,0x01,
+ 0xdb,0x10,
+};
+
+uint8_t sp0718_exposure_pos2[] = {
+ 0xfd,0x01,
+ 0xdb,0x20,
+};
+
+
+// Color Effect
+uint8_t sp0718_colorfx_none[] = {
+ 0xfd, 0x01,
+ 0x66, 0x00,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_bw[] = {
+ 0xfd, 0x01,
+ 0x66, 0x20,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_sepia[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0xc0,
+ 0x68, 0x20,
+};
+
+uint8_t sp0718_colorfx_negative[] = {
+ //Negative
+ 0xfd, 0x01,
+ 0x66, 0x04,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_emboss[] = {
+};
+
+uint8_t sp0718_colorfx_sketch[] = {
+};
+
+uint8_t sp0718_colorfx_sky_blue[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0x20,
+ 0x68, 0xf0,
+};
+
+uint8_t sp0718_colorfx_grass_green[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0x20,
+ 0x68, 0x20,
+};
+
+uint8_t sp0718_colorfx_skin_whiten[] = {
+};
+
+uint8_t sp0718_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sp0718_brightness_neg4[] = {
+ 0xfd,0x01,
+ 0xdb,0xc0,
+};
+
+uint8_t sp0718_brightness_neg3[] = {
+ 0xfd,0x01,
+ 0xdb,0xd0,
+};
+
+uint8_t sp0718_brightness_neg2[] = {
+ 0xfd,0x01,
+ 0xdb,0xe0,
+};
+
+uint8_t sp0718_brightness_neg1[] = {
+ 0xfd,0x01,
+ 0xdb,0xf0,
+};
+
+uint8_t sp0718_brightness_zero[] = {
+ 0xfd,0x01,
+ 0xdb,0x00
+};
+
+uint8_t sp0718_brightness_pos1[] = {
+ 0xfd,0x01,
+ 0xdb,0x10,
+};
+
+uint8_t sp0718_brightness_pos2[] = {
+ 0xfd,0x01,
+ 0xdb,0x20,
+};
+
+uint8_t sp0718_brightness_pos3[] = {
+ 0xfd,0x01,
+ 0xdb,0x30,
+};
+
+uint8_t sp0718_brightness_pos4[] = {
+ 0xfd,0x01,
+ 0xdb,0x40,
+};
+
+
+// contrast
+uint8_t sp0718_contrast_neg4[] = {
+ //level -4
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x10,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x10,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x10,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg3[] = {
+ //level -3
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x0c,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x0c,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x0c,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg2[] = {
+ //level -2
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x08,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x08,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x08,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg1[] = {
+ //level -1
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x04,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x04,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x04,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_zero[] = {
+ //level 0
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_pos1[] = {
+ //level +1
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x08, //out
+ 0x14,SP0718_P1_0x14+0x08,
+ 0x11,SP0718_P1_0x11+0x08, //nr
+ 0x15,SP0718_P1_0x15+0x08,
+ 0x12,SP0718_P1_0x12+0x08, //dummy
+ 0x16,SP0718_P1_0x16+0x08,
+ 0x13,SP0718_P1_0x13+0x08, //low
+ 0x17,SP0718_P1_0x17+0x08,
+};
+
+uint8_t sp0718_contrast_pos2[] = {
+ //level +2
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x10, //out
+ 0x14,SP0718_P1_0x14+0x10,
+ 0x11,SP0718_P1_0x11+0x10, //nr
+ 0x15,SP0718_P1_0x15+0x10,
+ 0x12,SP0718_P1_0x12+0x10, //dummy
+ 0x16,SP0718_P1_0x16+0x10,
+ 0x13,SP0718_P1_0x13+0x10, //low
+ 0x17,SP0718_P1_0x17+0x10,
+};
+
+uint8_t sp0718_contrast_pos3[] = {
+ //level +3
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x18, //out
+ 0x14,SP0718_P1_0x14+0x18,
+ 0x11,SP0718_P1_0x11+0x18, //nr
+ 0x15,SP0718_P1_0x15+0x18,
+ 0x12,SP0718_P1_0x12+0x18, //dummy
+ 0x16,SP0718_P1_0x16+0x18,
+ 0x13,SP0718_P1_0x13+0x18, //low
+ 0x17,SP0718_P1_0x17+0x18,
+};
+
+uint8_t sp0718_contrast_pos4[] = {
+ //level +4
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x20, //out
+ 0x14,SP0718_P1_0x14+0x20,
+ 0x11,SP0718_P1_0x11+0x20, //nr
+ 0x15,SP0718_P1_0x15+0x20,
+ 0x12,SP0718_P1_0x12+0x20, //dummy
+ 0x16,SP0718_P1_0x16+0x20,
+ 0x13,SP0718_P1_0x13+0x20, //low
+ 0x17,SP0718_P1_0x17+0x20,
+};
+
+// saturation
+uint8_t sp0718_saturation_neg4[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x20,
+ 0xd4,SP0718_P1_0xd4-0x20,
+ 0xd5,SP0718_P1_0xd5-0x20,
+ 0xd6,SP0718_P1_0xd6-0x20,
+ //sat v -0x20
+ 0xd7,SP0718_P1_0xd7-0x20,
+ 0xd8,SP0718_P1_0xd8-0x20,
+ 0xd9,SP0718_P1_0xd9-0x20,
+ 0xda,SP0718_P1_0xda-0x20,
+};
+
+uint8_t sp0718_saturation_neg3[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x18,
+ 0xd4,SP0718_P1_0xd4-0x18,
+ 0xd5,SP0718_P1_0xd5-0x18,
+ 0xd6,SP0718_P1_0xd6-0x18,
+ //sat v -0x18
+ 0xd7,SP0718_P1_0xd7-0x18,
+ 0xd8,SP0718_P1_0xd8-0x18,
+ 0xd9,SP0718_P1_0xd9-0x18,
+ 0xda,SP0718_P1_0xda-0x18,
+};
+
+uint8_t sp0718_saturation_neg2[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x10,
+ 0xd4,SP0718_P1_0xd4-0x10,
+ 0xd5,SP0718_P1_0xd5-0x10,
+ 0xd6,SP0718_P1_0xd6-0x10,
+ //sat v -0x10
+ 0xd7,SP0718_P1_0xd7-0x10,
+ 0xd8,SP0718_P1_0xd8-0x10,
+ 0xd9,SP0718_P1_0xd9-0x10,
+ 0xda,SP0718_P1_0xda-0x10,
+};
+
+uint8_t sp0718_saturation_neg1[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x08,
+ 0xd4,SP0718_P1_0xd4-0x08,
+ 0xd5,SP0718_P1_0xd5-0x08,
+ 0xd6,SP0718_P1_0xd6-0x08,
+ //sat v -0x08
+ 0xd7,SP0718_P1_0xd7-0x08,
+ 0xd8,SP0718_P1_0xd8-0x08,
+ 0xd9,SP0718_P1_0xd9-0x08,
+ 0xda,SP0718_P1_0xda-0x08,
+};
+
+uint8_t sp0718_saturation_zero[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3,
+ 0xd4,SP0718_P1_0xd4,
+ 0xd5,SP0718_P1_0xd5,
+ 0xd6,SP0718_P1_0xd6,
+ //sat v
+ 0xd7,SP0718_P1_0xd7,
+ 0xd8,SP0718_P1_0xd8,
+ 0xd9,SP0718_P1_0xd9,
+ 0xda,SP0718_P1_0xda,
+};
+
+uint8_t sp0718_saturation_pos1[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x08,
+ 0xd4,SP0718_P1_0xd4+0x08,
+ 0xd5,SP0718_P1_0xd5+0x08,
+ 0xd6,SP0718_P1_0xd6+0x08,
+ //sat v +0x08
+ 0xd7,SP0718_P1_0xd7+0x08,
+ 0xd8,SP0718_P1_0xd8+0x08,
+ 0xd9,SP0718_P1_0xd9+0x08,
+ 0xda,SP0718_P1_0xda+0x08,
+};
+
+uint8_t sp0718_saturation_pos2[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x10,
+ 0xd4,SP0718_P1_0xd4+0x10,
+ 0xd5,SP0718_P1_0xd5+0x10,
+ 0xd6,SP0718_P1_0xd6+0x10,
+ //sat v +0x10
+ 0xd7,SP0718_P1_0xd7+0x10,
+ 0xd8,SP0718_P1_0xd8+0x10,
+ 0xd9,SP0718_P1_0xd9+0x10,
+ 0xda,SP0718_P1_0xda+0x10,
+};
+
+uint8_t sp0718_saturation_pos3[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x18,
+ 0xd4,SP0718_P1_0xd4+0x18,
+ 0xd5,SP0718_P1_0xd5+0x18,
+ 0xd6,SP0718_P1_0xd6+0x18,
+ //sat v +0x18
+ 0xd7,SP0718_P1_0xd7+0x18,
+ 0xd8,SP0718_P1_0xd8+0x18,
+ 0xd9,SP0718_P1_0xd9+0x18,
+ 0xda,SP0718_P1_0xda+0x18,
+};
+
+uint8_t sp0718_saturation_pos4[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x20,
+ 0xd4,SP0718_P1_0xd4+0x20,
+ 0xd5,SP0718_P1_0xd5+0x20,
+ 0xd6,SP0718_P1_0xd6+0x20,
+ //sat v +0x20
+ 0xd7,SP0718_P1_0xd7+0x20,
+ 0xd8,SP0718_P1_0xd8+0x20,
+ 0xd9,SP0718_P1_0xd9+0x20,
+ 0xda,SP0718_P1_0xda+0x20,
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t sp0718_176x144[]={
+};
+
+// QVGA
+uint8_t sp0718_320x240[]={
+};
+
+// CIF
+uint8_t sp0718_352x288[]={
+};
+
+// VGA
+uint8_t sp0718_640x480[]={
+ 0xfd,0x01,
+ 0x4a,0x00,
+ 0x4b,0x01,
+ 0x4c,0xe0,
+ 0x4d,0x00,
+ 0x4e,0x02,
+ 0x4f,0x80,
+
+ 0xfd,0x02,
+ 0x0f,0x00, //1//subsampledisable
+
+ 0xfd,0x00,
+ 0x30,0x00,
+};
+
+// SVGA
+uint8_t sp0718_800x600[]={
+};
+
+// XGA
+uint8_t sp0718_1024x768[]={
+};
+
+// 720p
+uint8_t sp0718_1280x720[]={
+};
+
+// UXGA
+uint8_t sp0718_1600x1200[]={
+};
+
+// 1080p
+uint8_t sp0718_1920x1080[]={
+};
+
+// QXGA
+uint8_t sp0718_2048x1536[]={
+};
+
+uint8_t sp0718_2592x1944[]={
+};
+
+// Initiliztion
+uint8_t sp0718_default_regs_init[] = {
+ 0xfd,0x00,
+ 0x1C,0x00,
+ 0x31,0x10,
+ 0x27,0xb3,//0xb3 //2x gain
+
+ 0x1b,0x17, // driver
+ 0x1f,0x30,
+ 0x30,0x00, // div clk
+
+ 0x26,0xaa,
+ 0x37,0x02,
+ 0x28,0x8f,
+ 0x1a,0x73,
+ 0x1e,0x1b,
+ 0x21,0x06, //blackout voltage
+ 0x22,0x2a, //colbias
+ 0x0f,0x3f,
+ 0x10,0x3e,
+ 0x11,0x00,
+ 0x12,0x01,
+ 0x13,0x3f,
+ 0x14,0x04,
+ 0x15,0x30,
+ 0x16,0x31,
+ 0x17,0x01,
+ 0x69,0x31,
+ 0x6a,0x2a,
+ 0x6b,0x33,
+ 0x6c,0x1a,
+ 0x6d,0x32,
+ 0x6e,0x28,
+ 0x6f,0x29,
+ 0x70,0x34,
+ 0x71,0x18,
+ 0x36,0x00,//02 delete badframe
+ 0xfd,0x01,
+ 0x5d,0x51,//position
+ 0xf2,0x19,
+
+ //Blacklevel
+ 0x1f,0x10,
+ 0x20,0x1f,
+ //pregain
+ 0xfd,0x02,
+ 0x00,0x88,
+ 0x01,0x88,
+ //SI15_SP0718 24M 50Hz 15-8fps
+
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xb0,
+ 0x06,0x00,
+ 0x09,0x03,
+ 0x0a,0x31,
+ 0xfd,0x01,
+ 0xef,0x48,
+ 0xf0,0x00,
+ 0x02,0x0e,
+ 0x03,0x01,
+ 0x06,0x42,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Status,
+ 0xfd,0x02,
+ 0xbe,0xf0,
+ 0xbf,0x03,
+ 0xd0,0xf0,
+ 0xd1,0x03,
+ 0xfd,0x01,
+ 0x5b,0x03,
+ 0x5c,0xf0,
+
+ //rpc
+ 0xfd,0x01,
+ 0xe0,0x40,////24//4c//48//4c//44//4c//3e//3c//3a//38//rpc_1base_max
+ 0xe1,0x30,////24//3c//38//3c//36//3c//30//2e//2c//2a//rpc_2base_max
+ 0xe2,0x2e,////24//34//30//34//2e//34//2a//28//26//26//rpc_3base_max
+ 0xe3,0x2a,////24//2a//2e//2c//2e//2a//2e//26//24//22//rpc_4base_max
+ 0xe4,0x2a,////24//2a//2e//2c//2e//2a//2e//26//24//22//rpc_5base_max
+ 0xe5,0x28,////24//2c//2a//2c//28//2c//24//22//20//rpc_6base_max
+ 0xe6,0x28,////24//2c//2a//2c//28//2c//24//22//20//rpc_7base_max
+ 0xe7,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_8base_max
+ 0xe8,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_9base_max
+ 0xe9,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_10base_max
+ 0xea,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_11base_max
+ 0xf3,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_12base_max
+ 0xf4,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_13base_max
+ //ae gain &status
+ 0xfd,0x01,
+ 0x04,0xe0,//rpc_max_indr
+ 0x05,0x26,//1e//rpc_min_indr
+ 0x0a,0xa0,//rpc_max_outdr
+ 0x0b,0x26,//rpc_min_outdr
+ 0x5a,0x40,//dp rpc
+ 0xfd,0x02,
+ 0xbc,0xa0,//rpc_heq_low
+ 0xbd,0x80,//rpc_heq_dummy
+ 0xb8,0x80,//mean_normal_dummy
+ 0xb9,0x90,//mean_dummy_normal
+
+ //ae target
+ 0xfd,0x01,
+ 0xeb,SP0718_P1_0xeb,//78
+ 0xec,SP0718_P1_0xec,//78
+ 0xed,0x0a,
+ 0xee,0x10,
+
+ //lsc
+ 0xfd,0x01,
+ 0x26,0x30,
+ 0x27,0x2c,
+ 0x28,0x07,
+ 0x29,0x08,
+ 0x2a,0x40,
+ 0x2b,0x03,
+ 0x2c,0x00,
+ 0x2d,0x00,
+
+ 0xa1,0x24,
+ 0xa2,0x27,
+ 0xa3,0x27,
+ 0xa4,0x2b,
+ 0xa5,0x1c,
+ 0xa6,0x1a,
+ 0xa7,0x1a,
+ 0xa8,0x1a,
+ 0xa9,0x18,
+ 0xaa,0x1c,
+ 0xab,0x17,
+ 0xac,0x17,
+ 0xad,0x08,
+ 0xae,0x08,
+ 0xaf,0x08,
+ 0xb0,0x00,
+ 0xb1,0x00,
+ 0xb2,0x00,
+ 0xb3,0x00,
+ 0xb4,0x00,
+ 0xb5,0x02,
+ 0xb6,0x06,
+ 0xb7,0x00,
+ 0xb8,0x00,
+
+
+ //DP
+ 0xfd,0x01,
+ 0x48,0x09,
+ 0x49,0x99,
+
+ //awb
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x00,
+ 0xe7,0x03,
+ 0xfd,0x02,
+ 0x26,0xc8,
+ 0x27,0xb6,
+ 0xfd,0x00,
+ 0xe7,0x00,
+ 0xfd,0x02,
+ 0x1b,0x80,
+ 0x1a,0x80,
+ 0x18,0x26,
+ 0x19,0x28,
+ 0xfd,0x02,
+ 0x2a,0x00,
+ 0x2b,0x08,
+ 0x28,0xef,//0xa0//f8
+ 0x29,0x20,
+
+ //d65 90 e2 93
+ 0x66,0x42,//0x59//0x60////0x58//4e//0x48
+ 0x67,0x62,//0x74//0x70//0x78//6b//0x69
+ 0x68,0xee,//0xd6//0xe3//0xd5//cb//0xaa
+ 0x69,0x18,//0xf4//0xf3//0xf8//ed
+ 0x6a,0xa6,//0xa5
+ //indoor 91
+ 0x7c,0x3b,//0x45//30//41//0x2f//0x44
+ 0x7d,0x5b,//0x70//60//55//0x4b//0x6f
+ 0x7e,0x15,//0a//0xed
+ 0x7f,0x39,//23//0x28
+ 0x80,0xaa,//0xa6
+ //cwf 92
+ 0x70,0x3e,//0x38//41//0x3b
+ 0x71,0x59,//0x5b//5f//0x55
+ 0x72,0x31,//0x30//22//0x28
+ 0x73,0x4f,//0x54//44//0x45
+ 0x74,0xaa,
+ //tl84 93
+ 0x6b,0x1b,//0x18//11
+ 0x6c,0x3a,//0x3c//25//0x2f
+ 0x6d,0x3e,//0x3a//35
+ 0x6e,0x59,//0x5c//46//0x52
+ 0x6f,0xaa,
+ //f 94
+ 0x61,0xea,//0x03//0x00//f4//0xed
+ 0x62,0x03,//0x1a//0x25//0f//0f
+ 0x63,0x6a,//0x62//0x60//52//0x5d
+ 0x64,0x8a,//0x7d//0x85//70//0x75//0x8f
+ 0x65,0x6a,//0xaa//6a
+
+ 0x75,0x80,
+ 0x76,0x20,
+ 0x77,0x00,
+ 0x24,0x25,
+
+ //针对室内调偏不过灯箱测试使用//针对人脸调偏
+ 0x20,0xd8,
+ 0x21,0xa3,//82//a8偏暗照度还有调偏
+ 0x22,0xd0,//e3//bc
+ 0x23,0x86,
+
+ //outdoor r\b range
+ 0x78,0xc3,//d8
+ 0x79,0xba,//82
+ 0x7a,0xa6,//e3
+ 0x7b,0x99,//86
+
+
+ //skin
+ 0x08,0x15,//
+ 0x09,0x04,//
+ 0x0a,0x20,//
+ 0x0b,0x12,//
+ 0x0c,0x27,//
+ 0x0d,0x06,//
+ 0x0e,0x63,//
+
+ //wt th
+ 0x3b,0x10,
+ //gw
+ 0x31,0x60,
+ 0x32,0x60,
+ 0x33,0xc0,
+ 0x35,0x6f,
+
+ // sharp
+ 0xfd,0x02,
+ 0xde,0x0f,
+ 0xd2,0x02,//6//控制黑白边;0-边粗,f-变细
+ 0xd3,0x06,
+ 0xd4,0x06,
+ 0xd5,0x06,
+ 0xd7,0x20,//10//2x根据增益判断轮廓阈值
+ 0xd8,0x30,//24//1A//4x
+ 0xd9,0x38,//28//8x
+ 0xda,0x38,//16x
+ 0xdb,0x08,//
+ 0xe8,0x58,//48//轮廓强度
+ 0xe9,0x48,
+ 0xea,0x30,
+ 0xeb,0x20,
+ 0xec,0x48,//60//80
+ 0xed,0x48,//50//60
+ 0xee,0x30,
+ 0xef,0x20,
+ //平坦区域锐化力度
+ 0xf3,0x50,
+ 0xf4,0x10,
+ 0xf5,0x10,
+ 0xf6,0x10,
+ //dns
+ 0xfd,0x01,
+ 0x64,0x44,//沿方向边缘平滑力度 //0-最强,8-最弱
+ 0x65,0x22,
+ 0x6d,0x04,//8//强平滑(平坦)区域平滑阈值
+ 0x6e,0x06,//8
+ 0x6f,0x10,
+ 0x70,0x10,
+ 0x71,0x08,//0d//弱平滑(非平坦)区域平滑阈值
+ 0x72,0x12,//1b
+ 0x73,0x1c,//20
+ 0x74,0x24,
+ 0x75,0x44,//[7:4]平坦区域强度,[3:0]非平坦区域强度;0-最强,8-最弱;
+ 0x76,0x02,//46
+ 0x77,0x02,//33
+ 0x78,0x02,
+ 0x81,0x10,//18//2x//根据增益判定区域阈值,低于这个做强平滑、大于这个做弱平滑;
+ 0x82,0x20,//30//4x
+ 0x83,0x30,//40//8x
+ 0x84,0x48,//50//16x
+ 0x85,0x0c,//12/8+reg0x81 第二阈值,在平坦和非平坦区域做连接
+ 0xfd,0x02,
+ 0xdc,0x0f,
+
+ //gamma
+ 0xfd,0x01,
+ 0x8b,0x00,//00//00
+ 0x8c,0x0c,//0c//09
+ 0x8d,0x19,//19//17
+ 0x8e,0x25,//25//24
+ 0x8f,0x30,//30//33
+ 0x90,0x44,//44//47
+ 0x91,0x4e,//54//58
+ 0x92,0x5f,//61//64
+ 0x93,0x6c,//6d//70
+ 0x94,0x82,//80//81
+ 0x95,0x94,//92//8f
+ 0x96,0xa6,//a1//9b
+ 0x97,0xb2,//ad//a5
+ 0x98,0xbf,//ba//b0
+ 0x99,0xc9,//c4//ba
+ 0x9a,0xd1,//cf//c4
+ 0x9b,0xd8,//d7//ce
+ 0x9c,0xe0,//e0//d7
+ 0x9d,0xe8,//e8//e1
+ 0x9e,0xef,//ef//ea
+ 0x9f,0xf8,//f7//f5
+ 0xa0,0xff,//ff//ff
+ //CCM
+ 0xfd,0x02,
+ 0x15,0xd0,//b>th
+ 0x16,0x95,//ri2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, sp0718_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, sp0718_640x480),
+};
+
+#define FILP_REG_INIT_VALUE 0x10
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = sp0718_wb_auto;
+ size = ARRAY_SIZE(sp0718_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = sp0718_wb_incandescent;
+ size = ARRAY_SIZE(sp0718_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = sp0718_wb_daylight;
+ size = ARRAY_SIZE(sp0718_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = sp0718_wb_cloudy;
+ size = ARRAY_SIZE(sp0718_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = sp0718_wb_fluorescent;
+ size = ARRAY_SIZE(sp0718_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = sp0718_scene_mode_auto;
+ size = ARRAY_SIZE(sp0718_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = sp0718_scene_mode_night;
+ size = ARRAY_SIZE(sp0718_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = sp0718_exposure_neg2;
+ size = ARRAY_SIZE(sp0718_exposure_neg2);
+ break;
+ case -1:
+ regs = sp0718_exposure_neg1;
+ size = ARRAY_SIZE(sp0718_exposure_neg1);
+ break;
+ case 0:
+ regs = sp0718_exposure_zero;
+ size = ARRAY_SIZE(sp0718_exposure_zero);
+ break;
+ case 1:
+ regs = sp0718_exposure_pos1;
+ size = ARRAY_SIZE(sp0718_exposure_pos1);
+ break;
+ case 2:
+ regs = sp0718_exposure_pos2;
+ size = ARRAY_SIZE(sp0718_exposure_pos2);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0;
+ uint8_t retry_times=0;
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+ tmp=data | FILP_REG_INIT_VALUE;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint8_t data = 0;
+
+ sensor_write(sd, 0xfd, 0x0);
+ data = sensor_read(sd, 0x02);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, sp0718_default_regs_init,
+ ARRAY_SIZE(sp0718_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, sp0718_default_regs_exit,
+ ARRAY_SIZE(sp0718_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops sp0718_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev sp0718 = {
+ .name = "sp0718",
+ .i2c_addr = 0x21,
+ .id = 0x71,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &sp0718_ops,
+};
+
+#if 0
+static int __init sp0718_init(void)
+{
+ return cmos_register_sudbdev(&sp0718);
+}
+
+static void __exit sp0718_exit(void)
+{
+ return cmos_unregister_subdev(&sp0718);
+}
+
+module_init(sp0718_init);
+module_exit(sp0718_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718.h b/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718.h
new file mode 100755
index 00000000..e868f6c0
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp0718/sp0718.h
@@ -0,0 +1,990 @@
+
+#ifndef __SP0718_H_
+#define __SP0718_H_
+
+#define SP0718_NORMAL_Y0ffset 0x20
+#define SP0718_LOWLIGHT_Y0ffset 0x25
+//AE target
+#define SP0718_P1_0xeb 0x78
+#define SP0718_P1_0xec 0x6c
+//HEQ
+#define SP0718_P1_0x10 0x00//outdoor
+#define SP0718_P1_0x14 0x20
+#define SP0718_P1_0x11 0x00//nr
+#define SP0718_P1_0x15 0x14
+#define SP0718_P1_0x12 0x00//dummy
+#define SP0718_P1_0x16 0x10
+#define SP0718_P1_0x13 0x00//low
+#define SP0718_P1_0x17 0x08
+//AWB pre gain
+#define SP0718_P2_0x26 0xc8
+#define SP0718_P2_0x27 0xb6
+//SAT u
+#define SP0718_P1_0xd3 0x9c
+#define SP0718_P1_0xd4 0x98
+#define SP0718_P1_0xd5 0x8c
+#define SP0718_P1_0xd6 0x84
+//SAT v
+#define SP0718_P1_0xd7 0x9c
+#define SP0718_P1_0xd8 0x98
+#define SP0718_P1_0xd9 0x8c
+#define SP0718_P1_0xda 0x84
+
+
+// Scene Mode
+uint8_t sp0718_scene_mode_auto[] = {
+ 0xfd,0x01,
+ 0xcd,SP0718_NORMAL_Y0ffset,
+ 0xce,0x1f,
+ //capture preview daylight 24M 50hz 15-8FPS
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xce,
+ 0x06,0x00,
+ 0x09,0x02,
+ 0x0a,0xc4,
+ 0xfd,0x01,
+ 0xef,0x4d,
+ 0xf0,0x00,
+ 0x02,0x0c,
+ 0x03,0x01,
+ 0x06,0x47,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Status
+ 0xfd,0x02,
+ 0xbe,0x9c,
+ 0xbf,0x03,
+ 0xd0,0x9c,
+ 0xd1,0x03,
+ 0xfd,0x01,
+ 0x5b,0x03,
+ 0x5c,0x9c,
+
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_scene_mode_night[] = {
+ 0xfd,0x01,
+ 0xcd,SP0718_LOWLIGHT_Y0ffset,
+ 0xce,0x1f,
+ //capture preview night 24M 50hz 15-6FPS
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xce,
+ 0x06,0x00,
+ 0x09,0x02,
+ 0x0a,0xc4,
+ 0xfd,0x01,
+ 0xef,0x4d,
+ 0xf0,0x00,
+ 0x02,0x10,
+ 0x03,0x01,
+ 0x06,0x47,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Statu
+ 0xfd,0x02,
+ 0xbe,0xd0,
+ 0xbf,0x04,
+ 0xd0,0xd0,
+ 0xd1,0x04,
+ 0xfd,0x01,
+ 0x5b,0x04,
+ 0x5c,0xd0,
+
+ 0xfd,0x00,
+};
+
+// White Balance
+uint8_t sp0718_wb_auto[] = {
+ 0xfd,0x01,
+ 0x32,0x15,
+ 0xfd,0x02,
+ 0x26,0xc8,
+ 0x27,0xb6,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_incandescent[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xaa,
+ 0x27,0xce,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_fluorescent[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0x91,
+ 0x27,0xc8,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_daylight[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xc8,
+ 0x27,0x89,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_cloudy[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0xdc,
+ 0x27,0x75,
+ 0xfd,0x00,
+};
+
+uint8_t sp0718_wb_tungsten[] = {
+ 0xfd,0x01,
+ 0x32,0x05,
+ 0xfd,0x02,
+ 0x26,0x75,
+ 0x27,0xe2,
+ 0xfd,0x00,
+};
+
+
+// Exposure
+uint8_t sp0718_exposure_neg2[] = {
+ 0xfd,0x01,
+ 0xdb,0xe0,//level -3
+};
+
+uint8_t sp0718_exposure_neg1[] = {
+ 0xfd,0x01,
+ 0xdb,0xf0,
+};
+
+uint8_t sp0718_exposure_zero[] = {
+ 0xfd,0x01,
+ 0xdb,0x00,//level -3
+};
+
+uint8_t sp0718_exposure_pos1[] = {
+ 0xfd,0x01,
+ 0xdb,0x10,
+};
+
+uint8_t sp0718_exposure_pos2[] = {
+ 0xfd,0x01,
+ 0xdb,0x20,
+};
+
+
+// Color Effect
+uint8_t sp0718_colorfx_none[] = {
+ 0xfd, 0x01,
+ 0x66, 0x00,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_bw[] = {
+ 0xfd, 0x01,
+ 0x66, 0x20,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_sepia[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0xc0,
+ 0x68, 0x20,
+};
+
+uint8_t sp0718_colorfx_negative[] = {
+ //Negative
+ 0xfd, 0x01,
+ 0x66, 0x04,
+ 0x67, 0x80,
+ 0x68, 0x80,
+};
+
+uint8_t sp0718_colorfx_emboss[] = {
+};
+
+uint8_t sp0718_colorfx_sketch[] = {
+};
+
+uint8_t sp0718_colorfx_sky_blue[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0x20,
+ 0x68, 0xf0,
+};
+
+uint8_t sp0718_colorfx_grass_green[] = {
+ 0xfd, 0x01,
+ 0x66, 0x10,
+ 0x67, 0x20,
+ 0x68, 0x20,
+};
+
+uint8_t sp0718_colorfx_skin_whiten[] = {
+};
+
+uint8_t sp0718_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sp0718_brightness_neg4[] = {
+ 0xfd,0x01,
+ 0xdb,0xc0,
+};
+
+uint8_t sp0718_brightness_neg3[] = {
+ 0xfd,0x01,
+ 0xdb,0xd0,
+};
+
+uint8_t sp0718_brightness_neg2[] = {
+ 0xfd,0x01,
+ 0xdb,0xe0,
+};
+
+uint8_t sp0718_brightness_neg1[] = {
+ 0xfd,0x01,
+ 0xdb,0xf0,
+};
+
+uint8_t sp0718_brightness_zero[] = {
+ 0xfd,0x01,
+ 0xdb,0x00
+};
+
+uint8_t sp0718_brightness_pos1[] = {
+ 0xfd,0x01,
+ 0xdb,0x10,
+};
+
+uint8_t sp0718_brightness_pos2[] = {
+ 0xfd,0x01,
+ 0xdb,0x20,
+};
+
+uint8_t sp0718_brightness_pos3[] = {
+ 0xfd,0x01,
+ 0xdb,0x30,
+};
+
+uint8_t sp0718_brightness_pos4[] = {
+ 0xfd,0x01,
+ 0xdb,0x40,
+};
+
+
+// contrast
+uint8_t sp0718_contrast_neg4[] = {
+ //level -4
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x10,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x10,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x10,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg3[] = {
+ //level -3
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x0c,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x0c,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x0c,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg2[] = {
+ //level -2
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x08,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x08,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x08,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_neg1[] = {
+ //level -1
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14-0x04,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15-0x04,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16-0x04,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_zero[] = {
+ //level 0
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10, //out
+ 0x14,SP0718_P1_0x14,
+ 0x11,SP0718_P1_0x11, //nr
+ 0x15,SP0718_P1_0x15,
+ 0x12,SP0718_P1_0x12, //dummy
+ 0x16,SP0718_P1_0x16,
+ 0x13,SP0718_P1_0x13, //low
+ 0x17,SP0718_P1_0x17,
+};
+
+uint8_t sp0718_contrast_pos1[] = {
+ //level +1
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x08, //out
+ 0x14,SP0718_P1_0x14+0x08,
+ 0x11,SP0718_P1_0x11+0x08, //nr
+ 0x15,SP0718_P1_0x15+0x08,
+ 0x12,SP0718_P1_0x12+0x08, //dummy
+ 0x16,SP0718_P1_0x16+0x08,
+ 0x13,SP0718_P1_0x13+0x08, //low
+ 0x17,SP0718_P1_0x17+0x08,
+};
+
+uint8_t sp0718_contrast_pos2[] = {
+ //level +2
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x10, //out
+ 0x14,SP0718_P1_0x14+0x10,
+ 0x11,SP0718_P1_0x11+0x10, //nr
+ 0x15,SP0718_P1_0x15+0x10,
+ 0x12,SP0718_P1_0x12+0x10, //dummy
+ 0x16,SP0718_P1_0x16+0x10,
+ 0x13,SP0718_P1_0x13+0x10, //low
+ 0x17,SP0718_P1_0x17+0x10,
+};
+
+uint8_t sp0718_contrast_pos3[] = {
+ //level +3
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x18, //out
+ 0x14,SP0718_P1_0x14+0x18,
+ 0x11,SP0718_P1_0x11+0x18, //nr
+ 0x15,SP0718_P1_0x15+0x18,
+ 0x12,SP0718_P1_0x12+0x18, //dummy
+ 0x16,SP0718_P1_0x16+0x18,
+ 0x13,SP0718_P1_0x13+0x18, //low
+ 0x17,SP0718_P1_0x17+0x18,
+};
+
+uint8_t sp0718_contrast_pos4[] = {
+ //level +4
+ 0xfd,0x01,
+ 0x10,SP0718_P1_0x10+0x20, //out
+ 0x14,SP0718_P1_0x14+0x20,
+ 0x11,SP0718_P1_0x11+0x20, //nr
+ 0x15,SP0718_P1_0x15+0x20,
+ 0x12,SP0718_P1_0x12+0x20, //dummy
+ 0x16,SP0718_P1_0x16+0x20,
+ 0x13,SP0718_P1_0x13+0x20, //low
+ 0x17,SP0718_P1_0x17+0x20,
+};
+
+// saturation
+uint8_t sp0718_saturation_neg4[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x20,
+ 0xd4,SP0718_P1_0xd4-0x20,
+ 0xd5,SP0718_P1_0xd5-0x20,
+ 0xd6,SP0718_P1_0xd6-0x20,
+ //sat v -0x20
+ 0xd7,SP0718_P1_0xd7-0x20,
+ 0xd8,SP0718_P1_0xd8-0x20,
+ 0xd9,SP0718_P1_0xd9-0x20,
+ 0xda,SP0718_P1_0xda-0x20,
+};
+
+uint8_t sp0718_saturation_neg3[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x18,
+ 0xd4,SP0718_P1_0xd4-0x18,
+ 0xd5,SP0718_P1_0xd5-0x18,
+ 0xd6,SP0718_P1_0xd6-0x18,
+ //sat v -0x18
+ 0xd7,SP0718_P1_0xd7-0x18,
+ 0xd8,SP0718_P1_0xd8-0x18,
+ 0xd9,SP0718_P1_0xd9-0x18,
+ 0xda,SP0718_P1_0xda-0x18,
+};
+
+uint8_t sp0718_saturation_neg2[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x10,
+ 0xd4,SP0718_P1_0xd4-0x10,
+ 0xd5,SP0718_P1_0xd5-0x10,
+ 0xd6,SP0718_P1_0xd6-0x10,
+ //sat v -0x10
+ 0xd7,SP0718_P1_0xd7-0x10,
+ 0xd8,SP0718_P1_0xd8-0x10,
+ 0xd9,SP0718_P1_0xd9-0x10,
+ 0xda,SP0718_P1_0xda-0x10,
+};
+
+uint8_t sp0718_saturation_neg1[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3-0x08,
+ 0xd4,SP0718_P1_0xd4-0x08,
+ 0xd5,SP0718_P1_0xd5-0x08,
+ 0xd6,SP0718_P1_0xd6-0x08,
+ //sat v -0x08
+ 0xd7,SP0718_P1_0xd7-0x08,
+ 0xd8,SP0718_P1_0xd8-0x08,
+ 0xd9,SP0718_P1_0xd9-0x08,
+ 0xda,SP0718_P1_0xda-0x08,
+};
+
+uint8_t sp0718_saturation_zero[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3,
+ 0xd4,SP0718_P1_0xd4,
+ 0xd5,SP0718_P1_0xd5,
+ 0xd6,SP0718_P1_0xd6,
+ //sat v
+ 0xd7,SP0718_P1_0xd7,
+ 0xd8,SP0718_P1_0xd8,
+ 0xd9,SP0718_P1_0xd9,
+ 0xda,SP0718_P1_0xda,
+};
+
+uint8_t sp0718_saturation_pos1[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x08,
+ 0xd4,SP0718_P1_0xd4+0x08,
+ 0xd5,SP0718_P1_0xd5+0x08,
+ 0xd6,SP0718_P1_0xd6+0x08,
+ //sat v +0x08
+ 0xd7,SP0718_P1_0xd7+0x08,
+ 0xd8,SP0718_P1_0xd8+0x08,
+ 0xd9,SP0718_P1_0xd9+0x08,
+ 0xda,SP0718_P1_0xda+0x08,
+};
+
+uint8_t sp0718_saturation_pos2[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x10,
+ 0xd4,SP0718_P1_0xd4+0x10,
+ 0xd5,SP0718_P1_0xd5+0x10,
+ 0xd6,SP0718_P1_0xd6+0x10,
+ //sat v +0x10
+ 0xd7,SP0718_P1_0xd7+0x10,
+ 0xd8,SP0718_P1_0xd8+0x10,
+ 0xd9,SP0718_P1_0xd9+0x10,
+ 0xda,SP0718_P1_0xda+0x10,
+};
+
+uint8_t sp0718_saturation_pos3[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x18,
+ 0xd4,SP0718_P1_0xd4+0x18,
+ 0xd5,SP0718_P1_0xd5+0x18,
+ 0xd6,SP0718_P1_0xd6+0x18,
+ //sat v +0x18
+ 0xd7,SP0718_P1_0xd7+0x18,
+ 0xd8,SP0718_P1_0xd8+0x18,
+ 0xd9,SP0718_P1_0xd9+0x18,
+ 0xda,SP0718_P1_0xda+0x18,
+};
+
+uint8_t sp0718_saturation_pos4[] = {
+ //sat u
+ 0xfd,0x01,
+ 0xd3,SP0718_P1_0xd3+0x20,
+ 0xd4,SP0718_P1_0xd4+0x20,
+ 0xd5,SP0718_P1_0xd5+0x20,
+ 0xd6,SP0718_P1_0xd6+0x20,
+ //sat v +0x20
+ 0xd7,SP0718_P1_0xd7+0x20,
+ 0xd8,SP0718_P1_0xd8+0x20,
+ 0xd9,SP0718_P1_0xd9+0x20,
+ 0xda,SP0718_P1_0xda+0x20,
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t sp0718_176x144[]={
+};
+
+// QVGA
+uint8_t sp0718_320x240[]={
+};
+
+// CIF
+uint8_t sp0718_352x288[]={
+};
+
+// VGA
+uint8_t sp0718_640x480[]={
+ 0xfd,0x01,
+ 0x4a,0x00,
+ 0x4b,0x01,
+ 0x4c,0xe0,
+ 0x4d,0x00,
+ 0x4e,0x02,
+ 0x4f,0x80,
+
+ 0xfd,0x02,
+ 0x0f,0x00, //1//subsampledisable
+
+ 0xfd,0x00,
+ 0x30,0x00,
+};
+
+// SVGA
+uint8_t sp0718_800x600[]={
+};
+
+// XGA
+uint8_t sp0718_1024x768[]={
+};
+
+// 720p
+uint8_t sp0718_1280x720[]={
+};
+
+// UXGA
+uint8_t sp0718_1600x1200[]={
+};
+
+// 1080p
+uint8_t sp0718_1920x1080[]={
+};
+
+// QXGA
+uint8_t sp0718_2048x1536[]={
+};
+
+uint8_t sp0718_2592x1944[]={
+};
+
+// Initiliztion
+uint8_t sp0718_default_regs_init[] = {
+ 0xfd,0x00,
+ 0x1C,0x00,
+ 0x31,0x10,
+ 0x27,0xb3,//0xb3 //2x gain
+
+ 0x1b,0x17, // driver
+ 0x1f,0x30,
+ 0x30,0x00, // div clk
+
+ 0x26,0xaa,
+ 0x37,0x02,
+ 0x28,0x8f,
+ 0x1a,0x73,
+ 0x1e,0x1b,
+ 0x21,0x06, //blackout voltage
+ 0x22,0x2a, //colbias
+ 0x0f,0x3f,
+ 0x10,0x3e,
+ 0x11,0x00,
+ 0x12,0x01,
+ 0x13,0x3f,
+ 0x14,0x04,
+ 0x15,0x30,
+ 0x16,0x31,
+ 0x17,0x01,
+ 0x69,0x31,
+ 0x6a,0x2a,
+ 0x6b,0x33,
+ 0x6c,0x1a,
+ 0x6d,0x32,
+ 0x6e,0x28,
+ 0x6f,0x29,
+ 0x70,0x34,
+ 0x71,0x18,
+ 0x36,0x00,//02 delete badframe
+ 0xfd,0x01,
+ 0x5d,0x51,//position
+ 0xf2,0x19,
+
+ //Blacklevel
+ 0x1f,0x10,
+ 0x20,0x1f,
+ //pregain
+ 0xfd,0x02,
+ 0x00,0x88,
+ 0x01,0x88,
+ //SI15_SP0718 24M 50Hz 15-8fps
+ //ae setting
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xce,
+ 0x06,0x00,
+ 0x09,0x02,
+ 0x0a,0xc4,
+ 0xfd,0x01,
+ 0xef,0x4d,
+ 0xf0,0x00,
+ 0x02,0x0c,
+ 0x03,0x01,
+ 0x06,0x47,
+ 0x07,0x00,
+ 0x08,0x01,
+ 0x09,0x00,
+ //Status
+ 0xfd,0x02,
+ 0xbe,0x9c,
+ 0xbf,0x03,
+ 0xd0,0x9c,
+ 0xd1,0x03,
+ 0xfd,0x01,
+ 0x5b,0x03,
+ 0x5c,0x9c,
+
+ //rpc
+ 0xfd,0x01,
+ 0xe0,0x40,////24//4c//48//4c//44//4c//3e//3c//3a//38//rpc_1base_max
+ 0xe1,0x30,////24//3c//38//3c//36//3c//30//2e//2c//2a//rpc_2base_max
+ 0xe2,0x2e,////24//34//30//34//2e//34//2a//28//26//26//rpc_3base_max
+ 0xe3,0x2a,////24//2a//2e//2c//2e//2a//2e//26//24//22//rpc_4base_max
+ 0xe4,0x2a,////24//2a//2e//2c//2e//2a//2e//26//24//22//rpc_5base_max
+ 0xe5,0x28,////24//2c//2a//2c//28//2c//24//22//20//rpc_6base_max
+ 0xe6,0x28,////24//2c//2a//2c//28//2c//24//22//20//rpc_7base_max
+ 0xe7,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_8base_max
+ 0xe8,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_9base_max
+ 0xe9,0x26,////24//2a//28//2a//26//2a//22//20//20//1e//rpc_10base_max
+ 0xea,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_11base_max
+ 0xf3,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_12base_max
+ 0xf4,0x26,////24//28//26//28//24//28//20//1f//1e//1d//rpc_13base_max
+ //ae gain &status
+ 0xfd,0x01,
+ 0x04,0xe0,//rpc_max_indr
+ 0x05,0x26,//1e//rpc_min_indr
+ 0x0a,0xa0,//rpc_max_outdr
+ 0x0b,0x26,//rpc_min_outdr
+ 0x5a,0x40,//dp rpc
+ 0xfd,0x02,
+ 0xbc,0xa0,//rpc_heq_low
+ 0xbd,0x80,//rpc_heq_dummy
+ 0xb8,0x80,//mean_normal_dummy
+ 0xb9,0x90,//mean_dummy_normal
+
+ //ae target
+ 0xfd,0x01,
+ 0xeb,SP0718_P1_0xeb,//78
+ 0xec,SP0718_P1_0xec,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
+ 0x7f,0x39,//23//0x28
+ 0x80,0xaa,//0xa6
+ //cwf 92
+ 0x70,0x3e,//0x38//41//0x3b
+ 0x71,0x59,//0x5b//5f//0x55
+ 0x72,0x31,//0x30//22//0x28
+ 0x73,0x4f,//0x54//44//0x45
+ 0x74,0xaa,
+ //tl84 93
+ 0x6b,0x1b,//0x18//11
+ 0x6c,0x3a,//0x3c//25//0x2f
+ 0x6d,0x3e,//0x3a//35
+ 0x6e,0x59,//0x5c//46//0x52
+ 0x6f,0xaa,
+ //f 94
+ 0x61,0xea,//0x03//0x00//f4//0xed
+ 0x62,0x03,//0x1a//0x25//0f//0f
+ 0x63,0x6a,//0x62//0x60//52//0x5d
+ 0x64,0x8a,//0x7d//0x85//70//0x75//0x8f
+ 0x65,0x6a,//0xaa//6a
+
+ 0x75,0x80,
+ 0x76,0x20,
+ 0x77,0x00,
+ 0x24,0x25,
+
+ //针对室内调偏不过灯箱测试使用//针对人脸调偏
+ 0x20,0xd8,
+ 0x21,0xa3,//82//a8偏暗照度还有调偏
+ 0x22,0xd0,//e3//bc
+ 0x23,0x86,
+
+ //outdoor r\b range
+ 0x78,0xc3,//d8
+ 0x79,0xba,//82
+ 0x7a,0xa6,//e3
+ 0x7b,0x99,//86
+
+
+ //skin
+ 0x08,0x15,//
+ 0x09,0x04,//
+ 0x0a,0x20,//
+ 0x0b,0x12,//
+ 0x0c,0x27,//
+ 0x0d,0x06,//
+ 0x0e,0x63,//
+
+ //wt th
+ 0x3b,0x10,
+ //gw
+ 0x31,0x60,
+ 0x32,0x60,
+ 0x33,0xc0,
+ 0x35,0x6f,
+
+ // sharp
+ 0xfd,0x02,
+ 0xde,0x0f,
+ 0xd2,0x02,//6//控制黑白边;0-边粗,f-变细
+ 0xd3,0x06,
+ 0xd4,0x06,
+ 0xd5,0x06,
+ 0xd7,0x20,//10//2x根据增益判断轮廓阈值
+ 0xd8,0x30,//24//1A//4x
+ 0xd9,0x38,//28//8x
+ 0xda,0x38,//16x
+ 0xdb,0x08,//
+ 0xe8,0x58,//48//轮廓强度
+ 0xe9,0x48,
+ 0xea,0x30,
+ 0xeb,0x20,
+ 0xec,0x48,//60//80
+ 0xed,0x48,//50//60
+ 0xee,0x30,
+ 0xef,0x20,
+ //平坦区域锐化力度
+ 0xf3,0x50,
+ 0xf4,0x10,
+ 0xf5,0x10,
+ 0xf6,0x10,
+ //dns
+ 0xfd,0x01,
+ 0x64,0x44,//沿方向边缘平滑力度 //0-最强,8-最弱
+ 0x65,0x22,
+ 0x6d,0x04,//8//强平滑(平坦)区域平滑阈值
+ 0x6e,0x06,//8
+ 0x6f,0x10,
+ 0x70,0x10,
+ 0x71,0x08,//0d//弱平滑(非平坦)区域平滑阈值
+ 0x72,0x12,//1b
+ 0x73,0x1c,//20
+ 0x74,0x24,
+ 0x75,0x44,//[7:4]平坦区域强度,[3:0]非平坦区域强度;0-最强,8-最弱;
+ 0x76,0x02,//46
+ 0x77,0x02,//33
+ 0x78,0x02,
+ 0x81,0x10,//18//2x//根据增益判定区域阈值,低于这个做强平滑、大于这个做弱平滑;
+ 0x82,0x20,//30//4x
+ 0x83,0x30,//40//8x
+ 0x84,0x48,//50//16x
+ 0x85,0x0c,//12/8+reg0x81 第二阈值,在平坦和非平坦区域做连接
+ 0xfd,0x02,
+ 0xdc,0x0f,
+
+ //gamma
+ 0xfd,0x01,
+ 0x8b,0x00,//00//00
+ 0x8c,0x0a,//0c//09
+ 0x8d,0x16,//19//17
+ 0x8e,0x1f,//25//24
+ 0x8f,0x2a,//30//33
+ 0x90,0x3c,//44//47
+ 0x91,0x4e,//54//58
+ 0x92,0x5f,//61//64
+ 0x93,0x6c,//6d//70
+ 0x94,0x82,//80//81
+ 0x95,0x94,//92//8f
+ 0x96,0xa6,//a1//9b
+ 0x97,0xb2,//ad//a5
+ 0x98,0xbf,//ba//b0
+ 0x99,0xc9,//c4//ba
+ 0x9a,0xd1,//cf//c4
+ 0x9b,0xd8,//d7//ce
+ 0x9c,0xe0,//e0//d7
+ 0x9d,0xe8,//e8//e1
+ 0x9e,0xef,//ef//ea
+ 0x9f,0xf8,//f7//f5
+ 0xa0,0xff,//ff//ff
+ //CCM
+ 0xfd,0x02,
+ 0x15,0xd0,//b>th
+ 0x16,0x95,//ri2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+// CMOS_WIN_SIZE("QVGA", 320, 240, sp0838_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, sp0838_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = sp0838_wb_auto;
+ size = ARRAY_SIZE(sp0838_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = sp0838_wb_incandescent;
+ size = ARRAY_SIZE(sp0838_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = sp0838_wb_daylight;
+ size = ARRAY_SIZE(sp0838_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = sp0838_wb_cloudy;
+ size = ARRAY_SIZE(sp0838_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = sp0838_wb_fluorescent;
+ size = ARRAY_SIZE(sp0838_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = sp0838_scene_mode_auto;
+ size = ARRAY_SIZE(sp0838_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = sp0838_scene_mode_night;
+ size = ARRAY_SIZE(sp0838_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = sp0838_exposure_neg2;
+ size = ARRAY_SIZE(sp0838_exposure_neg2);
+ break;
+ case -1:
+ regs = sp0838_exposure_neg1;
+ size = ARRAY_SIZE(sp0838_exposure_neg1);
+ break;
+ case 0:
+ regs = sp0838_exposure_zero;
+ size = ARRAY_SIZE(sp0838_exposure_zero);
+ break;
+ case 1:
+ regs = sp0838_exposure_pos1;
+ size = ARRAY_SIZE(sp0838_exposure_pos1);
+ break;
+ case 2:
+ regs = sp0838_exposure_pos2;
+ size = ARRAY_SIZE(sp0838_exposure_pos2);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x31, data);
+ printk(KERN_DEBUG "%s, 0x%x\n", __func__, data);
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+ switch (value) {
+ case 0:
+ data &= ~0x40;
+ break;
+ case 1:
+ data |= 0x40;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x31, data);
+ printk(KERN_DEBUG "%s, 0x%x\n", __func__, data);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint8_t data = 0;
+
+ sensor_write(sd, 0xfd, 0x0);
+ data = sensor_read(sd, 0x02);
+
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, sp0838_default_regs_init,
+ ARRAY_SIZE(sp0838_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, sp0838_default_regs_exit,
+ ARRAY_SIZE(sp0838_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops sp0838_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev sp0838 = {
+ .name = "sp0838",
+ .i2c_addr = 0x18,
+ .id = 0x27,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &sp0838_ops,
+};
+
+#if 0
+static int __init sp0838_init(void)
+{
+ return cmos_register_sudbdev(&sp0838);
+}
+
+static void __exit sp0838_exit(void)
+{
+ return cmos_unregister_subdev(&sp0838);
+}
+
+module_init(sp0838_init);
+module_exit(sp0838_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.h b/drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.h
new file mode 100755
index 00000000..6f98a9ef
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp0838/sp0838.h
@@ -0,0 +1,788 @@
+
+#ifndef __SP0838_H_
+#define __SP0838_H_
+
+//ECLK Drv
+#define Pre_Value_P0_0x30 0x00
+//Filter en&dis
+#define Pre_Value_P0_0x56 0x70
+#define Pre_Value_P0_0x57 0x10 //filter outdoor
+#define Pre_Value_P0_0x58 0x10 //filter indoor
+#define Pre_Value_P0_0x59 0x10 //filter night
+#define Pre_Value_P0_0x5a 0x08 //smooth outdoor 0x02
+#define Pre_Value_P0_0x5b 0x14 //smooth indoor 0x02
+#define Pre_Value_P0_0x5c 0x30 //smooht night 0x20
+//outdoor sharpness
+#define Pre_Value_P0_0x65 0x03
+#define Pre_Value_P0_0x66 0x01
+#define Pre_Value_P0_0x67 0x03
+#define Pre_Value_P0_0x68 0x46
+//indoor sharpness
+#define Pre_Value_P0_0x6b 0x04
+#define Pre_Value_P0_0x6c 0x01
+#define Pre_Value_P0_0x6d 0x03// 0x03
+#define Pre_Value_P0_0x6e 0x43
+//night sharpness
+#define Pre_Value_P0_0x71 0x05
+#define Pre_Value_P0_0x72 0x01
+#define Pre_Value_P0_0x73 0x03
+#define Pre_Value_P0_0x74 0x43
+//color
+#define Pre_Value_P0_0x7f 0xd7 //R
+#define Pre_Value_P0_0x87 0xf8 //B
+//satutation
+#define Pre_Value_P0_0xd8 0x48
+#define Pre_Value_P0_0xd9 0x44//0x48
+#define Pre_Value_P0_0xda 0x3a//0x48
+#define Pre_Value_P0_0xdb 0x38//0x48
+//AE target
+#define Pre_Value_P0_0xf7 0x78
+#define Pre_Value_P0_0xf8 0x63
+#define Pre_Value_P0_0xf9 0x68
+#define Pre_Value_P0_0xfa 0x53
+//HEQ
+#define Pre_Value_P0_0xdd 0x78 // 0x70
+#define Pre_Value_P0_0xde 0x88 // 0x90
+//AWB pre gain
+#define Pre_Value_P1_0x28 0x75
+#define Pre_Value_P1_0x29 0x4e
+
+//VBLANK
+#define Pre_Value_P0_0x05 0x00
+#define Pre_Value_P0_0x06 0x00
+//HBLANK
+#define Pre_Value_P0_0x09 0x01
+#define Pre_Value_P0_0x0a 0x76
+
+
+// Scene Mode
+uint8_t sp0838_scene_mode_auto[] = {
+ //caprure preview daylight 24M 50hz 20-8FPS maxgain:0x70
+ 0xfd,0x00,
+ 0x05,0x0 ,
+ 0x06,0x0 ,
+ 0x09,0x1 ,
+ 0x0a,0x76,
+ 0xf0,0x62,
+ 0xf1,0x0 ,
+ 0xf2,0x5f,
+ 0xf5,0x78,
+ 0xfd,0x01,
+ 0x00,0xb2,
+ 0x0f,0x60,
+ 0x16,0x60,
+ 0x17,0xa2,
+ 0x18,0xaa,
+ 0x1b,0x60,
+ 0x1c,0xaa,
+ 0xb4,0x20,
+ 0xb5,0x3a,
+ 0xb6,0x5e,
+ 0xb9,0x40,
+ 0xba,0x4f,
+ 0xbb,0x47,
+ 0xbc,0x45,
+ 0xbd,0x43,
+ 0xbe,0x42,
+ 0xbf,0x42,
+ 0xc0,0x42,
+ 0xc1,0x41,
+ 0xc2,0x41,
+ 0xc3,0x41,
+ 0xc4,0x41,
+ 0xc5,0x70,
+ 0xc6,0x41,
+ 0xca,0x70,
+ 0xcb,0xc ,
+ 0x14,0x20,
+ 0x15,0x0f,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_scene_mode_night[] = {
+ //capture preview night 24M 50hz 20-6FPS maxgain:0x78
+ 0xfd,0x00,
+ 0x05,0x0 ,
+ 0x06,0x0 ,
+ 0x09,0x1 ,
+ 0x0a,0x76,
+ 0xf0,0x62,
+ 0xf1,0x0 ,
+ 0xf2,0x5f,
+ 0xf5,0x78,
+ 0xfd,0x01,
+ 0x00,0xc0,
+ 0x0f,0x60,
+ 0x16,0x60,
+ 0x17,0xa8,
+ 0x18,0xb0,
+ 0x1b,0x60,
+ 0x1c,0xb0,
+ 0xb4,0x20,
+ 0xb5,0x3a,
+ 0xb6,0x5e,
+ 0xb9,0x40,
+ 0xba,0x4f,
+ 0xbb,0x47,
+ 0xbc,0x45,
+ 0xbd,0x43,
+ 0xbe,0x42,
+ 0xbf,0x42,
+ 0xc0,0x42,
+ 0xc1,0x41,
+ 0xc2,0x41,
+ 0xc3,0x41,
+ 0xc4,0x41,
+ 0xc5,0x41,
+ 0xc6,0x41,
+ 0xca,0x78,
+ 0xcb,0x10,
+ 0x14,0x20,
+ 0x15,0x1f,
+ 0xfd,0x00,
+};
+
+
+// White Balance
+uint8_t sp0838_wb_auto [] = {
+ 0xfd,0x01,
+ 0x28,Pre_Value_P1_0x28,
+ 0x29,Pre_Value_P1_0x29,
+ 0xfd,0x00,
+ 0x32,0x15,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_wb_incandescent [] = {
+ 0xfd,0x00, //2800K-3000K
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x41,
+ 0x29,0x71,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_wb_fluorescent [] = {
+ 0xfd,0x00, //4200K-5000K
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x5a,
+ 0x29,0x62,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_wb_daylight [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x6b,
+ 0x29,0x48,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_wb_cloudy [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x71,
+ 0x29,0x41,
+ 0xfd,0x00,
+};
+
+uint8_t sp0838_wb_tungsten [] = {
+ 0xfd,0x00, //4000K
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x57,
+ 0x29,0x66,
+ 0xfd,0x00
+};
+
+
+// Exposure
+uint8_t sp0838_exposure_neg2[] = {
+ //level -2
+ 0xfd,0x00,
+ 0xed,Pre_Value_P0_0xf7-0x20+0x04,
+ 0xf7,Pre_Value_P0_0xf7-0x20,
+ 0xf8,Pre_Value_P0_0xf8-0x20,
+ 0xec,Pre_Value_P0_0xf8-0x20-0x04,
+ 0xef,Pre_Value_P0_0xf9-0x20+0x04,
+ 0xf9,Pre_Value_P0_0xf9-0x20,
+ 0xfa,Pre_Value_P0_0xfa-0x20,
+ 0xee,Pre_Value_P0_0xfa-0x20-0x04,
+ 0xfd, 0x00,
+};
+
+uint8_t sp0838_exposure_neg1[] = {
+ //level -2
+ 0xfd,0x00,
+ 0xed,Pre_Value_P0_0xf7-0x10+0x04,
+ 0xf7,Pre_Value_P0_0xf7-0x10,
+ 0xf8,Pre_Value_P0_0xf8-0x10,
+ 0xec,Pre_Value_P0_0xf8-0x10-0x04,
+ 0xef,Pre_Value_P0_0xf9-0x10+0x04,
+ 0xf9,Pre_Value_P0_0xf9-0x10,
+ 0xfa,Pre_Value_P0_0xfa-0x10,
+ 0xee,Pre_Value_P0_0xfa-0x10-0x04,
+
+ 0xfd, 0x00,
+};
+
+uint8_t sp0838_exposure_zero[] = {
+ //level 0
+ 0xfd,0x00,
+ 0xed,Pre_Value_P0_0xf7+0x04,
+ 0xf7,Pre_Value_P0_0xf7,
+ 0xf8,Pre_Value_P0_0xf8,
+ 0xec,Pre_Value_P0_0xf8-0x04,
+ 0xef,Pre_Value_P0_0xf9+0x04,
+ 0xf9,Pre_Value_P0_0xf9,
+ 0xfa,Pre_Value_P0_0xfa,
+ 0xee,Pre_Value_P0_0xfa-0x04,
+ 0xfd, 0x00,
+};
+
+uint8_t sp0838_exposure_pos1[] = {
+ //level +2
+ 0xfd,0x00,
+ 0xed,Pre_Value_P0_0xf7+0x10+0x04,
+ 0xf7,Pre_Value_P0_0xf7+0x10,
+ 0xf8,Pre_Value_P0_0xf8+0x10,
+ 0xec,Pre_Value_P0_0xf8+0x10-0x04,
+ 0xef,Pre_Value_P0_0xf9+0x10+0x04,
+ 0xf9,Pre_Value_P0_0xf9+0x10,
+ 0xfa,Pre_Value_P0_0xfa+0x10,
+ 0xee,Pre_Value_P0_0xfa+0x10-0x04,
+ 0xfd, 0x00,
+};
+
+uint8_t sp0838_exposure_pos2[] = {
+ //level +2
+ 0xfd,0x00,
+ 0xed,Pre_Value_P0_0xf7+0x20+0x04,
+ 0xf7,Pre_Value_P0_0xf7+0x20,
+ 0xf8,Pre_Value_P0_0xf8+0x20,
+ 0xec,Pre_Value_P0_0xf8+0x20-0x04,
+ 0xef,Pre_Value_P0_0xf9+0x20+0x04,
+ 0xf9,Pre_Value_P0_0xf9+0x20,
+ 0xfa,Pre_Value_P0_0xfa+0x20,
+ 0xee,Pre_Value_P0_0xfa+0x20-0x04,
+ 0xfd, 0x00,
+};
+
+
+// Color Effect
+uint8_t sp0838_colorfx_none[] = {
+ 0xfd, 0x00,
+ 0x62, 0x00,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0838_colorfx_bw[] = {
+ 0xfd, 0x00,
+ 0x62, 0x40,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0838_colorfx_sepia[] = {
+ 0xfd, 0x00,
+ 0x62, 0x20,
+ 0x63, 0xc0,
+ 0x64, 0x20,
+
+};
+
+uint8_t sp0838_colorfx_negative[] = {
+ 0xfd, 0x00,
+ 0x62, 0x10,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0838_colorfx_emboss[] = {
+ 0xfd, 0x00,
+ 0x62, 0x02,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0838_colorfx_sketch[] = {
+ 0xfd, 0x00,
+ 0x62, 0x01,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0838_colorfx_sky_blue[] = {
+ 0xfd, 0x00,
+ 0x62, 0x20,
+ 0x63, 0x20,
+ 0x64, 0xf0,
+};
+
+uint8_t sp0838_colorfx_grass_green[] = {
+ 0xfd, 0x00,
+ 0x62, 0x20,
+ 0x63, 0x20,
+ 0x64, 0x20,
+};
+
+uint8_t sp0838_colorfx_skin_whiten[] = {
+};
+
+uint8_t sp0838_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sp0838_brightness_neg4[] = {
+ 0xfd,0x00,
+ 0xdc,0xc0,//level -4
+};
+
+uint8_t sp0838_brightness_neg3[] = {
+ 0xfd,0x00,
+ 0xdc,0xd0,//level -3
+};
+
+uint8_t sp0838_brightness_neg2[] = {
+ 0xfd,0x00,
+ 0xdc,0xe0,//level -2
+};
+
+uint8_t sp0838_brightness_neg1[] = {
+ 0xfd,0x00,
+ 0xdc,0x00,//level -1
+};
+
+uint8_t sp0838_brightness_zero[] = {
+ 0xfd,0x00,
+ 0xdc,0x00,//level 0
+};
+
+uint8_t sp0838_brightness_pos1[] = {
+ 0xfd,0x00,
+ 0xdc,0x10,//level +1
+};
+
+uint8_t sp0838_brightness_pos2[] = {
+ 0xfd,0x00,
+ 0xdc,0x20,//level +2
+};
+
+uint8_t sp0838_brightness_pos3[] = {
+ 0xfd,0x00,
+ 0xdc,0x30,//level +3
+};
+
+uint8_t sp0838_brightness_pos4[] = {
+ 0xfd,0x00,
+ 0xdc,0x40,//level +4
+};
+
+// Contrast
+uint8_t sp0838_contrast_neg4[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd-0x40, //level -4
+ 0xde,Pre_Value_P0_0xde-0x40,
+
+};
+
+uint8_t sp0838_contrast_neg3[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd-0x30, //level -3
+ 0xde,Pre_Value_P0_0xde-0x30,
+
+};
+
+uint8_t sp0838_contrast_neg2[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd-0x20, //level -2
+ 0xde,Pre_Value_P0_0xde-0x20,
+
+};
+
+uint8_t sp0838_contrast_neg1[] = {
+ 0xfd, 0x00,
+ 0xdd, Pre_Value_P0_0xdd-0x10, //level -1
+ 0xde, Pre_Value_P0_0xde-0x10,
+
+};
+
+uint8_t sp0838_contrast_zero[] = {
+ 0xfd, 0x00,
+ 0xdd, Pre_Value_P0_0xdd, //level 0
+ 0xde, Pre_Value_P0_0xde,
+
+};
+
+uint8_t sp0838_contrast_pos1[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd+0x10, //level +1
+ 0xde,Pre_Value_P0_0xde+0x10,
+
+};
+
+uint8_t sp0838_contrast_pos2[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd+0x20, //level +2
+ 0xde,Pre_Value_P0_0xde+0x20,
+
+};
+
+uint8_t sp0838_contrast_pos3[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd+0x30, //level +3
+ 0xde,Pre_Value_P0_0xde+0x30,
+
+};
+
+uint8_t sp0838_contrast_pos4[] = {
+ 0xfd, 0x00,
+ 0xdd,Pre_Value_P0_0xdd+0x40, //level +4
+ 0xde,Pre_Value_P0_0xde+0x40,
+
+};
+
+// Saturation
+uint8_t sp0838_saturation_neg4[] = {
+ 0xfd, 0x00,
+ 0xd8, 0x00,
+ 0xd9, 0x00,
+ 0xda, 0x00,
+ 0xdb, 0x00,
+};
+
+uint8_t sp0838_saturation_neg3[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8-0x30,
+ 0xd9, Pre_Value_P0_0xd9-0x30,
+ 0xda, Pre_Value_P0_0xda-0x30,
+ 0xdb, Pre_Value_P0_0xdb-0x30,
+};
+
+uint8_t sp0838_saturation_neg2[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8-0x20,
+ 0xd9, Pre_Value_P0_0xd9-0x20,
+ 0xda, Pre_Value_P0_0xda-0x20,
+ 0xdb, Pre_Value_P0_0xdb-0x20,
+};
+
+uint8_t sp0838_saturation_neg1[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8-0x10,
+ 0xd9, Pre_Value_P0_0xd9-0x10,
+ 0xda, Pre_Value_P0_0xda-0x10,
+ 0xdb, Pre_Value_P0_0xdb-0x10,
+};
+
+uint8_t sp0838_saturation_zero[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8,
+ 0xd9, Pre_Value_P0_0xd9,
+ 0xda, Pre_Value_P0_0xda,
+ 0xdb, Pre_Value_P0_0xdb,
+
+};
+
+uint8_t sp0838_saturation_pos1[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8+0x10,
+ 0xd9, Pre_Value_P0_0xd9+0x10,
+ 0xda, Pre_Value_P0_0xda+0x10,
+ 0xdb, Pre_Value_P0_0xdb+0x10,
+};
+
+uint8_t sp0838_saturation_pos2[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8+0x20,
+ 0xd9, Pre_Value_P0_0xd9+0x20,
+ 0xda, Pre_Value_P0_0xda+0x20,
+ 0xdb, Pre_Value_P0_0xdb+0x20,
+
+};
+
+uint8_t sp0838_saturation_pos3[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8+0x30,
+ 0xd9, Pre_Value_P0_0xd9+0x30,
+ 0xda, Pre_Value_P0_0xda+0x30,
+ 0xdb, Pre_Value_P0_0xdb+0x30,
+
+};
+
+uint8_t sp0838_saturation_pos4[] = {
+ 0xfd, 0x00,
+ 0xd8, Pre_Value_P0_0xd8+0x40,
+ 0xd9, Pre_Value_P0_0xd9+0x40,
+ 0xda, Pre_Value_P0_0xda+0x40,
+ 0xdb, Pre_Value_P0_0xdb+0x40,
+
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t sp0838_176x144[]={
+};
+
+// QVGA
+uint8_t sp0838_320x240[]={
+};
+
+// CIF
+uint8_t sp0838_352x288[]={
+};
+
+// VGA
+uint8_t sp0838_640x480[]={
+};
+
+// SVGA
+uint8_t sp0838_800x600[]={
+};
+
+// XGA
+uint8_t sp0838_1024x768[]={
+};
+
+// 720p
+uint8_t sp0838_1280x720[]={
+};
+
+// UXGA
+uint8_t sp0838_1600x1200[]={
+};
+
+// 1080p
+uint8_t sp0838_1920x1080[]={
+};
+
+// QXGA
+uint8_t sp0838_2048x1536[]={
+};
+
+uint8_t sp0838_2592x1944[]={
+};
+
+// Initiliztion
+uint8_t sp0838_default_regs_init[] = {
+ //SP0838 ini
+ 0xfd,0x00,//P0
+ 0x1B,0x02,
+ 0x27,0xe8,
+ 0x28,0x0B,
+ 0x32,0x00,
+ 0x22,0xc0,
+ 0x26,0x10,
+ 0x5f,0x11,//Bayer order
+ 0xfd,0x01,//P1
+ 0x25,0x1a,//Awb start
+ 0x26,0xfb,
+ 0x28,Pre_Value_P1_0x28,
+ 0x29,Pre_Value_P1_0x29,
+ 0xfd,0x00,
+ 0xe7,0x03,
+ 0xe7,0x00,
+ 0xfd,0x01,
+ 0x31,0x60,//64
+ 0x32,0x18,
+ 0x4d,0xdc,
+ 0x4e,0x53,
+ 0x41,0x8c,
+ 0x42,0x57,
+ 0x55,0xff,
+ 0x56,0x00,
+ 0x59,0x82,
+ 0x5a,0x00,
+ 0x5d,0xff,
+ 0x5e,0x6f,
+ 0x57,0xff,
+ 0x58,0x00,
+ 0x5b,0xff,
+ 0x5c,0xa8,
+ 0x5f,0x75,
+ 0x60,0x00,
+ 0x2d,0x00,
+ 0x2e,0x00,
+ 0x2f,0x00,
+ 0x30,0x00,
+ 0x33,0x00,
+ 0x34,0x00,
+ 0x37,0x00,
+ 0x38,0x00,//awb end
+ 0xfd,0x00,//P0
+ 0x33,0x6f,//LSC BPC EN
+ 0x51,0x3f,//BPC debug start
+ 0x52,0x09,
+ 0x53,0x00,
+ 0x54,0x00,
+ 0x55,0x10,//BPC debug end
+ 0x4f,0x08,//blueedge
+ 0x50,0x08,
+ 0x57,Pre_Value_P0_0x57,//Raw filter debut start
+ 0x58,Pre_Value_P0_0x58,
+ 0x59,Pre_Value_P0_0x59,
+ 0x56,Pre_Value_P0_0x56,
+ 0x5a,Pre_Value_P0_0x5a,
+ 0x5b,Pre_Value_P0_0x5b,
+ 0x5c,Pre_Value_P0_0x5c,//Raw filter debut end
+ 0x65,Pre_Value_P0_0x65,//Sharpness debug start
+ 0x66,Pre_Value_P0_0x66,
+ 0x67,Pre_Value_P0_0x67,
+ 0x68,Pre_Value_P0_0x68,
+ 0x69,0x7f,
+ 0x6a,0x01,
+ 0x6b,Pre_Value_P0_0x6b,
+ 0x6c,Pre_Value_P0_0x6c,
+ 0x6d,Pre_Value_P0_0x6d,//Edge gain normal
+ 0x6e,Pre_Value_P0_0x6e,//Edge gain normal
+ 0x6f,0x7f,
+ 0x70,0x01,
+ 0x71,Pre_Value_P0_0x71, //锐化阈值
+ 0x72,Pre_Value_P0_0x72, //弱轮廓阈值
+ 0x73,Pre_Value_P0_0x73, //边缘正向增益值
+ 0x74,Pre_Value_P0_0x74, //边缘反向增益值
+ 0x75,0x7f, //使能位
+ 0x76,0x01,//Sharpness debug end
+ 0xcb,0x07,//HEQ&Saturation debug start
+ 0xcc,0x04,
+ 0xce,0xff,
+ 0xcf,0x10,
+ 0xd0,0x20,
+ 0xd1,0x00,
+ 0xd2,0x1c,
+ 0xd3,0x16,
+ 0xd4,0x00,
+ 0xd6,0x1c,
+ 0xd7,0x16,
+ 0xdd,Pre_Value_P0_0xdd,//Contrast
+ 0xde,Pre_Value_P0_0xde,//HEQ&Saturation debug end
+ 0x7f,Pre_Value_P0_0x7f,//Color Correction start
+ 0x80,0xbc,
+ 0x81,0xed,
+ 0x82,0xd7,
+ 0x83,0xd4,
+ 0x84,0xd6,
+ 0x85,0xff,
+ 0x86,0x89,
+ 0x87,Pre_Value_P0_0x87,
+ 0x88,0x3c,
+ 0x89,0x33,
+ 0x8a,0x0f,//Color Correction end
+ 0x8b,0x0 ,//gamma start
+ 0x8c,0x1a,
+ 0x8d,0x29,
+ 0x8e,0x41,
+ 0x8f,0x62,
+ 0x90,0x7c,
+ 0x91,0x90,
+ 0x92,0xa2,
+ 0x93,0xaf,
+ 0x94,0xbc,
+ 0x95,0xc5,
+ 0x96,0xcd,
+ 0x97,0xd5,
+ 0x98,0xdd,
+ 0x99,0xe5,
+ 0x9a,0xed,
+ 0x9b,0xf5,
+ 0xfd,0x01,//P1
+ 0x8d,0xfd,
+ 0x8e,0xff,//gamma end
+ 0xfd,0x00,//P0
+ 0xca,0xcf,
+ 0xd8,Pre_Value_P0_0xd8,//UV outdoor
+ 0xd9,Pre_Value_P0_0xd9,//UV indoor
+ 0xda,Pre_Value_P0_0xda,//UV dummy
+ 0xdb,Pre_Value_P0_0xdb,//UV lowlight
+ 0xb9,0x00,//Ygamma start
+ 0xba,0x04,
+ 0xbb,0x08,
+ 0xbc,0x10,
+ 0xbd,0x20,
+ 0xbe,0x30,
+ 0xbf,0x40,
+ 0xc0,0x50,
+ 0xc1,0x60,
+ 0xc2,0x70,
+ 0xc3,0x80,
+ 0xc4,0x90,
+ 0xc5,0xA0,
+ 0xc6,0xB0,
+ 0xc7,0xC0,
+ 0xc8,0xD0,
+ 0xc9,0xE0,
+ 0xfd,0x01,//P1
+ 0x89,0xf0,
+ 0x8a,0xff,//Ygamma end
+ 0xfd,0x00,//P0
+ 0xe8,0x30,//AEdebug start
+ 0xe9,0x30,
+ 0xea,0x40,//Alc Window sel
+ 0xf4,0x1b,//outdoor mode sel
+ 0xf5,0x80,
+ 0xf7,Pre_Value_P0_0xf7,//AE target
+ 0xf8,Pre_Value_P0_0xf8,
+ 0xf9,Pre_Value_P0_0xf9,//AE target
+ 0xfa,Pre_Value_P0_0xfa,
+ 0xfd,0x01,//P1
+ 0x09,0x31,//AE Step 3.0
+ 0x0a,0x85,
+ 0x0b,0x0b,//AE Step 3.0
+ 0x14,0x20,
+ 0x15,0x0f,
+ //caprure preview daylight 24M 50hz 20-8FPS maxgain:0x70
+ 0xfd,0x00,
+ 0x05,Pre_Value_P0_0x05 ,
+ 0x06,Pre_Value_P0_0x06 ,
+ 0x09,Pre_Value_P0_0x09 ,
+ 0x0a,Pre_Value_P0_0x0a ,
+ 0xf0,0x62,
+ 0xf1,0x0 ,
+ 0xf2,0x5f,
+ 0xf5,0x78,
+ 0xfd,0x01,
+ 0x00,0xb2,
+ 0x0f,0x60,
+ 0x16,0x60,
+ 0x17,0xa2,
+ 0x18,0xaa,
+ 0x1b,0x60,
+ 0x1c,0xaa,
+ 0xb4,0x20,
+ 0xb5,0x3a,
+ 0xb6,0x5e,
+ 0xb9,0x40,
+ 0xba,0x4f,
+ 0xbb,0x47,
+ 0xbc,0x45,
+ 0xbd,0x43,
+ 0xbe,0x42,
+ 0xbf,0x42,
+ 0xc0,0x42,
+ 0xc1,0x41,
+ 0xc2,0x41,
+ 0xc3,0x41,
+ 0xc4,0x41,
+ 0xc5,0x70,
+ 0xc6,0x41,
+ 0xca,0x70,
+ 0xcb,0x0c,
+ 0xfd,0x00,
+ 0xfd,0x00, //P0
+ 0x32,0x15, //Auto_mode set
+ 0x34,0x66, //Isp_mode set
+ 0x35,0x40, //out format
+ 0x36,0x80,
+};
+
+// Exit
+uint8_t sp0838_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __SP0838_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.c b/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.c
new file mode 100755
index 00000000..28465154
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.c
@@ -0,0 +1,344 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "sp0a19.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+#define FILP_REG_INIT_VALUE 0x00
+#define DELAY_INTERVAL 50
+#define RETRY_TIMES 10
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("QVGA", 320, 240, sp0a19_320x240),
+ CMOS_WIN_SIZE("VGA", 640, 480, sp0a19_640x480),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = sp0a19_wb_auto;
+ size = ARRAY_SIZE(sp0a19_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = sp0a19_wb_incandescent;
+ size = ARRAY_SIZE(sp0a19_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = sp0a19_wb_daylight;
+ size = ARRAY_SIZE(sp0a19_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = sp0a19_wb_cloudy;
+ size = ARRAY_SIZE(sp0a19_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = sp0a19_wb_fluorescent;
+ size = ARRAY_SIZE(sp0a19_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = sp0a19_scene_mode_auto;
+ size = ARRAY_SIZE(sp0a19_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = sp0a19_scene_mode_night;
+ size = ARRAY_SIZE(sp0a19_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = sp0a19_exposure_neg2;
+ size = ARRAY_SIZE(sp0a19_exposure_neg2);
+ break;
+ case -1:
+ regs = sp0a19_exposure_neg1;
+ size = ARRAY_SIZE(sp0a19_exposure_neg1);
+ break;
+ case 0:
+ regs = sp0a19_exposure_zero;
+ size = ARRAY_SIZE(sp0a19_exposure_zero);
+ break;
+ case 1:
+ regs = sp0a19_exposure_pos1;
+ size = ARRAY_SIZE(sp0a19_exposure_pos1);
+ break;
+ case 2:
+ regs = sp0a19_exposure_pos2;
+ size = ARRAY_SIZE(sp0a19_exposure_pos2);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data,tmp=0;
+ uint8_t retry_times=0;
+
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+ tmp=data;
+ for(retry_times=0;retry_timesid) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint8_t data = 0;
+
+ sensor_write(sd, 0xfd, 0x0);
+ data = sensor_read(sd, 0x02);
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+ sensor_write_array(sd, sp0a19_default_regs_init,
+ ARRAY_SIZE(sp0a19_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, sp0a19_default_regs_exit,
+ ARRAY_SIZE(sp0a19_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops sp0a19_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev sp0a19 = {
+ .name = "sp0a19",
+ .i2c_addr = 0x21,
+ .id = 0xa6,
+ .max_width = 640,
+ .max_height = 480,
+ .ops = &sp0a19_ops,
+};
+
+#if 0
+static int __init sp0a19_init(void)
+{
+ return cmos_register_sudbdev(&sp0a19);
+}
+
+static void __exit sp0a19_exit(void)
+{
+ return cmos_unregister_subdev(&sp0a19);
+}
+
+module_init(sp0a19_init);
+module_exit(sp0a19_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.h b/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.h
new file mode 100755
index 00000000..79db4c7c
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp0a19/sp0a19.h
@@ -0,0 +1,667 @@
+
+#ifndef __SP0a19_H_
+#define __SP0a19_H_
+
+//ECLK Drv
+#define Pre_Value_P0_0x30 0x00
+//Filter en&dis
+#define Pre_Value_P0_0x56 0x70
+#define Pre_Value_P0_0x57 0x10 //filter outdoor
+#define Pre_Value_P0_0x58 0x10 //filter indoor
+#define Pre_Value_P0_0x59 0x10 //filter night
+#define Pre_Value_P0_0x5a 0x08 //smooth outdoor 0x02
+#define Pre_Value_P0_0x5b 0x14 //smooth indoor 0x02
+#define Pre_Value_P0_0x5c 0x30 //smooht night 0x20
+//outdoor sharpness
+#define Pre_Value_P0_0x65 0x03
+#define Pre_Value_P0_0x66 0x01
+#define Pre_Value_P0_0x67 0x03
+#define Pre_Value_P0_0x68 0x46
+//indoor sharpness
+#define Pre_Value_P0_0x6b 0x04
+#define Pre_Value_P0_0x6c 0x01
+#define Pre_Value_P0_0x6d 0x03// 0x03
+#define Pre_Value_P0_0x6e 0x43
+//night sharpness
+#define Pre_Value_P0_0x71 0x05
+#define Pre_Value_P0_0x72 0x01
+#define Pre_Value_P0_0x73 0x03
+#define Pre_Value_P0_0x74 0x43
+//color
+#define Pre_Value_P0_0x7f 0xd7 //R
+#define Pre_Value_P0_0x87 0xf8 //B
+//satutation
+#define Pre_Value_P0_0xd8 0x48
+#define Pre_Value_P0_0xd9 0x44//0x48
+#define Pre_Value_P0_0xda 0x3a//0x48
+#define Pre_Value_P0_0xdb 0x38//0x48
+//AE target
+#define Pre_Value_P0_0xf7 0x78
+#define Pre_Value_P0_0xf8 0x63
+#define Pre_Value_P0_0xf9 0x68
+#define Pre_Value_P0_0xfa 0x53
+//HEQ
+#define Pre_Value_P0_0xdd 0x78 // 0x70
+#define Pre_Value_P0_0xde 0x88 // 0x90
+//AWB pre gain
+#define Pre_Value_P1_0x28 0x75
+#define Pre_Value_P1_0x29 0x4e
+
+//VBLANK
+#define Pre_Value_P0_0x05 0x00
+#define Pre_Value_P0_0x06 0x00
+//HBLANK
+#define Pre_Value_P0_0x09 0x01
+#define Pre_Value_P0_0x0a 0x76
+
+//AE target
+#define SP0A19_P0_0xf7 0x88
+#define SP0A19_P0_0xf8 0x80
+#define SP0A19_P0_0xf9 0x70
+#define SP0A19_P0_0xfa 0x68
+//HEQ
+#define SP0A19_P0_0xdd 0x7c
+#define SP0A19_P0_0xde 0xc4
+
+// Scene Mode
+uint8_t sp0a19_scene_mode_auto[] = {
+ //caprure preview daylight 24M 50hz 20-8FPS maxgain:0x70
+
+};
+
+uint8_t sp0a19_scene_mode_night[] = {
+ //capture preview night 24M 50hz 20-6FPS maxgain:0x78
+
+};
+
+
+// White Balance
+uint8_t sp0a19_wb_auto [] = {
+ 0xfd,0x01,
+ 0x28,0xc5,
+ 0x29,0x9b,
+ 0xfd,0x00,
+ 0x32,0x15, //awb & ae opened
+ 0xfd,0x00,
+};
+
+uint8_t sp0a19_wb_incandescent [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x89,
+ 0x29,0xb8,
+ 0xfd,0x00,
+};
+
+uint8_t sp0a19_wb_fluorescent [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xaf,
+ 0x29,0x99,
+ 0xfd,0x00,
+};
+
+uint8_t sp0a19_wb_daylight [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xbc,
+ 0x29,0x5d,
+ 0xfd,0x00,
+};
+
+uint8_t sp0a19_wb_cloudy [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xbf,
+ 0x29,0x89,
+ 0xfd,0x00,
+};
+
+uint8_t sp0a19_wb_tungsten [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x90,
+ 0x29,0xc7,
+ 0xfd,0x00,
+};
+
+
+// Exposure
+uint8_t sp0a19_exposure_neg2[] = {
+};
+
+uint8_t sp0a19_exposure_neg1[] = {
+};
+
+uint8_t sp0a19_exposure_zero[] = {
+};
+
+uint8_t sp0a19_exposure_pos1[] = {
+};
+
+uint8_t sp0a19_exposure_pos2[] = {
+};
+
+
+// Color Effect
+uint8_t sp0a19_colorfx_none[] = {
+ 0xfd, 0x00,
+ 0x62, 0x00,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0a19_colorfx_bw[] = {
+ 0xfd, 0x00,
+ 0x62, 0x20,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0a19_colorfx_sepia[] = {
+ 0xfd, 0x00,
+ 0x62, 0x10,
+ 0x63, 0xc0,
+ 0x64, 0x20,
+};
+
+uint8_t sp0a19_colorfx_negative[] = {
+ 0xfd, 0x00,
+ 0x62, 0x10,
+ 0x63, 0x80,
+ 0x64, 0x80,
+};
+
+uint8_t sp0a19_colorfx_emboss[] = {
+};
+
+uint8_t sp0a19_colorfx_sketch[] = {
+};
+
+uint8_t sp0a19_colorfx_sky_blue[] = {
+};
+
+uint8_t sp0a19_colorfx_grass_green[] = {
+};
+
+uint8_t sp0a19_colorfx_skin_whiten[] = {
+};
+
+uint8_t sp0a19_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sp0a19_brightness_neg4[] = {
+};
+
+uint8_t sp0a19_brightness_neg3[] = {
+};
+
+uint8_t sp0a19_brightness_neg2[] = {
+};
+
+uint8_t sp0a19_brightness_neg1[] = {
+};
+
+uint8_t sp0a19_brightness_zero[] = {
+};
+
+uint8_t sp0a19_brightness_pos1[] = {
+};
+
+uint8_t sp0a19_brightness_pos2[] = {
+};
+
+uint8_t sp0a19_brightness_pos3[] = {
+};
+
+uint8_t sp0a19_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t sp0a19_contrast_neg4[] = {
+};
+
+uint8_t sp0a19_contrast_neg3[] = {
+};
+
+uint8_t sp0a19_contrast_neg2[] = {
+};
+
+uint8_t sp0a19_contrast_neg1[] = {
+};
+
+uint8_t sp0a19_contrast_zero[] = {
+};
+
+uint8_t sp0a19_contrast_pos1[] = {
+};
+
+uint8_t sp0a19_contrast_pos2[] = {
+};
+
+uint8_t sp0a19_contrast_pos3[] = {
+};
+
+uint8_t sp0a19_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t sp0a19_saturation_neg4[] = {
+};
+
+uint8_t sp0a19_saturation_neg3[] = {
+};
+
+uint8_t sp0a19_saturation_neg2[] = {
+};
+
+uint8_t sp0a19_saturation_neg1[] = {
+};
+
+uint8_t sp0a19_saturation_zero[] = {
+};
+
+uint8_t sp0a19_saturation_pos1[] = {
+};
+
+uint8_t sp0a19_saturation_pos2[] = {
+};
+
+uint8_t sp0a19_saturation_pos3[] = {
+};
+
+uint8_t sp0a19_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t sp0a19_176x144[]={
+};
+
+// QVGA
+uint8_t sp0a19_320x240[]={
+ 0xfd,0x01,
+ 0x0e,0x03,
+ 0xfd,0x00,
+ 0x30,0x10,
+};
+
+// CIF
+uint8_t sp0a19_352x288[]={
+};
+
+// VGA
+uint8_t sp0a19_640x480[]={
+ 0xfd,0x01,
+ 0x0e,0x00,
+ 0xfd,0x00,
+ 0x30,0x00,
+};
+
+// SVGA
+uint8_t sp0a19_800x600[]={
+};
+
+// XGA
+uint8_t sp0a19_1024x768[]={
+};
+
+// 720p
+uint8_t sp0a19_1280x720[]={
+};
+
+// UXGA
+uint8_t sp0a19_1600x1200[]={
+};
+
+// 1080p
+uint8_t sp0a19_1920x1080[]={
+};
+
+// QXGA
+uint8_t sp0a19_2048x1536[]={
+};
+
+uint8_t sp0a19_2592x1944[]={
+};
+
+// Initiliztion
+uint8_t sp0a19_default_regs_init[] = {
+ /*init registers code.*/
+ 0xfd,0x00,
+ 0x1c,0x28,
+ 0x32,0x00,
+ 0x0f,0x2f,
+ 0x10,0x2e,
+ 0x11,0x00,
+ 0x12,0x18,
+ 0x13,0x2f,
+ 0x14,0x00,
+ 0x15,0x3f,
+ 0x16,0x00,
+ 0x17,0x18,
+ 0x25,0x40,
+ 0x1a,0x0b,
+ 0x1b,0xc ,
+ 0x1e,0xb ,
+ 0x20,0x3f,
+ 0x21,0x13,
+ 0x22,0x19,
+ 0x26,0x1a,
+ 0x27,0xab,
+ 0x28,0xfd,
+ 0x30,0x00,
+ 0x31,0x00, //0x10
+ 0xfb,0x31,
+ 0x1f,0x08,
+
+ //Blacklevel
+ 0xfd,0x00,
+ 0x65,0x00,//06
+ 0x66,0x00,//06
+ 0x67,0x00,//06
+ 0x68,0x00,//06
+ 0x45,0x00,
+ 0x46,0x0f,
+
+ //ae setting
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0x32,
+ 0x06,0x00,
+ 0x09,0x01,
+ 0x0a,0x46,
+ 0xf0,0x66,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0c,
+ 0x92,0x01,
+ 0x98,0x66,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ //Status
+ 0xfd,0x01,
+ 0xce,0xc8,
+ 0xcf,0x04,
+ 0xd0,0xc8,
+ 0xd1,0x04,
+
+ 0xfd,0x01,
+ 0xc4,0x56,
+ 0xc5,0x8f,
+ 0xca,0x30,
+ 0xcb,0x45,
+ 0xcc,0x70,
+ 0xcd,0x48,
+ 0xfd,0x00,
+
+ //lsc for st
+ 0xfd,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if_thr_normal
+ 0x56,0x10, //raw_dif_thr_dummy
+ 0x59,0x15, //raw_dif_thr_lowlight
+ //GrGb平滑阈值
+ 0x89,0x08, //raw_grgb_thr_outdoor
+ 0x8a,0x0c, //raw_grgb_thr_normal
+ 0x9c,0x10, //raw_grgb_thr_dummy
+ 0x9d,0x15, //raw_grgb_thr_lowlight
+
+ //Gr\Gb之间平滑强度
+ 0x81,0xe0, //raw_gflt_fac_outdoor
+ 0x82,0x80, //80//raw_gflt_fac_normal
+ 0x83,0x30, //raw_gflt_fac_dummy
+ 0x84,0x18, //raw_gflt_fac_lowlight
+ //Gr、Gb单通道内平滑强度
+ 0x85,0xe0, //raw_gf_fac_outdoor
+ 0x86,0x80, //raw_gf_fac_normal
+ 0x87,0x30, //raw_gf_fac_dummy
+ 0x88,0x18, //raw_gf_fac_lowlight
+ //R、B平滑强度
+ 0x5a,0xff, //raw_rb_fac_outdoor
+ 0x5b,0xe0, //40//raw_rb_fac_normal
+ 0x5c,0x60, //raw_rb_fac_dummy
+ 0x5d,0x20, //raw_rb_fac_lowlight
+
+ //sharpen
+ 0xfd,0x01,
+ 0xe2,0x50, //sharpen_y_base
+ 0xe4,0xa0, //sharpen_y_max
+
+ 0xe5,0x08, //rangek_neg_outdoor
+ 0xd3,0x08, //rangek_pos_outdoor
+ 0xd7,0x08, //range_base_outdoor
+
+ 0xe6,0x0a, //rangek_neg_normal
+ 0xd4,0x0a, //rangek_pos_normal
+ 0xd8,0x0a, //range_base_normal
+
+ 0xe7,0x12, //rangek_neg_dummy
+ 0xd5,0x12, //rangek_pos_dummy
+ 0xd9,0x12, //range_base_dummy
+
+ 0xd2,0x15, //rangek_neg_lowlight
+ 0xd6,0x15, //rangek_pos_lowlight
+ 0xda,0x15, //range_base_lowlight
+
+ 0xe8,0x20,//sharp_fac_pos_outdoor
+ 0xec,0x2c,//sharp_fac_neg_outdoor
+ 0xe9,0x20,//sharp_fac_pos_nr
+ 0xed,0x2c,//sharp_fac_neg_nr
+ 0x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0xed,SP0A19_P0_0xf7+0x04,
+ 0xf7,SP0A19_P0_0xf7,
+ 0xf8,SP0A19_P0_0xf8,
+ 0xec,SP0A19_P0_0xf8-0x04,
+ 0xef,SP0A19_P0_0xf9+0x04,
+ 0xf9,SP0A19_P0_0xf9,
+ 0xfa,SP0A19_P0_0xfa,
+ 0xee,SP0A19_P0_0xfa-0x04,
+ //gray detect
+ 0xfd,0x01,
+ 0x30,0x40,
+ 0x31,0x70,//
+ 0x32,0x40,//80
+ 0x33,0xef,//
+ 0x34,0x05,//04
+ 0x4d,0x2f,//40
+ 0x4e,0x20,//
+ 0x4f,0x16,//13
+ //lowlight lum
+ 0xfd,0x00,
+ 0xb2,0x10,//lum_limit
+ 0xb3,0x1f,//lum_set
+ 0xb4,0x30,//black_vt
+ 0xb5,0x45,//white_vt
+ //saturation
+ 0xfd,0x00,
+ 0xbe,0xff,
+ 0xbf,0x01,
+ 0xc0,0xff,
+ 0xc1,0xd8,
+ 0xd3,0x80,//0x78
+ 0xd4,0x78,//0x78
+ 0xd6,0x68,//0x78
+ 0xd7,0x50,//0x78
+ //HEQ
+ 0xfd,0x00,
+ 0xdc,0x00,
+ 0xdd,SP0A19_P0_0xdd,
+ 0xde,SP0A19_P0_0xde,//80
+ 0xdf,0x80,
+ //func enable
+ 0xfd,0x00,
+ 0x32,0x15,//d
+ 0x34,0x76,//16
+ 0x35,0x40,
+ 0x33,0xef,
+ 0x5f,0x51,
+ 0xfd,0x00,
+ 0x36,0x80,
+
+ };
+
+// Exit
+uint8_t sp0a19_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __sp0a19_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.c b/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.c
new file mode 100755
index 00000000..40de4d91
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.c
@@ -0,0 +1,326 @@
+
+#include "../cmos-subdev.h"
+#include "../../wmt-vid.h"
+#include "sp2518.h"
+
+#define sensor_write_array(sd, arr, sz) \
+ cmos_init_8bit_addr(arr, sz, (sd)->i2c_addr)
+
+#define sensor_read(sd, reg) \
+ wmt_vid_i2c_read(sd->i2c_addr, reg)
+
+#define sensor_write(sd, reg, val) \
+ wmt_vid_i2c_write(sd->i2c_addr, reg, val)
+
+struct cmos_win_size {
+ char *name;
+ int width;
+ int height;
+ uint8_t *regs;
+ size_t size;
+};
+
+#define CMOS_WIN_SIZE(n, w, h, r) \
+ {.name = n, .width = w , .height = h, .regs = r, .size = ARRAY_SIZE(r) }
+
+static const struct cmos_win_size cmos_supported_win_sizes[] = {
+ CMOS_WIN_SIZE("VGA", 640, 480, sp2518_640_480_regs),
+ CMOS_WIN_SIZE("SVGA", 800, 600, sp2518_800_600_regs),
+ CMOS_WIN_SIZE("200w", 1600, 1200, sp2518_1600_1200_regs),
+};
+
+static const struct cmos_win_size *cmos_select_win(u32 *width, u32 *height)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ if (cmos_supported_win_sizes[i].width == *width &&
+ cmos_supported_win_sizes[i].height == *height) {
+ *width = cmos_supported_win_sizes[i].width;
+ *height = cmos_supported_win_sizes[i].height;
+ return &cmos_supported_win_sizes[i];
+ }
+ }
+ return NULL;
+}
+
+static int sensor_s_wb(struct cmos_subdev *sd, enum v4l2_wb_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case WHITE_BALANCE_AUTO:
+ regs = sp2518_wb_auto;
+ size = ARRAY_SIZE(sp2518_wb_auto);
+ break;
+ case WHITE_BALANCE_INCANDESCENCE:
+ regs = sp2518_wb_incandescent;
+ size = ARRAY_SIZE(sp2518_wb_incandescent);
+ break;
+ case WHITE_BALANCE_DAYLIGHT:
+ regs = sp2518_wb_daylight;
+ size = ARRAY_SIZE(sp2518_wb_daylight);
+ break;
+ case WHITE_BALANCE_CLOUDY:
+ regs = sp2518_wb_cloudy;
+ size = ARRAY_SIZE(sp2518_wb_cloudy);
+ break;
+ case WHITE_BALANCE_FLUORESCENT:
+ regs = sp2518_wb_fluorescent;
+ size = ARRAY_SIZE(sp2518_wb_fluorescent);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_scenemode(struct cmos_subdev *sd, enum v4l2_scene_mode value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case SCENE_MODE_AUTO:
+ regs = sp2518_scene_mode_auto;
+ size = ARRAY_SIZE(sp2518_scene_mode_auto);
+ break;
+ case SCENE_MODE_NIGHTSHOT:
+ regs = sp2518_scene_mode_night;
+ size = ARRAY_SIZE(sp2518_scene_mode_night);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_exposure(struct cmos_subdev *sd, int value)
+{
+ uint8_t *regs;
+ size_t size;
+
+ switch (value) {
+ case -2:
+ regs = sp2518_exposure_neg2;
+ size = ARRAY_SIZE(sp2518_exposure_neg2);
+ break;
+ case -1:
+ regs = sp2518_exposure_neg1;
+ size = ARRAY_SIZE(sp2518_exposure_neg1);
+ break;
+ case 0:
+ regs = sp2518_exposure_zero;
+ size = ARRAY_SIZE(sp2518_exposure_zero);
+ break;
+ case 1:
+ regs = sp2518_exposure_pos1;
+ size = ARRAY_SIZE(sp2518_exposure_pos1);
+ break;
+ case 2:
+ regs = sp2518_exposure_pos2;
+ size = ARRAY_SIZE(sp2518_exposure_pos2);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, regs, size);
+ return 0;
+}
+
+static int sensor_s_hflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+ switch (value) {
+ case 0:
+ data &= ~0x20;
+ break;
+ case 1:
+ data |= 0x20;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x31, data);
+ printk(KERN_DEBUG "%s, 0x%x\n", __func__, data);
+ return 0;
+}
+
+static int sensor_s_vflip(struct cmos_subdev *sd, int value)
+{
+ uint8_t data;
+
+ sensor_write(sd, 0xfd, 0x00); // set page0
+ data = sensor_read(sd, 0x31);
+ switch (value) {
+ case 0:
+ data &= ~0x40;
+ break;
+ case 1:
+ data |= 0x40;
+ break;
+ default:
+ return -EINVAL;
+ }
+ sensor_write(sd, 0x31, data);
+ printk(KERN_DEBUG "%s, 0x%x\n", __func__, data);
+ return 0;
+}
+
+static int sensor_queryctrl(struct cmos_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ switch (qc->id) {
+ case V4L2_CID_VFLIP:
+ case V4L2_CID_HFLIP:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return v4l2_ctrl_query_fill(qc, 0, 3, 1, 0);
+ case V4L2_CID_EXPOSURE:
+ return v4l2_ctrl_query_fill(qc, -2, 2, 1, 0);
+ }
+ return -EINVAL;
+}
+
+static int sensor_s_ctrl(struct cmos_subdev *sd, struct v4l2_control *ctrl)
+{
+ switch (ctrl->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE:
+ return sensor_s_scenemode(sd, ctrl->value);
+ case V4L2_CID_DO_WHITE_BALANCE:
+ return sensor_s_wb(sd, ctrl->value);
+ case V4L2_CID_EXPOSURE:
+ return sensor_s_exposure(sd, ctrl->value);
+ case V4L2_CID_HFLIP:
+ return sensor_s_hflip(sd, ctrl->value);
+ case V4L2_CID_VFLIP:
+ return sensor_s_vflip(sd, ctrl->value);
+ default:
+ case WMT_V4L2_CID_CAMERA_ANTIBANDING:
+ return -EINVAL;
+ }
+ return -EINVAL;
+}
+
+static int sensor_g_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return -EINVAL;
+}
+
+static int sensor_s_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ const struct cmos_win_size *win;
+
+ win = cmos_select_win(&mf->width, &mf->height);
+ if (!win) {
+ pr_err("%s, s_mbus_fmt failed, width %d, height %d\n",
+ sd->name, mf->width, mf->height);
+ return -EINVAL;
+ }
+
+ sensor_write_array(sd, win->regs, win->size);
+ return 0;
+}
+
+static int sensor_try_mbus_fmt(struct cmos_subdev *sd,
+ struct v4l2_mbus_framefmt *mf)
+{
+ return 0;
+}
+
+static int sensor_enum_framesizes(struct cmos_subdev *sd,
+ struct v4l2_frmsizeenum *fsize)
+{
+ int i;
+ int num_valid = -1;
+ __u32 index = fsize->index;
+
+ for (i = 0; i < ARRAY_SIZE(cmos_supported_win_sizes); i++) {
+ const struct cmos_win_size *win = &cmos_supported_win_sizes[index];
+ if (index == ++num_valid) {
+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+ fsize->discrete.width = win->width;
+ fsize->discrete.height = win->height;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static int sensor_identify(struct cmos_subdev *sd)
+{
+ uint8_t data = 0;
+
+ sensor_write(sd, 0xfd, 0x0);
+ data = sensor_read(sd, 0x02);
+ return (data == sd->id) ? 0 : -EINVAL;
+}
+
+static int sensor_init(struct cmos_subdev *sd)
+{
+ if (sensor_identify(sd)) {
+ return -1;
+ }
+
+ sensor_write_array(sd, sp2518_default_regs_init,
+ ARRAY_SIZE(sp2518_default_regs_init));
+ return 0;
+}
+
+static int sensor_exit(struct cmos_subdev *sd)
+{
+ sensor_write_array(sd, sp2518_default_regs_exit,
+ ARRAY_SIZE(sp2518_default_regs_exit));
+ return 0;
+}
+
+static struct cmos_subdev_ops sp2518_ops = {
+ .identify = sensor_identify,
+ .init = sensor_init,
+ .exit = sensor_exit,
+ .queryctrl = sensor_queryctrl,
+ .s_ctrl = sensor_s_ctrl,
+ .s_mbus_fmt = sensor_s_mbus_fmt,
+ .g_mbus_fmt = sensor_g_mbus_fmt,
+ .try_mbus_fmt = sensor_try_mbus_fmt,
+ .enum_framesizes = sensor_enum_framesizes,
+};
+
+struct cmos_subdev sp2518 = {
+ .name = "sp2518",
+ .i2c_addr = 0x30,
+ .id = 0x53,
+ .max_width = 1600,
+ .max_height = 1200,
+ .ops = &sp2518_ops,
+};
+
+#if 0
+static int __init sp2518_init(void)
+{
+ return cmos_register_sudbdev(&sp2518);
+}
+
+static void __exit sp2518_exit(void)
+{
+ return cmos_unregister_subdev(&sp2518);
+}
+
+module_init(sp2518_init);
+module_exit(sp2518_exit);
+
+MODULE_LICENSE("GPL");
+#endif
diff --git a/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.h b/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.h
new file mode 100755
index 00000000..73b0ed0e
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/sp2518/sp2518.h
@@ -0,0 +1,1221 @@
+
+#ifndef __SP2518_H_
+#define __SP2518_H_
+
+#define SP2518_P0_0xf7 0x80//78
+#define SP2518_P0_0xf8 0x74//6e
+#define SP2518_P0_0xf9 0x80//74
+#define SP2518_P0_0xfa 0x74//6a
+//HEQ
+#define SP2518_P0_0xdd 0x80
+#define SP2518_P0_0xde 0x95//90
+//sharpen
+#define SP2518_P1_0xe9 0x20//0x30//14
+#define SP2518_P1_0xed 0x20//0x30//10
+//sat
+#define SP2518_P0_0xd3 0x77
+#define SP2518_P0_0xd4 0x77
+#define SP2518_P0_0xd6 0x77
+#define SP2518_P0_0xd7 0x77
+#define SP2518_P0_0xd8 0x77
+#define SP2518_P0_0xd9 0x77
+#define SP2518_P0_0xda 0x77
+#define SP2518_P0_0xdb 0x77
+//auto lum
+#define SP2518_NORMAL_Y0ffset 0x10
+#define SP2518_LOWLIGHT_Y0ffset 0x20
+
+#define CLK24M_48M
+// #define CLK24M_72M
+
+// Scene Mode
+uint8_t sp2518_scene_mode_auto[] = {
+ 0xfd , 0x00,
+ 0xb2,SP2518_NORMAL_Y0ffset,
+ 0xb3,0x1f,
+
+#ifdef CLK24M_48M
+ #if 0
+ //capture preview daylight 48M 50hz fix 9FPS maxgain
+ 0xfd,0x00,
+ 0x03,0x02,
+ 0x04,0xbe,
+ 0x09,0x00,
+ 0x0a,0x64,
+ 0xf0,0x75,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0b,
+ 0x92,0x01,
+ 0x98,0x75,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ // status
+ 0xfd,0x01,
+ 0xce,0x07,
+ 0xcf,0x05,
+ 0xd0,0x07,
+ 0xd1,0x05,
+ 0xd7,0x77,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0x7b,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+ #else
+ //capture preview daylight 48M 50hz fix 8FPS maxgain
+ 0xfd,0x00,
+ 0x03,0x02,
+ 0x04,0x70,
+ 0x09,0x00,
+ 0x0a,0xe4,
+ 0xf0,0x68,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0c,
+ 0x92,0x01,
+ 0x98,0x68,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ // status
+ 0xfd,0x01,
+ 0xce,0xe0,
+ 0xcf,0x04,
+ 0xd0,0xe0,
+ 0xd1,0x04,
+ 0xd7,0x64,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0x68,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+ #endif
+#elif defined(CLK24M_72M)
+ //capture preview daylight 72M 50hz 8-13FPS maxgain
+ 0xfd , 0x00,
+ 0x03 , 0xf6,
+ 0x04 , 0xbe,
+ 0x09 , 0x00,
+ 0x0a , 0x8b,
+ 0xf0 , 0xa9,
+ 0xf1 , 0x00,
+ 0xfd , 0x01,
+ 0x90 , 0x0c,
+ 0x92 , 0x01,
+ 0x98 , 0xa9,
+ 0x99 , 0x00,
+ 0x9a , 0x01,
+ 0x9b , 0x00,
+
+ // status
+ 0xfd , 0x01,
+ 0xce , 0xec,
+ 0xcf , 0x07,
+ 0xd0 , 0xec,
+ 0xd1 , 0x07,
+ 0xd7 , 0xab,//exp_nr_outd_8lsb
+ 0xd8 , 0x00,
+ 0xd9 , 0xaf,//exp_outd_nr_8lsb
+ 0xda , 0x00,
+ 0xfd , 0x00,
+#endif
+};
+
+uint8_t sp2518_scene_mode_night[] = {
+ 0xfd , 0x00,
+ 0xb2 , SP2518_LOWLIGHT_Y0ffset,
+ 0xb3 , 0x1f,
+
+#ifdef CLK24M_48M
+ //capture preview night 48M 50hz fix 6FPS maxgain
+ 0xfd,0x00,
+ 0x03,0x01,
+ 0x04,0xd4,
+ 0x09,0x02,
+ 0x0a,0x64,
+ 0xf0,0x4e,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x10,
+ 0x92,0x01,
+ 0x98,0x4e,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ // status
+ 0xfd,0x01,
+ 0xce,0xe0,
+ 0xcf,0x04,
+ 0xd0,0xe0,
+ 0xd1,0x04,
+ 0xd7,0x50,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0x54,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+#elif defined(CLK24M_72M)
+ //capture preview night 72M 50hz fix 6FPS maxgain
+ 0xfd , 0x00,
+ 0x03 , 0x01,
+ 0x04 , 0xd4,
+ 0x05 , 0x00,
+ 0x06 , 0x00,
+ 0x07 , 0x00,
+ 0x08 , 0x00,
+ 0x09 , 0x05,
+ 0x0a , 0x66,
+ 0xf0 , 0x4e,
+ 0xf1 , 0x00,
+ 0xfd , 0x01,
+ 0x90 , 0x10,
+ 0x92 , 0x01,
+ 0x98 , 0x4e,
+ 0x99 , 0x00,
+ 0x9a , 0x01,
+ 0x9b , 0x00,
+ //Status
+ 0xfd , 0x01,
+ 0xce , 0xe0,
+ 0xcf , 0x04,
+ 0xd0 , 0xe0,
+ 0xd1 , 0x04,
+ 0xd7 , 0x50,
+ 0xd8 , 0x00,
+ 0xd9 , 0x54,
+ 0xda , 0x00,
+ 0xfd , 0x00,
+#endif
+};
+
+
+// White Balance
+uint8_t sp2518_wb_auto [] = {
+ 0xfd, 0x01,
+ 0x28, 0xce,
+ 0x29, 0x8a,
+ 0xfd, 0x00,
+ 0x32, 0x0d,
+ 0xfd, 0x00,
+};
+
+uint8_t sp2518_wb_incandescent [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0x7b,
+ 0x29,0xd3,
+ 0xfd,0x00,
+};
+
+uint8_t sp2518_wb_fluorescent [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xb4,
+ 0x29,0xc4,
+ 0xfd,0x00,
+};
+
+uint8_t sp2518_wb_daylight [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xc1,
+ 0x29,0x88,
+ 0xfd,0x00,
+};
+
+uint8_t sp2518_wb_cloudy [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xe2,
+ 0x29,0x82,
+ 0xfd,0x00,
+};
+
+uint8_t sp2518_wb_tungsten [] = {
+ 0xfd,0x00,
+ 0x32,0x05,
+ 0xfd,0x01,
+ 0x28,0xae,
+ 0x29,0xcc,
+ 0xfd,0x00,
+};
+
+
+// Exposure
+uint8_t sp2518_exposure_neg2[] = {
+ 0xfd,0x00,
+ 0xdc,0xe0,
+};
+
+uint8_t sp2518_exposure_neg1[] = {
+ 0xfd,0x00,
+ 0xdc,0xf0,
+};
+
+uint8_t sp2518_exposure_zero[] = {
+ 0xfd,0x00,
+ 0xdc,0x00,
+};
+
+uint8_t sp2518_exposure_pos1[] = {
+ 0xfd,0x00,
+ 0xdc,0x10,
+};
+
+uint8_t sp2518_exposure_pos2[] = {
+ 0xfd,0x00,
+ 0xdc,0x20,
+};
+
+
+// Color Effect
+uint8_t sp2518_colorfx_none[] = {
+ 0xfd,0x00,
+ 0x62,0x00,
+ 0x63,0x80,
+ 0x64,0x80,
+};
+
+uint8_t sp2518_colorfx_bw[] = {
+ 0xfd,0x00,
+ 0x62,0x20,
+ 0x63,0x80,
+ 0x64,0x80,
+};
+
+uint8_t sp2518_colorfx_sepia[] = {
+ 0xfd,0x00,
+ 0x62,0x10,
+ 0x63,0xb0,
+ 0x64,0x40,
+};
+
+uint8_t sp2518_colorfx_negative[] = {
+ 0xfd,0x00,
+ 0x62,0x04,
+ 0x63,0x80,
+ 0x64,0x80,
+};
+
+uint8_t sp2518_colorfx_emboss[] = {
+ 0xfd,0x00,
+ 0x62,0x01,
+ 0x63,0x80,
+ 0x64,0x80,
+};
+
+uint8_t sp2518_colorfx_sketch[] = {
+ 0xfd,0x00,
+ 0x62,0x40,
+ 0x63,0x80,
+ 0x64,0x80,
+};
+
+uint8_t sp2518_colorfx_sky_blue[] = {
+ 0xfd,0x00,
+ 0x62,0x10,
+ 0x63,0x80,
+ 0x64,0xb0,
+};
+
+uint8_t sp2518_colorfx_grass_green[] = {
+ 0xfd,0x00,
+ 0x62,0x10,
+ 0x63,0x50,
+ 0x64,0x50,
+};
+
+uint8_t sp2518_colorfx_skin_whiten[] = {
+};
+
+uint8_t sp2518_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t sp2518_brightness_neg4[] = {
+ 0xfd,0x00,
+ 0xdc,0xc0,
+};
+
+uint8_t sp2518_brightness_neg3[] = {
+ 0xfd,0x00,
+ 0xdc,0xd0,
+};
+
+uint8_t sp2518_brightness_neg2[] = {
+ 0xfd,0x00,
+ 0xdc,0xe0,
+};
+
+uint8_t sp2518_brightness_neg1[] = {
+ 0xfd,0x00,
+ 0xdc,0xf0,
+};
+
+uint8_t sp2518_brightness_zero[] = {
+ 0xfd,0x00,
+ 0xdc,0x00,
+};
+
+uint8_t sp2518_brightness_pos1[] = {
+ 0xfd,0x00,
+ 0xdc,0x10,
+};
+
+uint8_t sp2518_brightness_pos2[] = {
+ 0xfd,0x00,
+ 0xdc,0x20,
+};
+
+uint8_t sp2518_brightness_pos3[] = {
+ 0xfd,0x00,
+ 0xdc,0x30,
+};
+
+uint8_t sp2518_brightness_pos4[] = {
+ 0xfd,0x00,
+ 0xdc,0x40,
+};
+
+// Contrast
+uint8_t sp2518_contrast_neg4[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde-0x20,
+};
+
+uint8_t sp2518_contrast_neg3[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde-0x18,
+};
+
+uint8_t sp2518_contrast_neg2[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde-0x10,
+};
+
+uint8_t sp2518_contrast_neg1[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde-0x08,
+};
+
+uint8_t sp2518_contrast_zero[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde,
+};
+
+uint8_t sp2518_contrast_pos1[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde+0x08,
+};
+
+uint8_t sp2518_contrast_pos2[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde+0x10,
+};
+
+uint8_t sp2518_contrast_pos3[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde+0x18,
+};
+
+uint8_t sp2518_contrast_pos4[] = {
+ 0xfd,0x00,
+ 0xde,SP2518_P0_0xde+0x20,
+};
+
+// Saturation
+uint8_t sp2518_saturation_neg4[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3-32,
+ 0xd4,SP2518_P0_0xd4-32,
+ 0xd6,SP2518_P0_0xd6-32,
+ 0xd7,SP2518_P0_0xd7-32,
+ 0xd8,SP2518_P0_0xd8-32,//UV outdoor
+ 0xd9,SP2518_P0_0xd9-32,//UV indoor
+ 0xda,SP2518_P0_0xda-32,//UV dummy
+ 0xdb,SP2518_P0_0xdb-32,//UV lowlight
+};
+
+uint8_t sp2518_saturation_neg3[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3-24,
+ 0xd4,SP2518_P0_0xd4-24,
+ 0xd6,SP2518_P0_0xd6-24,
+ 0xd7,SP2518_P0_0xd7-24,
+ 0xd8,SP2518_P0_0xd8-24,//UV outdoor
+ 0xd9,SP2518_P0_0xd9-24,//UV indoor
+ 0xda,SP2518_P0_0xda-24,//UV dummy
+ 0xdb,SP2518_P0_0xdb-24,//UV lowlight
+};
+
+uint8_t sp2518_saturation_neg2[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3-16,
+ 0xd4,SP2518_P0_0xd4-16,
+ 0xd6,SP2518_P0_0xd6-16,
+ 0xd7,SP2518_P0_0xd7-16,
+ 0xd8,SP2518_P0_0xd8-16,//UV outdoor
+ 0xd9,SP2518_P0_0xd9-16,//UV indoor
+ 0xda,SP2518_P0_0xda-16,//UV dummy
+ 0xdb,SP2518_P0_0xdb-16,//UV lowlight
+};
+
+uint8_t sp2518_saturation_neg1[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3-8,
+ 0xd4,SP2518_P0_0xd4-8,
+ 0xd6,SP2518_P0_0xd6-8,
+ 0xd7,SP2518_P0_0xd7-8,
+ 0xd8,SP2518_P0_0xd8-8,//UV outdoor
+ 0xd9,SP2518_P0_0xd9-8,//UV indoor
+ 0xda,SP2518_P0_0xda-8,//UV dummy
+ 0xdb,SP2518_P0_0xdb-8,//UV lowlight
+};
+
+uint8_t sp2518_saturation_zero[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3,
+ 0xd4,SP2518_P0_0xd4,
+ 0xd6,SP2518_P0_0xd6,
+ 0xd7,SP2518_P0_0xd7,
+ 0xd8,SP2518_P0_0xd8,//UV outdoor
+ 0xd9,SP2518_P0_0xd9,//UV indoor
+ 0xda,SP2518_P0_0xda,//UV dummy
+ 0xdb,SP2518_P0_0xdb,//UV lowlight
+};
+
+uint8_t sp2518_saturation_pos1[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3+8,
+ 0xd4,SP2518_P0_0xd4+8,
+ 0xd6,SP2518_P0_0xd6+8,
+ 0xd7,SP2518_P0_0xd7+8,
+ 0xd8,SP2518_P0_0xd8+8,//UV outdoor
+ 0xd9,SP2518_P0_0xd9+8,//UV indoor
+ 0xda,SP2518_P0_0xda+8,//UV dummy
+ 0xdb,SP2518_P0_0xdb+8,//UV lowlight
+};
+
+uint8_t sp2518_saturation_pos2[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3+16,
+ 0xd4,SP2518_P0_0xd4+16,
+ 0xd6,SP2518_P0_0xd6+16,
+ 0xd7,SP2518_P0_0xd7+16,
+ 0xd8,SP2518_P0_0xd8+16,//UV outdoor
+ 0xd9,SP2518_P0_0xd9+16,//UV indoor
+ 0xda,SP2518_P0_0xda+16,//UV dummy
+ 0xdb,SP2518_P0_0xdb+16,//UV lowlight
+};
+
+uint8_t sp2518_saturation_pos3[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3+24,
+ 0xd4,SP2518_P0_0xd4+24,
+ 0xd6,SP2518_P0_0xd6+24,
+ 0xd7,SP2518_P0_0xd7+24,
+ 0xd8,SP2518_P0_0xd8+24,//UV outdoor
+ 0xd9,SP2518_P0_0xd9+24,//UV indoor
+ 0xda,SP2518_P0_0xda+24,//UV dummy
+ 0xdb,SP2518_P0_0xdb+24,//UV lowlight
+};
+
+uint8_t sp2518_saturation_pos4[] = {
+ 0xfd,0x00,
+ 0xd3,SP2518_P0_0xd3+32,
+ 0xd4,SP2518_P0_0xd4+32,
+ 0xd6,SP2518_P0_0xd6+32,
+ 0xd7,SP2518_P0_0xd7+32,
+ 0xd8,SP2518_P0_0xd8+32,//UV outdoor
+ 0xd9,SP2518_P0_0xd9+32,//UV indoor
+ 0xda,SP2518_P0_0xda+32,//UV dummy
+ 0xdb,SP2518_P0_0xdb+32,//UV lowlight
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t sp2518_176x144[]={
+};
+
+// QVGA
+uint8_t sp2518_320x240[]={
+};
+
+// CIF
+uint8_t sp2518_352x288[]={
+};
+
+// VGA
+uint8_t sp2518_640_480_regs[]={
+ 0xfd,0x00,
+
+ 0x47,0x00,
+ 0x48,0x00,
+ 0x49,0x04,
+ 0x4a,0xb0,
+
+ 0x4b,0x00,
+ 0x4c,0x00,
+ 0x4d,0x06,
+ 0x4e,0x40,
+
+ 0xfd,0x01,
+ 0x06,0x00,
+ 0x07,0x50,
+ 0x08,0x00,
+ 0x09,0x50,
+ 0x0a,0x01, //480
+ 0x0b,0xe0,
+ 0x0c,0x02, //640
+ 0x0d,0x80,
+ 0x0e,0x01,
+ 0xfd,0x00,
+};
+
+// SVGA
+uint8_t sp2518_800_600_regs[]={
+ 0xfd,0x00,
+
+ 0x47,0x00,
+ 0x48,0x00,
+ 0x49,0x04,
+ 0x4a,0xb0,
+
+ 0x4b,0x00,
+ 0x4c,0x00,
+ 0x4d,0x06,
+ 0x4e,0x40,
+ 0xfd,0x01,
+ 0x06,0x00,
+ 0x07,0x40,
+ 0x08,0x00,
+ 0x09,0x40,
+ 0x0a,0x02, //600
+ 0x0b,0x58,
+ 0x0c,0x03, //800
+ 0x0d,0x20,
+ 0x0e,0x01,
+ 0xfd,0x00,
+};
+
+// XGA
+uint8_t sp2518_1024x768[]={
+};
+
+// 720p
+uint8_t sp2518_1280x720[]={
+};
+
+// UXGA
+uint8_t sp2518_1600_1200_regs[]={
+ 0xfd,0x00,
+ 0x47,0x00,
+ 0x48,0x00,
+ 0x49,0x04,
+ 0x4a,0xb0,
+
+ 0x4b,0x00,
+ 0x4c,0x00,
+ 0x4d,0x06,
+ 0x4e,0x40,
+
+ 0xfd,0x01,
+ 0x0e,0x00,
+ 0xfd,0x00,
+};
+
+// 1080p
+uint8_t sp2518_1920x1080[]={
+};
+
+// QXGA
+uint8_t sp2518_2048x1536[]={
+};
+
+uint8_t sp2518_2592x1944[]={
+};
+
+// Initiliztion
+uint8_t sp2518_default_regs_init[] = {
+ 0xfd,0x00,
+ 0x1b,0x1a,//drv ability
+ 0x0e,0x01,
+
+ 0x0f,0x2f,
+ 0x10,0x2e,
+ 0x11,0x00,
+ 0x12,0x4f,
+ 0x14,0x40,// 0x20 zch 20120920
+ 0x16,0x02,
+ 0x17,0x10,
+ 0x1a,0x1f,
+ 0x1e,0x81,
+ 0x21,0x00,
+ 0x22,0x1b,
+ 0x25,0x10,
+ 0x26,0x25,
+ 0x27,0x6d,
+ 0x2c,0x23,//31 Ronlus remove balck dot0x45,
+ 0x2d,0x75,
+ 0x2e,0x38,//sxga 0x18
+
+ 0x31,0x10,//mirror upside down
+ 0x44,0x03,
+ 0x6f,0x00,
+ 0xa0,0x04,
+ 0x5f,0x01,
+ 0x32,0x00,
+ 0xfd,0x01,
+ 0x2c,0x00,
+ 0x2d,0x00,
+ 0xfd,0x00,
+ 0xfb,0x83,
+ 0xf4,0x09,
+ //Pregain
+ 0xfd,0x01,
+ 0xc6,0x90,
+ 0xc7,0x90,
+ 0xc8,0x90,
+ 0xc9,0x90,
+ //blacklevel
+ 0xfd,0x00,
+ 0x65,0x08,
+ 0x66,0x08,
+ 0x67,0x08,
+ 0x68,0x08,
+
+ //bpc
+ 0x46,0xff,
+ //rpc
+ 0xfd,0x00,
+ 0xe0,0x6c,
+ 0xe1,0x54,
+ 0xe2,0x48,
+ 0xe3,0x40,
+ 0xe4,0x40,
+ 0xe5,0x3e,
+ 0xe6,0x3e,
+ 0xe8,0x3a,
+ 0xe9,0x3a,
+ 0xea,0x3a,
+ 0xeb,0x38,
+ 0xf5,0x38,
+ 0xf6,0x38,
+ 0xfd,0x01,
+ 0x94,0xc0,//f8
+ 0x95,0x38,
+ 0x9c,0x6c,
+ 0x9d,0x38,
+#ifdef CLK24M_48M
+ #if 0
+ //capture preview daylight 48M 50hz fix 9FPS maxgain
+ 0xfd,0x00,
+ 0x30,0x04,
+ 0x03,0x02,
+ 0x04,0xbe,
+ 0x09,0x00,
+ 0x0a,0x64,
+ 0xf0,0x75,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0b,
+ 0x92,0x01,
+ 0x98,0x75,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ // status
+ 0xfd,0x01,
+ 0xce,0x07,
+ 0xcf,0x05,
+ 0xd0,0x07,
+ 0xd1,0x05,
+ 0xd7,0x77,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0x7b,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+ #else
+ //capture preview daylight 48M 50hz fix 8FPS maxgain
+ 0xfd,0x00,
+ 0x30,0x04,
+ 0x03,0x02,
+ 0x04,0x70,
+ 0x09,0x00,
+ 0x0a,0xe4,
+ 0xf0,0x68,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0c,
+ 0x92,0x01,
+ 0x98,0x68,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ // status
+ 0xfd,0x01,
+ 0xce,0xe0,
+ 0xcf,0x04,
+ 0xd0,0xe0,
+ 0xd1,0x04,
+ 0xd7,0x64,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0x68,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+ #endif
+#elif defined(CLK24M_72M)
+ //capturepreviewdaylight72M50hz8-13FPSmaxgain
+ 0xfd,0x00,
+ 0x30,0x08
+ 0x03,0xf6,
+ 0x04,0xbe,
+ 0x09,0x00,
+ 0x0a,0x8b,
+ 0xf0,0xa9,
+ 0xf1,0x00,
+ 0xfd,0x01,
+ 0x90,0x0c,
+ 0x92,0x01,
+ 0x98,0xa9,
+ 0x99,0x00,
+ 0x9a,0x01,
+ 0x9b,0x00,
+
+ //status
+ 0xfd,0x01,
+ 0xce,0xec,
+ 0xcf,0x07,
+ 0xd0,0xec,
+ 0xd1,0x07,
+ 0xd7,0xab,//exp_nr_outd_8lsb
+ 0xd8,0x00,
+ 0xd9,0xaf,//exp_outd_nr_8lsb
+ 0xda,0x00,
+ 0xfd,0x00,
+#endif
+
+#if 0
+ /*24*3pll 8~13fps 50hz*/
+ 0xfd , 0x00,
+ 0x03 , 0x03,
+ 0x04 , 0xf6,
+ 0x05 , 0x00,
+ 0x06 , 0x00,
+ 0x07 , 0x00,
+ 0x08 , 0x00,
+ 0x09 , 0x00,
+ 0x0a , 0x8b,
+ 0x2f , 0x00,
+ 0x30 , 0x08, //0x08 modify by sp_yjp,20120809
+ 0xf0 , 0xa9,
+ 0xf1 , 0x00,
+ 0xfd , 0x01,
+ 0x90 , 0x0c,
+ 0x92 , 0x01,
+ 0x98 , 0xa9,
+ 0x99 , 0x00,
+ 0x9a , 0x01,
+ 0x9b , 0x00,
+
+ //Status
+ 0xfd , 0x01,
+ 0xce , 0xec,
+ 0xcf , 0x07,
+ 0xd0 , 0xec,
+ 0xd1 , 0x07,
+ 0xd7 , 0xab,//a5
+ 0xd8 , 0x00,
+ 0xd9 , 0xaf,//a9
+ 0xda , 0x00,
+ 0xfd , 0x00,
+#endif
+
+ 0xfd,0x01,
+ 0xca,0x30,//mean dummy2low
+ 0xcb,0x50,//mean low2dummy
+ 0xcc,0xc0,//f8;rpc low
+ 0xcd,0xc0,//rpc dummy
+ 0xd5,0x80,//mean normal2dummy
+ 0xd6,0x90,//mean dummy2normal
+ 0xfd,0x00,
+
+ //lens shading
+ 0xfd,0x00,
+ 0xa1,0x20,
+ 0xa2,0x20,
+ 0xa3,0x20,
+ 0xa4,0xff,
+ 0xa5,0x80,
+ 0xa6,0x80,
+ 0xfd,0x01,
+ 0x64,0x1e,//28
+ 0x65,0x1c,//25
+ 0x66,0x1c,//2a
+ 0x67,0x16,//25
+ 0x68,0x1c,//25
+ 0x69,0x1c,//29
+ 0x6a,0x1a,//28
+ 0x6b,0x16,//20
+ 0x6c,0x1a,//22
+ 0x6d,0x1a,//22
+ 0x6e,0x1a,//22
+ 0x6f,0x16,//1c
+ 0xb8,0x04,//0a
+ 0xb9,0x13,//0a
+ 0xba,0x00,//23
+ 0xbb,0x03,//14
+ 0xbc,0x03,//08
+ 0xbd,0x11,//08
+ 0xbe,0x00,//12
+ 0xbf,0x02,//00
+ 0xc0,0x04,//05
+ 0xc1,0x0e,//05
+ 0xc2,0x00,//18
+ 0xc3,0x05,//08
+ //raw filter
+ 0xfd,0x01,
+ 0xde,0x0f,
+ 0xfd,0x00,
+ 0x57,0x08,//raw_dif_thr
+ 0x58,0x08,//a
+ 0x56,0x08,//a
+ 0x59,0x10,
+
+ 0x5a,0xa0,//raw_rb_fac_outdoor
+ 0xc4,0xa0,//60raw_rb_fac_indoor
+ 0x43,0xa0,//40raw_rb_fac_dummy
+ 0xad,0x40,//raw_rb_fac_low
+
+ 0x4f,0xa0,//raw_gf_fac_outdoor
+ 0xc3,0xa0,//60raw_gf_fac_indoor
+ 0x3f,0xa0,//40raw_gf_fac_dummy
+ 0x42,0x40,//raw_gf_fac_low
+ 0xc2,0x15,
+
+ 0xb6,0x80,//raw_gflt_fac_outdoor
+ 0xb7,0x80,//60raw_gflt_fac_normal
+ 0xb8,0x40,//40raw_gflt_fac_dummy
+ 0xb9,0x20,//raw_gflt_fac_low
+
+ 0xfd,0x01,
+ 0x50,0x0c,//raw_grgb_thr
+ 0x51,0x0c,
+ 0x52,0x10,
+ 0x53,0x10,
+ 0xfd,0x00,
+ // awb1
+ 0xfd,0x01,
+ 0x11,0x10,
+ 0x12,0x1f,
+ 0x16,0x1c,
+ 0x18,0x00,
+ 0x19,0x00,
+ 0x1b,0x96,
+ 0x1a,0x9a,//95
+ 0x1e,0x2f,
+ 0x1f,0x29,
+ 0x20,0xff,
+ 0x22,0xff,
+ 0x28,0xce,
+ 0x29,0x8a,
+ 0xfd,0x00,
+ 0xe7,0x03,
+ 0xe7,0x00,
+ 0xfd,0x01,
+ 0x2a,0xf0,
+ 0x2b,0x10,
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,
+ //;gw
+ 0xfd,0x01,//
+ 0x70,0x76,//
+ 0x7b,0x40,//
+ 0x81,0x30,//
+ //;Y_offset
+ 0xfd,0x00,
+ 0xb2,0X10,
+ 0xb3,0x1f,
+ 0xb4,0x30,
+ 0xb5,0x50,
+ //;CNR
+ 0xfd,0x00,
+ 0x5b,0x20,
+ 0x61,0x80,
+ 0x77,0x80,
+ 0xca,0x80,
+ //;YNR
+ 0xab,0x00,
+ 0xac,0x02,
+ 0xae,0x08,
+ 0xaf,0x20,
+ 0xfd,0x00,
+ 0x32,0x0d,
+ 0x33,0xcf,//ef
+ 0x34,0x7f,//3f
+ 0x35,0x40,//3
+ 0xe7,0x03,
+ 0xe7,0x00,
+
+ //SP2518_config_window(WINDOW_SIZE_VGA)
+#if 0 //
+ 0xfd,0x00,
+ 0x4b,0x00,
+ 0x4c,0x00,
+ 0x47,0x00,
+ 0x48,0x00,
+ 0x4d,0x06,
+ 0x4e,0x40,
+ 0x49,0x04,
+ 0x4a,0xb0,
+
+ 0xfd,0x01,
+ 0x06,0x00,
+ 0x07,0x50,
+ 0x08,0x00,
+ 0x09,0x50,
+ 0x0a,0x01, //480
+ 0x0b,0xe0,
+ 0x0c,0x02, //640
+ 0x0d,0x80,
+ 0x0e,0x01,
+ 0xfd,0x00,
+#else //uxga
+ 0xfd,0x00,
+ 0x47,0x00,
+ 0x48,0x00,
+ 0x49,0x04,
+ 0x4a,0xb0,
+
+ 0x4b,0x00,
+ 0x4c,0x00,
+ 0x4d,0x06,
+ 0x4e,0x40,
+
+ 0xfd,0x01,
+ 0x0e,0x00,
+ 0xfd,0x00,
+#endif
+ 0x36, 0x80,
+ 0x5d,0x0e,//vsync delay
+};
+
+// Exit
+uint8_t sp2518_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __SP2518_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/template/template.h b/drivers/media/video/wmt_v4l2/sensors/template/template.h
new file mode 100755
index 00000000..a812b4c8
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/template/template.h
@@ -0,0 +1,219 @@
+
+#ifndef __TEMPLATE_H_
+#define __TEMPLATE_H_
+
+// Scene Mode
+uint8_t template_scene_mode_auto[] = {
+};
+
+uint8_t template_scene_mode_night[] = {
+};
+
+
+// White Balance
+uint8_t template_wb_auto [] = {
+};
+
+uint8_t template_wb_incandescent [] = {
+};
+
+uint8_t template_wb_fluorescent [] = {
+};
+
+uint8_t template_wb_daylight [] = {
+};
+
+uint8_t template_wb_cloudy [] = {
+};
+
+uint8_t template_wb_tungsten [] = {
+};
+
+
+// Exposure
+uint8_t template_exposure_neg6[] = {
+};
+
+uint8_t template_exposure_neg3[] = {
+};
+
+uint8_t template_exposure_zero[] = {
+};
+
+uint8_t template_exposure_pos3[] = {
+};
+
+uint8_t template_exposure_pos6[] = {
+};
+
+
+// Color Effect
+uint8_t template_colorfx_none[] = {
+};
+
+uint8_t template_colorfx_bw[] = {
+};
+
+uint8_t template_colorfx_sepia[] = {
+};
+
+uint8_t template_colorfx_negative[] = {
+};
+
+uint8_t template_colorfx_emboss[] = {
+};
+
+uint8_t template_colorfx_sketch[] = {
+};
+
+uint8_t template_colorfx_sky_blue[] = {
+};
+
+uint8_t template_colorfx_grass_green[] = {
+};
+
+uint8_t template_colorfx_skin_whiten[] = {
+};
+
+uint8_t template_colorfx_vivid[] = {
+};
+
+// Brightness
+uint8_t template_brightness_neg4[] = {
+};
+
+uint8_t template_brightness_neg3[] = {
+};
+
+uint8_t template_brightness_neg2[] = {
+};
+
+uint8_t template_brightness_neg1[] = {
+};
+
+uint8_t template_brightness_zero[] = {
+};
+
+uint8_t template_brightness_pos1[] = {
+};
+
+uint8_t template_brightness_pos2[] = {
+};
+
+uint8_t template_brightness_pos3[] = {
+};
+
+uint8_t template_brightness_pos4[] = {
+};
+
+// Contrast
+uint8_t template_contrast_neg4[] = {
+};
+
+uint8_t template_contrast_neg3[] = {
+};
+
+uint8_t template_contrast_neg2[] = {
+};
+
+uint8_t template_contrast_neg1[] = {
+};
+
+uint8_t template_contrast_zero[] = {
+};
+
+uint8_t template_contrast_pos1[] = {
+};
+
+uint8_t template_contrast_pos2[] = {
+};
+
+uint8_t template_contrast_pos3[] = {
+};
+
+uint8_t template_contrast_pos4[] = {
+};
+
+// Saturation
+uint8_t template_saturation_neg4[] = {
+};
+
+uint8_t template_saturation_neg3[] = {
+};
+
+uint8_t template_saturation_neg2[] = {
+};
+
+uint8_t template_saturation_neg1[] = {
+};
+
+uint8_t template_saturation_zero[] = {
+};
+
+uint8_t template_saturation_pos1[] = {
+};
+
+uint8_t template_saturation_pos2[] = {
+};
+
+uint8_t template_saturation_pos3[] = {
+};
+
+uint8_t template_saturation_pos4[] = {
+};
+
+
+// Resolution
+
+// QCIF
+uint8_t template_176_144_regs[]={
+};
+
+// QVGA
+uint8_t template_320_240_regs[]={
+};
+
+// CIF
+uint8_t template_352_288_regs[]={
+};
+
+// VGA
+uint8_t template_640_480_regs[]={
+};
+
+// SVGA
+uint8_t template_800_600_regs[]={
+};
+
+// XGA
+uint8_t template_1024_768_regs[]={
+};
+
+// 720p
+uint8_t template_1280_720_regs[]={
+};
+
+// UXGA
+uint8_t template_1600_1200_regs[]={
+};
+
+// 1080p
+uint8_t template_1920_1080_regs[]={
+};
+
+// QXGA
+uint8_t template_2048_1536_regs[]={
+};
+
+uint8_t template_2592_1944_regs[]={
+};
+
+// Initiliztion
+uint8_t template_default_regs_init[] = {
+};
+
+// Exit
+uint8_t template_default_regs_exit[] = {
+};
+
+#endif /* #ifndef __TEMPLATE_H_ */
diff --git a/drivers/media/video/wmt_v4l2/sensors/wmt-cmos.c b/drivers/media/video/wmt_v4l2/sensors/wmt-cmos.c
new file mode 100755
index 00000000..a6ed5e50
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/sensors/wmt-cmos.c
@@ -0,0 +1,1264 @@
+/*++
+ * linux/drivers/media/video/wmt_v4l2/cmos/wmt-cmos.c
+ * WonderMedia v4l cmos device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+ --*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+
+#include "wmt-cmos.h"
+#include "cmos-subdev.h"
+#include "../wmt-vid.h"
+
+#include "flash/flash.h"
+
+#define THE_MB_USER "CMOS-MB"
+
+#undef pr_err
+#define pr_err(fmt, args...) printk("[" THE_MB_USER "] " "%s, %d:" fmt, __func__, __LINE__, ##args)
+
+//#define CMOS_REG_TRACE
+#ifdef CMOS_REG_TRACE
+#define CMOS_REG_SET32(addr, val) \
+ PRINT("REG_SET:0x%x -> 0x%0x\n", addr, val);\
+ REG32_VAL(addr) = (val)
+#else
+#define CMOS_REG_SET32(addr, val) REG32_VAL(addr) = (val)
+#endif
+
+//#define CMOS_DEBUG /* Flag to enable debug message */
+//#define CMOS_TRACE
+
+#ifdef CMOS_DEBUG
+#define DBG_MSG(fmt, args...) printk("{%s} " fmt, __FUNCTION__ , ## args)
+#else
+#define DBG_MSG(fmt, args...)
+#endif
+
+#ifdef CMOS_TRACE
+#define TRACE(fmt, args...) printk("{%s}: " fmt, __FUNCTION__ , ## args)
+#else
+#define TRACE(fmt, args...)
+#endif
+
+#define MAX_FB_IN_QUEUE 10
+#define NUM_INPUTS 3
+
+#define CAMERA_TYPE_NA 0 /* not avaliable */
+#define CAMERA_TYPE_CMOS 1 /* CMOS */
+#define CAMERA_TYPE_USB 2 /* USB */
+
+struct regulator *cam_vccvid = NULL;
+struct regulator *cam_dvdd = NULL;
+
+typedef enum {
+ STS_CMOS_READY = 0,
+ STS_CMOS_WAIT = 0x0001,
+ STS_CMOS_RUNNING = 0x0002,
+ STS_CMOS_FB_DONE = 0x0004
+} cmos_status;
+
+typedef struct {
+ VID_FB_M;
+ struct list_head list;
+} cmos_fb_t;
+
+struct cmos_drvinfo {
+ struct list_head head;
+
+ unsigned int frame_size;
+ unsigned int width;
+ unsigned int height;
+
+ unsigned int dft_y_addr;
+ unsigned int dft_c_addr;
+
+ cmos_fb_t fb_pool[MAX_FB_IN_QUEUE];
+ unsigned int fb_cnt;
+
+ unsigned int streamoff;
+ unsigned int dqbuf;
+
+ cmos_status status;
+};
+
+// sync with UbootParam.h in Hal.
+enum {
+ CAMERA_CAP_FLASH = 1 << 0,
+ CAMERA_CAP_FLASH_AUTO = 1 << 1,
+ CAMERA_CAP_HDR = 1 << 2,
+};
+
+struct cmos_dev {
+ int type;
+ int pwdn_gpio;
+ int pwdn_pol;
+ int mirror;
+ u32 cap;
+
+ int id;
+ struct cmos_subdev *sd;
+};
+
+struct cmos_info {
+ int input;
+ int input_count;
+
+ struct cmos_drvinfo drvinfo;
+ struct cmos_dev cd[NUM_INPUTS];
+ struct flash_dev *fl;
+
+ struct mutex lock;
+};
+
+static inline struct cmos_subdev *current_subdev(struct cmos_info *info)
+{
+ if (!info || info->input >= NUM_INPUTS)
+ return NULL;
+
+ return info->cd[info->input].sd;
+}
+
+static DECLARE_WAIT_QUEUE_HEAD(cmos_wait);
+static spinlock_t cmos_lock;
+static int cmos_dev_ref;
+
+static int cmos_dev_setup(struct cmos_info *info)
+{
+ struct cmos_dev *cd;
+ int rc = 0;
+ int i;
+
+ for (i = 0; i < info->input_count; i++) {
+ cd = &info->cd[i];
+ if (cd->type != CAMERA_TYPE_CMOS)
+ continue;
+ rc = gpio_request(cd->pwdn_gpio, "cmos pwdn");
+ if (rc) {
+ pr_err("cmos gpio%d request failed\n", cd->pwdn_gpio);
+ goto err_gpio_req;
+ }
+ gpio_direction_output(cd->pwdn_gpio, !cd->pwdn_pol);
+ }
+ return 0;
+
+err_gpio_req:
+ while (i--)
+ gpio_free(info->cd[i].pwdn_gpio);
+ return rc;
+}
+
+static void cmos_dev_power_up(struct cmos_dev *cd)
+{
+ if (cd->pwdn_gpio > 0) {
+ printk(KERN_DEBUG "%s, gpio-%d\n", __func__, cd->pwdn_gpio);
+ gpio_direction_output(cd->pwdn_gpio, cd->pwdn_pol);
+ msleep(20);
+ }
+}
+
+static void cmos_dev_power_down(struct cmos_dev *cd)
+{
+ if (cd->pwdn_gpio > 0) {
+ printk(KERN_DEBUG "%s, gpio-%d\n", __func__, cd->pwdn_gpio);
+ gpio_direction_output(cd->pwdn_gpio, !cd->pwdn_pol);
+ }
+}
+
+static void cmos_dev_release(struct cmos_info *info)
+{
+ struct cmos_dev *cd;
+ int i;
+
+ for (i = 0; i < info->input_count; i++) {
+ cd = &info->cd[i];
+ if (cd->type != CAMERA_TYPE_CMOS)
+ continue;
+ cmos_dev_power_down(cd);
+ gpio_free(cd->pwdn_gpio);
+ }
+}
+
+static int parse_camera_param(struct cmos_info *info)
+{
+ static char env[] = "wmt.camera.param";
+ struct cmos_dev cd[2];
+ char buf[64];
+ size_t l = sizeof(buf);
+ int i, n;
+ int rc;
+
+ rc = wmt_getsyspara(env, buf, &l);
+ if (rc) {
+ pr_err("Invalid param, please set %s\n", env);
+ return -EINVAL;
+ }
+
+ memset(cd, 0, sizeof(cd));
+ sscanf(buf, "%d:%d:%d:%d:%d:%d:%d:%d:%d:%x",
+ &cd[1].type, &cd[1].pwdn_gpio, &cd[1].pwdn_pol, &cd[1].mirror, &cd[1].cap,
+ &cd[0].type, &cd[0].pwdn_gpio, &cd[0].pwdn_pol, &cd[0].mirror, &cd[0].cap);
+
+ for (n = 0, i = 0; i < ARRAY_SIZE(cd); i++) {
+ struct cmos_dev *c = &cd[i];
+
+ if (c->type != CAMERA_TYPE_CMOS && c->type != CAMERA_TYPE_USB)
+ continue;
+
+ info->cd[n] = cd[i];
+ info->cd[n].id = n;
+
+ pr_info("#%d: type %d, pwdn_gpio %d, pwdn_pol %d, mirror %d, cap 0x%x\n",
+ n, c->type, c->pwdn_gpio, c->pwdn_pol, c->mirror, c->cap);
+ n++;
+ }
+ info->input_count = n;
+
+ return (n == 0) ? -EINVAL : 0;
+}
+
+static int cam_enable(struct cmos_drvinfo *drv, bool en)
+{
+ drv->streamoff = en ? 0 : 1;
+
+ CMOS_REG_SET32(REG_VID_CMOS_EN, en); /* enable CMOS */
+
+ return 0;
+}
+
+static int print_queue(struct cmos_drvinfo *drv)
+{
+#ifdef CMOS_DEBUG
+ struct list_head *next;
+ cmos_fb_t *fb;
+
+ TRACE("Enter\n");
+
+ list_for_each(next, &drv->head) {
+ fb = (cmos_fb_t *) list_entry(next, cmos_fb_t, list);
+ DBG_MSG("[%d] y_addr: 0x%x, c_addr: 0x%x\n",
+ fb->id, fb->y_addr, fb->c_addr );
+ }
+ TRACE("Leave\n");
+#endif
+ return 0;
+}
+
+static int put_queue(struct cmos_drvinfo *drv, cmos_fb_t *fb_in)
+{
+ TRACE("Enter\n");
+
+ list_add_tail(&fb_in->list, &drv->head);
+ wmb();
+ print_queue(drv);
+
+ TRACE("Leave\n");
+
+ return 0;
+}
+
+static int pop_queue(struct cmos_drvinfo *drv, cmos_fb_t *fb_in)
+{
+ TRACE("Enter\n");
+
+ list_del(&fb_in->list);
+ wmb();
+ print_queue(drv);
+
+ TRACE("Leave\n");
+
+ return 0;
+}
+
+static int cmos_cam_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
+{
+ TRACE("Enter\n");
+
+ strlcpy(cap->driver, "wm88xx", sizeof(cap->driver));
+
+ cap->version = KERNEL_VERSION(0, 0, 1);
+
+ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
+ V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
+
+ TRACE("Leave\n");
+ return 0;
+}
+
+static int cmos_cam_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap)
+{
+ pr_err("Not support now!\n");
+ return -EINVAL;
+}
+
+struct wmt_fmt {
+ char *name;
+ u32 fourcc; /* v4l2 format id */
+ int depth;
+};
+
+static struct wmt_fmt formats[] = {
+ {
+ .name = "4:2:2, packed, YUYV",
+ .fourcc = V4L2_PIX_FMT_YUYV,
+ .depth = 16,
+ },
+};
+
+static int cmos_cam_enum_fmt_cap(struct file *file, void *fh, struct v4l2_fmtdesc *f)
+{
+ struct wmt_fmt *fmt;
+
+ if (f->index >= ARRAY_SIZE(formats))
+ return -EINVAL;
+
+ fmt = &formats[f->index];
+
+ strlcpy(f->description, fmt->name, sizeof(f->description));
+ f->pixelformat = fmt->fourcc;
+ return 0;
+}
+
+static int cmos_cam_enum_framesizes(struct file *file, void *fh,
+ struct v4l2_frmsizeenum *fsize)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ int ret;
+
+ mutex_lock(&info->lock);
+ ret = cmos_subdev_call(sd, enum_framesizes, fsize);
+ mutex_unlock(&info->lock);
+ return ret;
+}
+
+static int cmos_cam_g_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+
+ f->fmt.pix.width = drv->width;
+ f->fmt.pix.height = drv->height;
+ return 0;
+}
+
+#define pixfmtstr(x) (x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
+ ((x) >> 24) & 0xff
+
+static int cmos_cam_s_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ struct cmos_subdev *sd = current_subdev(info);
+ struct v4l2_mbus_framefmt mf;
+ int rc;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ printk(KERN_DEBUG "%s: S_FMT %dx%d, fmt %c%c%c%c\n",
+ sd->name, f->fmt.pix.width, f->fmt.pix.height,
+ pixfmtstr(f->fmt.pix.pixelformat));
+
+ mf.width = f->fmt.pix.width;
+ mf.height = f->fmt.pix.height;
+ mf.field = f->fmt.pix.field;
+ mf.colorspace = f->fmt.pix.colorspace;
+
+ rc = cmos_subdev_call(sd, s_mbus_fmt, &mf);
+ if (rc) {
+ pr_err("%s, %s: s_mbus_fmt fail\n", __func__, sd->name);
+ goto out;
+ }
+
+ /* host set fmt */
+ rc = wmt_vid_set_mode(mf.width, mf.height, f->fmt.pix.pixelformat);
+ if (rc) {
+ goto out;
+ }
+
+ drv->width = mf.width;
+ drv->height = mf.height;
+
+ switch (f->fmt.pix.pixelformat) {
+ case V4L2_PIX_FMT_RGB32: // *4 for ARGB display frambuffer
+ drv->frame_size = drv->width * drv->height * 4;
+ break;
+ case V4L2_PIX_FMT_NV21:
+ case V4L2_PIX_FMT_NV12:
+ drv->frame_size = (drv->width * drv->height * 3) / 2;
+ break;
+ case V4L2_PIX_FMT_YUYV: // YC422
+ drv->frame_size = drv->width * drv->height * 2;
+ break;
+ default:
+ drv->frame_size = 0;
+ rc = -EINVAL;
+ break;
+ }
+
+out:
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return rc;
+}
+
+static int cmos_cam_try_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ struct v4l2_mbus_framefmt mf;
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ mf.width = f->fmt.pix.width;
+ mf.height = f->fmt.pix.height;
+ mf.field = f->fmt.pix.field;
+ mf.colorspace = f->fmt.pix.colorspace;
+
+ ret = cmos_subdev_call(sd, try_mbus_fmt, &mf);
+ if (!ret) {
+ f->fmt.pix.width = mf.width;
+ f->fmt.pix.height = mf.height;
+ }
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *rb)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ cmos_fb_t *fb;
+ int i, j;
+ int ret = 0;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ if ((rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ||
+ (rb->memory != V4L2_MEMORY_MMAP) ||
+ (rb->count > MAX_FB_IN_QUEUE) ) {
+ pr_err("rb->type: 0x%x, rb->memory: 0x%x, rb->count: %d\n",
+ rb->type, rb->memory, rb->count);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ if (!drv->streamoff) {
+ pr_err("reqbufs: streaming active\n");
+ ret = -EBUSY;
+ goto out;
+ }
+
+ if (rb->count == 0) {
+ /* Free memory */
+ for (i = 0; i < drv->fb_cnt; i++) {
+ fb = &drv->fb_pool[i];
+ if (fb->y_addr) {
+ mb_free(fb->y_addr);
+ memset(fb, 0, sizeof(cmos_fb_t));
+ }
+ }
+ drv->fb_cnt = 0;
+ INIT_LIST_HEAD(&drv->head);
+ goto out;
+ }
+
+ drv->fb_cnt = rb->count;
+
+ DBG_MSG(" Frame Size: %d Bytes\n", drv->frame_size);
+ DBG_MSG(" fb_cnt: %d\n", drv->fb_cnt);
+
+ /* Allocate memory */
+ for (i = 0; i < drv->fb_cnt; i++) {
+ fb = &drv->fb_pool[i];
+ fb->y_addr = mb_alloc(drv->frame_size);
+ DBG_MSG("%d CMOS MB_allocate size %d\n", i,drv->frame_size);
+ if (fb->y_addr == 0) {
+ /* Allocate MB memory size fail */
+ pr_err("[%d] >> Allocate MB memory (%d) fail!\n", i, drv->frame_size);
+ for (j=0; jfb_pool[j];
+ mb_free(fb->y_addr);
+ }
+ ret = -EINVAL;
+ goto out;
+ }
+ fb->c_addr = fb->y_addr + drv->width * drv->height;
+ fb->id = i;
+ fb->is_busy = 0;
+ fb->done = 0;
+ DBG_MSG("[%d] fb: 0x%x, y_addr: 0x%x, c_addr: 0x%x\n",
+ i, (unsigned int)fb, fb->y_addr, fb->c_addr);
+ }
+
+out:
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_querybuf(struct file *file, void *fh, struct v4l2_buffer *b)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+
+ TRACE("Enter (index: %d)\n", b->index);
+ mutex_lock(&info->lock);
+
+ if (b->index < MAX_FB_IN_QUEUE) {
+ cmos_fb_t *fb = &drv->fb_pool[b->index];
+ b->length = drv->frame_size;
+ b->m.offset = fb->y_addr;
+ } else {
+ b->length = 0;
+ b->m.offset = 0;
+ }
+ DBG_MSG(" b->length: %d\n", b->length);
+ DBG_MSG(" b->m.offset: 0x%x\n", b->m.offset);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave (index: %d)\n", b->index);
+ return 0;
+}
+
+static int cmos_cam_qbuf(struct file *file, void *fh, struct v4l2_buffer *b)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ cmos_fb_t *fb;
+
+ TRACE("Enter (index: %d)\n", b->index);
+ mutex_lock(&info->lock);
+
+ fb = &drv->fb_pool[b->index];
+ put_queue(drv, fb);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave (index: %d)\n", b->index);
+ return 0;
+}
+
+static int cmos_cam_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ unsigned long flags =0;
+ cmos_fb_t *fb = 0;
+ int ret = 0;
+
+ TRACE("Enter (index: %d)\n", b->index);
+ mutex_lock(&info->lock);
+
+ if (drv->streamoff) {
+#if 0
+ struct list_head *next;
+
+ /* CMOS sensor did not work now */
+ list_for_each(next, &drv->head) {
+ fb = (cmos_fb_t *)list_entry(next, cmos_fb_t, list);
+ if (fb) {
+ pop_queue(drv, fb);
+ break;
+ }
+ }
+#else
+ ret = -EINVAL;
+ pr_err("stream is off\n");
+#endif
+ goto EXIT_cmos_cam_dqbuf;
+ }
+
+ fb = (cmos_fb_t *)wmt_vid_get_cur_fb();
+ if (!fb) {
+ goto EXIT_cmos_cam_dqbuf;
+ }
+
+ spin_lock_irqsave(&cmos_lock, flags);
+
+ DBG_MSG("Set DQBUF on\n");
+ drv->dqbuf = 1;
+
+ spin_unlock_irqrestore(&cmos_lock, flags);
+
+ if ((wait_event_interruptible_timeout(cmos_wait,
+ (drv->status & STS_CMOS_FB_DONE),
+ 400) == 0)) {
+ pr_err("CMOS Time out in 400 ms\n");
+ ret = -ETIMEDOUT;
+ goto EXIT_cmos_cam_dqbuf;
+ }
+ drv->status &= (~STS_CMOS_FB_DONE);
+
+ DBG_MSG("[%d] fb: 0x%p\n", fb->id, fb);
+ pop_queue(drv, fb);
+
+ b->length = drv->frame_size;
+ b->m.offset = fb->y_addr;
+ b->index = fb->id;
+
+EXIT_cmos_cam_dqbuf:
+ mutex_unlock(&info->lock);
+ TRACE("Leave (index: %d)\n", b->index);
+ return ret;
+}
+
+static int cmos_cam_enum_input(struct file *file, void *fh, struct v4l2_input *inp)
+{
+ if (inp->index >= NUM_INPUTS)
+ return -EINVAL;
+
+ inp->type = V4L2_INPUT_TYPE_CAMERA;
+ inp->std = V4L2_STD_ALL;
+ sprintf(inp->name, "Camera %u", inp->index);
+ return 0;
+}
+
+static int cmos_cam_g_input(struct file *file, void *fh, unsigned int *i)
+{
+ struct cmos_info *info = file->private_data;
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+ *i = info->input;
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return 0;
+}
+
+static int cmos_cam_s_input(struct file *file, void *fh, unsigned int i)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_dev *cd;
+ struct cmos_subdev *sd;
+ int rc,j;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ if (i >= info->input_count) {
+ rc = -EINVAL;
+ goto out;
+ }
+
+ {
+ /* Here we use info->cd[2] as nmi cmos device */
+ extern int nmi_running(void);
+ if (nmi_running()) {
+ pr_info("nmi running, use cmos device 2 ...\n");
+ i = 2;
+ }
+ }
+
+ for (j = 0; j < info->input_count; j++) {
+ if(j==i)
+ continue;
+ cd = &info->cd[j];
+ if (cd->type != CAMERA_TYPE_CMOS)
+ continue;
+ cmos_dev_power_down(cd);
+ }
+
+ info->input = i;
+
+ cd = &info->cd[i];
+ sd = cd->sd;
+
+ cmos_dev_power_up(cd);
+
+ if (!sd) {
+ sd = cmos_subdev_get_by_try();
+ if (!sd) {
+ pr_err("cmos detect failed\n");
+ rc = -EINVAL;
+ goto err_detect;
+ }
+ pr_info("cmos #%d: detected %s\n", i, sd->name);
+ cd->sd = sd;
+ }
+
+ rc = cmos_subdev_call(sd, init);
+ if (rc) {
+ goto err_init;
+ }
+
+ pr_info("[cmos] %s init success\n", sd->name);
+ goto out;
+
+err_init:
+err_detect:
+ cmos_dev_power_down(cd);
+out:
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return rc;
+}
+
+static int cmos_cam_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *a)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ if (a->id == V4L2_CID_CAMERA_FLASH_MODE) {
+ struct cmos_dev *cd = &info->cd[info->input];
+ ret = (cd->cap & CAMERA_CAP_FLASH) ? v4l2_ctrl_query_fill(a, 0, 4, 1, 0) : -EINVAL;
+ } else
+ ret = cmos_subdev_call(sd, queryctrl, a);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_g_ctrl(struct file *file, void *fh, struct v4l2_control *a)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+ ret = cmos_subdev_call(sd, g_ctrl, a);
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_s_ctrl(struct file *file, void *fh, struct v4l2_control *a)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ char *s;
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ /* for debug */
+ switch (a->id) {
+ case V4L2_CID_CAMERA_SCENE_MODE: s = "Scene Mode"; break;
+ case V4L2_CID_DO_WHITE_BALANCE: s = "White Balance"; break;
+ case V4L2_CID_EXPOSURE: s = "Exposure"; break;
+ case V4L2_CID_HFLIP: s = "H-flip"; break;
+ case V4L2_CID_VFLIP: s = "V-flip"; break;
+ case V4L2_CID_CAMERA_FLASH_MODE: s = "Flash Mode"; break;
+ case V4L2_CID_CAMERA_FOCUS_MODE: s = "Focus Mode"; break;
+ case V4L2_CID_CAMERA_FOCUS_POSITION_X: s = "Focus Area X"; break;
+ case V4L2_CID_CAMERA_FOCUS_POSITION_Y: s = "Focus Area Y"; break;
+ default: s = "Unknown"; break;
+ }
+ printk(KERN_DEBUG "%s: S_CTRL: %s, value %d\n", sd->name, s, a->value);
+
+ if (a->id == V4L2_CID_CAMERA_FLASH_MODE) {
+ struct cmos_dev *cd = &info->cd[info->input];
+ if (!(cd->cap & CAMERA_CAP_FLASH))
+ ret = -EINVAL;
+ else
+ ret = flash_set_mode(info->fl, a->value);
+ } else
+ ret = cmos_subdev_call(sd, s_ctrl, a);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_g_parm(struct file *file, void *fh,
+ struct v4l2_streamparm *parm)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+ ret= cmos_subdev_call(sd,g_parm, parm);
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+
+ return ret;
+}
+
+static int cmos_cam_s_parm(struct file *file, void *fh,
+ struct v4l2_streamparm *parm)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_subdev *sd = current_subdev(info);
+ int ret;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+ ret= cmos_subdev_call(sd,s_parm, parm);
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+
+ return ret;
+}
+
+static int cmos_cam_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ cmos_fb_t *fb;
+ int ret = 0;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ if (!list_empty(&drv->head)) {
+ fb = list_first_entry(&drv->head, cmos_fb_t, list);
+ wmt_vid_set_cur_fb((vid_fb_t *)fb);
+ cam_enable(drv, true);
+ } else
+ ret = -EINVAL;
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return 0;
+}
+
+static int cmos_cam_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
+{
+ struct cmos_info *info = file->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ cam_enable(drv, false);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return 0;
+}
+
+static int cmos_cam_mmap(struct file *file, struct vm_area_struct *vma)
+{
+ int ret;
+
+ TRACE("Enter\n");
+
+ vma->vm_flags |= VM_IO | VM_RESERVED;
+ vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+
+ ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+ vma->vm_end - vma->vm_start, vma->vm_page_prot);
+
+ TRACE("Leave\n");
+ return ret;
+}
+
+static irqreturn_t cmos_isr(int irq, void *data)
+{
+ struct cmos_info *info = data;
+ struct cmos_drvinfo *drv;
+ struct list_head *next;
+ cmos_fb_t *cur_fb, *fb;
+ unsigned long flags = 0;
+ int mb_count = 0;
+
+ //TRACE("Enter\n");
+// printk("i");
+
+ if (!info) {
+ return IRQ_NONE;
+ }
+
+ drv = &info->drvinfo;
+
+ if (drv->dqbuf == 1) {
+ spin_lock_irqsave(&cmos_lock, flags);
+ drv->dqbuf = 0;
+// DBG_MSG("Set DBBUF off\n");
+ spin_unlock_irqrestore(&cmos_lock, flags);
+
+ cur_fb = (cmos_fb_t *)wmt_vid_get_cur_fb();
+ list_for_each(next, &drv->head) {
+ fb = (cmos_fb_t *) list_entry(next, cmos_fb_t, list);
+ if (fb == cur_fb) {
+ /*--------------------------------------------------------------
+ Get next FB
+ --------------------------------------------------------------*/
+ fb = (cmos_fb_t *) list_entry(cur_fb->list.next, cmos_fb_t, list);
+
+ do {
+ if (((vid_fb_t *)fb)->y_addr != 0)
+ mb_count = mb_counter(((vid_fb_t *)fb)->y_addr);
+
+ if (mb_count != 1) {
+ fb = (cmos_fb_t *) list_entry(fb->list.next, cmos_fb_t, list);
+// DBG_MSG("mbcount skip 0x%08x mb_count %d \n",
+// ((vid_fb_t *)fb)->y_addr,mb_count);
+ continue;
+ }
+ } while ((mb_count != 1) && (fb != cur_fb));
+
+ cur_fb->is_busy = 0;
+ cur_fb->done = 1;
+
+// DBG_MSG("[%d] done: %d, is_busy: %d\n",
+// cur_fb->id, cur_fb->done, cur_fb->is_busy);
+// DBG_MSG("[%d] New FB done: %d, is_busy: %d\n",
+// fb->id, fb->done, fb->is_busy);
+
+ wmt_vid_set_cur_fb((vid_fb_t *)fb);
+ drv->status |= STS_CMOS_FB_DONE;
+ wake_up_interruptible(&cmos_wait);
+ break;
+ }
+ }
+ } /* if( drv->dqbuf == 1 ) */
+
+ CMOS_REG_SET32(REG_VID_INT_CTRL, REG32_VAL(REG_VID_INT_CTRL));
+
+ //TRACE("Leave\n");
+// printk("o");
+
+ return IRQ_HANDLED;
+}
+
+static int cmos_cam_open(struct file *filp)
+{
+ struct cmos_info *info = video_drvdata(filp);
+ struct cmos_drvinfo *drv;
+ int ret = 0;
+
+ printk(KERN_DEBUG "%s()\n", __func__);
+ //if(cam_vccvid)
+ //regulator_enable(cam_vccvid);
+
+ //if(cam_dvdd)
+ //regulator_enable(cam_dvdd);
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+ if (cmos_dev_ref) {
+ ret = -EBUSY;
+ goto out;
+ }
+ cmos_dev_ref++;
+
+ ret = request_irq(WMT_VID_IRQ, (void *)&cmos_isr, IRQF_SHARED,
+ "wmt-cmos", (void *)info);
+ if (ret) {
+ pr_err("CMOS: Failed to register CMOS irq %i\n", WMT_VID_IRQ);
+ cmos_dev_ref--;
+ goto out;
+ }
+
+ drv = &info->drvinfo;
+ drv->dqbuf = 0;
+ drv->status = STS_CMOS_READY;
+ INIT_LIST_HEAD(&drv->head);
+
+ spin_lock_init(&cmos_lock);
+
+ filp->private_data = info;
+
+ wmt_vid_open(VID_MODE_CMOS, NULL);
+ cam_enable(drv, false);
+
+out:
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return ret;
+}
+
+static int cmos_cam_release(struct file *filp)
+{
+ struct cmos_info *info = filp->private_data;
+ struct cmos_drvinfo *drv = &info->drvinfo;
+ struct cmos_subdev *sd;
+ int i;
+
+ TRACE("Enter\n");
+ mutex_lock(&info->lock);
+
+ free_irq(WMT_VID_IRQ, (void *)info);
+
+ if (drv) {
+ /* Free memory */
+ for (i = 0; i < drv->fb_cnt; i++) {
+ cmos_fb_t *fb = &drv->fb_pool[i];
+ if (fb->y_addr) {
+ mb_free(fb->y_addr);
+ memset(fb, 0, sizeof(cmos_fb_t));
+ }
+ }
+ }
+
+ sd = current_subdev(info);
+ if (sd) {
+ cmos_subdev_call(sd, exit);
+ }
+
+ cmos_dev_power_down(&info->cd[info->input]);
+ wmt_vid_close(VID_MODE_CMOS);
+ cmos_dev_ref--;
+
+// if(cam_vccvid)
+// regulator_disable(cam_vccvid);
+
+ //if(cam_dvdd)
+ //regulator_disable(cam_dvdd);
+
+ mutex_unlock(&info->lock);
+ TRACE("Leave\n");
+ return 0;
+}
+
+static const struct v4l2_ioctl_ops cmos_ioctl_ops = {
+ .vidioc_querycap = cmos_cam_querycap,
+ .vidioc_enum_input = cmos_cam_enum_input,
+ .vidioc_g_input = cmos_cam_g_input,
+ .vidioc_s_input = cmos_cam_s_input,
+ .vidioc_reqbufs = cmos_cam_reqbufs,
+ .vidioc_querybuf = cmos_cam_querybuf,
+ .vidioc_qbuf = cmos_cam_qbuf,
+ .vidioc_dqbuf = cmos_cam_dqbuf,
+ .vidioc_streamon = cmos_cam_streamon,
+ .vidioc_streamoff = cmos_cam_streamoff,
+ .vidioc_enum_fmt_vid_cap = cmos_cam_enum_fmt_cap,
+ .vidioc_enum_framesizes = cmos_cam_enum_framesizes,
+ .vidioc_g_fmt_vid_cap = cmos_cam_g_fmt_cap,
+ .vidioc_s_fmt_vid_cap = cmos_cam_s_fmt_cap,
+ .vidioc_try_fmt_vid_cap = cmos_cam_try_fmt_cap,
+ .vidioc_g_parm = cmos_cam_g_parm,
+ .vidioc_s_parm = cmos_cam_s_parm,
+ .vidioc_queryctrl = cmos_cam_queryctrl,
+ .vidioc_s_ctrl = cmos_cam_s_ctrl,
+ .vidioc_g_ctrl = cmos_cam_g_ctrl,
+ .vidioc_cropcap = cmos_cam_cropcap,
+};
+
+static const struct v4l2_file_operations cmos_cam_fops = {
+ .owner = THIS_MODULE,
+ .open = cmos_cam_open,
+ .release = cmos_cam_release,
+ .unlocked_ioctl = video_ioctl2,
+ .mmap = cmos_cam_mmap,
+};
+
+static struct video_device cmos_cam = {
+ .name = "cmos_cam",
+ .fops = &cmos_cam_fops,
+ .ioctl_ops = &cmos_ioctl_ops,
+ .release = video_device_release_empty,
+ .tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM,
+ .minor = -1
+};
+
+static int cmos_probe(struct platform_device *pdev)
+{
+ int ret;
+ struct cmos_info *info;
+
+ info = kzalloc(sizeof *info, GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ // ldo6 can't disable.
+ cam_vccvid = regulator_get(NULL, "ldo6");
+ if (IS_ERR(cam_vccvid)){
+ cam_vccvid = NULL;
+ pr_err("failed to get camera vccvid\n");
+ }
+
+ cam_dvdd= regulator_get(NULL, "ldo5");
+ if (IS_ERR(cam_dvdd)){
+ cam_dvdd = NULL;
+ pr_err("failed to get camera dvdd\n");
+ }
+
+ if(cam_vccvid){
+ regulator_set_voltage(cam_vccvid, 2800000, 2800000);
+ regulator_enable(cam_vccvid);
+// regulator_disable(cam_vccvid);
+ }
+
+ if(cam_dvdd){
+ regulator_set_voltage(cam_dvdd, 1800000, 1800000);
+ regulator_enable(cam_dvdd);
+ //regulator_disable(cam_dvdd);
+ }
+
+ ret = parse_camera_param(info);
+ if (ret)
+ goto err_param;
+
+ ret = cmos_dev_setup(info);
+ if (ret)
+ goto err_dev_seup;
+
+ ret = video_register_device(&cmos_cam, VFL_TYPE_GRABBER, -1);
+ if (ret) {
+ pr_err("WonderMedia CMOS camera register failed\n");
+ goto err_video_register;
+ }
+
+ mutex_init(&info->lock);
+ video_set_drvdata(&cmos_cam, info);
+
+ info->fl = flash_instantiation();
+
+ pr_info("WonderMedia CMOS camera register OK \n");
+ return 0;
+
+err_video_register:
+err_dev_seup:
+err_param:
+ kfree(info);
+ return ret;
+}
+
+static int cmos_remove(struct platform_device *pdev)
+{
+ struct cmos_info *info = video_get_drvdata(&cmos_cam);
+
+ pr_info("%s()\n", __func__);
+
+ flash_destroy(info->fl);
+ video_unregister_device(&cmos_cam);
+ cmos_dev_release(info);
+ mutex_destroy(&info->lock);
+ kfree(info);
+
+ if(cam_vccvid)
+ regulator_put(cam_vccvid);
+
+ if(cam_dvdd)
+ regulator_put(cam_dvdd);
+ return 0;
+}
+
+static int cmos_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ printk(KERN_DEBUG "%s()\n", __func__);
+ return 0;
+}
+
+static int cmos_resume(struct platform_device *pdev)
+{
+ struct cmos_info *info = video_get_drvdata(&cmos_cam);
+ struct cmos_dev *cd;
+ int i;
+
+ printk(KERN_DEBUG "%s()\n", __func__);
+
+ for (i = 0; i < info->input_count; i++) {
+ cd = &info->cd[i];
+ if (cd->type != CAMERA_TYPE_CMOS)
+ continue;
+ gpio_re_enabled(cd->pwdn_gpio);
+ }
+
+ return 0;
+}
+
+static struct platform_driver cmos_driver = {
+ .driver = {
+ .name = "cmos",
+ },
+ .remove = cmos_remove,
+ .suspend = cmos_suspend,
+ .resume = cmos_resume,
+};
+
+static void cmos_platform_release(struct device *device) { }
+
+static struct platform_device cmos_device = {
+ .name = "cmos",
+ .dev = {
+ .release = cmos_platform_release,
+ },
+};
+
+static int __init cmos_init(void)
+{
+ int ret;
+
+ cmos_subdev_init();
+
+ ret = wmt_vid_i2c_init(0, 0x52);
+ if (ret) {
+ goto err_i2c_init;
+ }
+
+ ret = platform_device_register(&cmos_device);
+ if (ret) {
+ goto err_dev_register;
+ }
+
+ ret = platform_driver_probe(&cmos_driver, cmos_probe);
+ if (ret) {
+ goto err_drv_probe;
+ }
+
+ return 0;
+
+err_drv_probe:
+ platform_device_unregister(&cmos_device);
+err_dev_register:
+ wmt_vid_i2c_release();
+err_i2c_init:
+ cmos_subdev_exit();
+ return ret;
+}
+
+static void __exit cmos_exit(void)
+{
+ pr_info("%s()\n", __func__);
+
+ platform_driver_unregister(&cmos_driver);
+ platform_device_unregister(&cmos_device);
+ wmt_vid_i2c_release();
+ cmos_subdev_exit();
+}
+
+module_init(cmos_init);
+module_exit(cmos_exit);
+
+MODULE_AUTHOR("WonderMedia SW Team Max Chen");
+MODULE_DESCRIPTION("cmos device driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/video/wmt_v4l2/sensors/wmt-cmos.h b/drivers/media/video/wmt_v4l2/sensors/wmt-cmos.h
new file mode 100755
index 00000000..e69de29b
diff --git a/drivers/media/video/wmt_v4l2/wmt-vid.c b/drivers/media/video/wmt_v4l2/wmt-vid.c
new file mode 100755
index 00000000..934f0ba9
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/wmt-vid.c
@@ -0,0 +1,820 @@
+/*++
+ * linux/drivers/media/video/wmt_v4l2/wmt-vid.c
+ * WonderMedia v4l video input device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#include
+#include
+#include
+#include
+#include "wmt-vid.h"
+
+//#define VID_REG_TRACE
+#ifdef VID_REG_TRACE
+#define VID_REG_SET32(addr, val) \
+ PRINT("REG_SET:0x%x -> 0x%0x\n", addr, val);\
+ REG32_VAL(addr) = (val)
+#else
+#define VID_REG_SET32(addr, val) REG32_VAL(addr) = (val)
+#endif
+
+//#define VID_DEBUG /* Flag to enable debug message */
+//#define VID_DEBUG_DETAIL
+//#define VID_TRACE
+//#define VID_INFO
+
+#ifdef VID_DEBUG
+#define DBG_MSG(fmt, args...) PRINT("{%s} " fmt, __FUNCTION__ , ## args)
+#else
+#define DBG_MSG(fmt, args...)
+#endif
+
+#ifdef VID_DEBUG_DETAIL
+#define DBG_DETAIL(fmt, args...) PRINT("{%s} " fmt, __FUNCTION__ , ## args)
+#else
+#define DBG_DETAIL(fmt, args...)
+#endif
+
+#ifdef VID_TRACE
+ #define TRACE(fmt, args...) PRINT("{%s}: " fmt, __FUNCTION__ , ## args)
+#else
+ #define TRACE(fmt, args...)
+#endif
+
+#ifdef VID_INFO
+ #define DBG_INFO(fmt, args...) PRINT("[INFO] {%s}: " fmt, __FUNCTION__ , ## args)
+#else
+ #define DBG_INFO(fmt, args...)
+#endif
+
+#define DBG_ERR(fmt, args...) PRINT("*E* {%s} " fmt, __FUNCTION__ , ## args)
+
+#define VID_INT_MODE
+
+static vid_fb_t *_cur_fb;
+static vid_fb_t *_prev_fb;
+
+static spinlock_t vid_lock;
+static unsigned int vid_i2c_gpio_en = 0;
+
+static swi2c_reg_t vid_i2c0_scl;
+static swi2c_reg_t vid_i2c0_sda;
+static swi2c_handle_t vid_swi2c;
+
+static struct i2c_adapter *vid_i2c_adapter[2];
+static struct i2c_client *vid_i2c_client[2];
+
+static int vid_dev_tot_num;
+static int vid_dev_num ;
+
+#define WMT_VID_I2C_CHANNEL 2
+
+static void vid_gpio_init(vid_mode mode)
+{
+ auto_pll_divisor(DEV_C24MOUT, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_VID, CLK_ENABLE, 0, 0);
+
+ GPIO_CTRL_GP8_VDIN_BYTE_VAL = 0x0;
+ PULL_EN_GP8_VDIN_BYTE_VAL = 0x0;
+
+ GPIO_CTRL_GP9_VSYNC_BYTE_VAL &= ~(BIT0|BIT1|BIT2);
+ PULL_EN_GP9_VSYNC_BYTE_VAL &= ~(BIT0|BIT1|BIT2);
+
+ GPIO_CTRL_GP17_I2C_BYTE_VAL &= ~BIT6; //24Mhz on , not set to GPIO
+
+ return;
+}
+
+void vid_set_ntsc_656(void)
+{
+ VID_REG_SET32( REG_BASE_VID+0x08, 0x0 );
+ VID_REG_SET32( REG_BASE_VID+0x30, 0x000006b4); // N_LN_LENGTH : 133m: d1716(6b4h) , 166m: d1715(6b3)
+}
+
+void vid_set_pal_656(void)
+{
+ VID_REG_SET32( REG_BASE_VID+0x08, 0x0 );
+ VID_REG_SET32( REG_BASE_VID+0x34, 0x000006c0 ); // P_LN_LENGTH : 133m: d1728(6c0h) , 166m: d1727(6bf)
+}
+
+void wmt_vid_set_common_mode(vid_tvsys_e tvsys)
+{
+ TRACE("wmt_vid_set_common_mode() \n");
+
+ if (tvsys == VID_NTSC)
+ vid_set_ntsc_656();
+ else
+ vid_set_pal_656();
+
+ VID_REG_SET32( REG_BASE_VID+0x04, 0x100 ); // TMODE[0],REG_UPDATE[8]
+
+ if (tvsys==VID_NTSC) {
+ VID_REG_SET32( REG_BASE_VID+0x14, 0x10a0004 ); // VSBB[25:16]:VSBT[9:0]; 139/1=PAL 10A/4=NTSC
+ VID_REG_SET32( REG_BASE_VID+0x1c, 0x1370018 ); // PAL_TACTEND[25:16], PAL_TACTBEG[9:0]
+ VID_REG_SET32( REG_BASE_VID+0x20, 0x26f0151 ); // PAL_BACTEND[25:16], PAL_BACTBEG[9:0]
+
+ VID_REG_SET32( REG_BASE_VID+0x68, 720 ); // WIDTH[7:0];
+ VID_REG_SET32( REG_BASE_VID+0x6C, 768 ); // LN_WIDTH[7:0]
+ VID_REG_SET32( REG_BASE_VID+0x70, 480 ); // VID_HEIGHT[9:0]
+ } else {
+ VID_REG_SET32( REG_BASE_VID+0x14, 0x1390001 ); // VSBB[25:16]:VSBT[9:0]; 139/1=PAL 10A/4=NTSC
+ VID_REG_SET32( REG_BASE_VID+0x1c, 0x1360017 ); // PAL_TACTEND[25:16], PAL_TACTBEG[9:0]
+ VID_REG_SET32( REG_BASE_VID+0x20, 0x26f0150 ); // PAL_BACTEND[25:16], PAL_BACTBEG[9:0]
+
+ VID_REG_SET32( REG_BASE_VID+0x68, 720 ); // WIDTH[7:0];
+ VID_REG_SET32( REG_BASE_VID+0x6C, 768 ); // LN_WIDTH[7:0]
+ VID_REG_SET32( REG_BASE_VID+0x70, 576 ); // VID_HEIGHT[9:0]
+ }
+
+ VID_REG_SET32( REG_BASE_VID+0x10, 0x20001 ); // HSB[9:0];HSW[9:0];HSP[28]
+ VID_REG_SET32( REG_BASE_VID+0x18, 0x3f0002 ); // HVDLY @[25:16];VSW @[9:0];VSP[28]
+ VID_REG_SET32( REG_BASE_VID+0x24, 0x1060017 ); // NTSC_TACTEND[25:16],NTSC_TACTBEG[9:0]
+ VID_REG_SET32( REG_BASE_VID+0x28, 0x20d011e ); // NTSC_BACTEND[25:16],NTSC_BACTBEG[9:0]
+
+ VID_REG_SET32( REG_BASE_VID+0x78, 0 ); // REG_OUTPUT444_EN,( 0:422 format, 1:444 format )
+ VID_REG_SET32( REG_BASE_VID+0x7C, 0 ); // REG_HSCALE_MODE(0:bypass , 1: horizontal scale 1/2)
+ VID_REG_SET32( REG_BASE_VID+0x74, 0x1 ); // VID Memory write Enable
+ VID_REG_SET32( REG_BASE_VID+0xfc, 0x1 ); // BIT SWAP
+ //VID_REG_SET32( REG_BASE_VID+0x00, 0x1 ); // VID Enable
+}
+
+
+int wmt_vid_i2c_xfer(struct i2c_msg *msg, unsigned int num, int bus_id)
+{
+ int ret = 1;
+ int i = 0;
+
+ if (num > 1) {
+ for (i = 0; i < num - 1; ++i)
+ msg[i].flags |= I2C_M_NOSTART;
+ }
+ ret = i2c_transfer(vid_i2c_adapter[vid_dev_num], msg, num);
+
+ if (ret <= 0) {
+ printk("[%s] fail ret %d \n", __func__, ret);
+ return ret;
+ }
+
+ return ret;
+}
+
+int write_array_2_i2c(int slave_addr, char *array_addr, int array_size)
+{
+ int i=0;
+
+ for (i = 0; i < array_size; i += 2) {
+ wmt_vid_i2c_write(slave_addr, array_addr[i], array_addr[i+1]);
+ }
+
+ return 0;
+}
+
+int wmt_vid_i2c_write_page(int chipId ,unsigned int index,char *pdata,int len)
+{
+ struct i2c_msg msg[1];
+ unsigned char buf[4];
+ int ret;
+
+ buf[0] = index;
+ memcpy(&buf[1],pdata,len);
+ msg[0].addr = chipId;
+ msg[0].flags = 0 ;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = len;
+ msg[0].buf = buf;
+
+ ret = wmt_vid_i2c_xfer(msg,1,1);
+
+ return ret;
+}
+
+int wmt_vid_i2c_read_page(int chipId ,unsigned int index,char *pdata,int len)
+{
+ struct i2c_msg msg[2];
+ unsigned char buf[4];
+
+ memset(buf,0x55,len+1);
+ buf[0] = index;
+
+ msg[0].addr = chipId;
+ msg[0].flags = 0 ;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = 1;
+ msg[0].buf = buf;
+
+ msg[1].addr = chipId;
+ msg[1].flags = 0 ;
+ msg[1].flags |= (I2C_M_RD);
+ msg[1].len = len;
+ msg[1].buf = buf;
+
+ wmt_vid_i2c_xfer(msg,2,1);
+
+ memcpy(pdata,buf,len);
+
+ return 0;
+}
+
+int wmt_vid_i2c_read(int chipId ,unsigned int index)
+{
+ char retval;
+
+ if (vid_i2c_gpio_en) {
+ wmt_swi2c_read(&vid_swi2c, chipId*2, index, &retval, 1);
+ } else {
+ wmt_vid_i2c_read_page( chipId ,index,&retval,1) ;
+ }
+
+ return retval;
+}
+
+int wmt_vid_i2c_write(int chipId ,unsigned int index,char data)
+{
+ if (vid_i2c_gpio_en) {
+ wmt_swi2c_write(&vid_swi2c, chipId*2, index, &data, 2);
+ } else {
+ wmt_vid_i2c_write_page(chipId ,index, &data, 2);
+ }
+
+ return 0;
+}
+
+int wmt_vid_i2c_write16addr(int chipId ,unsigned int index,unsigned int data)
+{
+ int ret=0;
+ struct i2c_msg msg[1];
+ unsigned char buf[4];
+
+ if (vid_i2c_gpio_en) {
+ DBG_ERR("wmt_vid_i2c_write16addr() Not support GPIO mode now");
+ return -1;
+ }
+
+ buf[0]=((index>>8) & 0xff);
+ buf[1]=(index & 0xff);
+ buf[2]=(data & 0xff);
+
+ msg[0].addr = chipId;
+ msg[0].flags = 0;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = 3;
+ msg[0].buf = buf;
+ ret = wmt_vid_i2c_xfer(msg,1,1);
+
+ return ret;
+}
+
+int wmt_vid_i2c_write16data(int chipId ,unsigned int index,unsigned int data)
+{
+ int ret=0;
+ struct i2c_msg msg[1];
+ unsigned char buf[4];
+
+ if (vid_i2c_gpio_en) {
+ DBG_ERR("wmt_vid_i2c_write16data() Not support GPIO mode now");
+ return -1;
+ }
+
+ buf[0]=((index>>8) & 0xff);
+ buf[1]=(index & 0xff);
+ buf[2]=((data>>8) & 0xff);
+ buf[3]=(data & 0xff);
+
+ msg[0].addr = chipId;
+ msg[0].flags = 0;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = 4;
+ msg[0].buf = buf;
+ ret = wmt_vid_i2c_xfer(msg,1,1);
+
+ return ret;
+}
+
+int wmt_vid_i2c_read16addr(int chipId ,unsigned int index)
+{
+ int ret=0;
+ struct i2c_msg msg[2];
+ unsigned char buf[2];
+ unsigned int val;
+
+ if (vid_i2c_gpio_en) {
+ DBG_ERR("wmt_vid_i2c_read16addr() Not support GPIO mode now");
+ return -1;
+ }
+
+ buf[0]=((index>>8) & 0xff);
+ buf[1]=(index & 0xff);
+
+ msg[0].addr = chipId;
+ msg[0].flags = 0;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = 2;
+ msg[0].buf = buf;
+
+ msg[1].addr = chipId;
+ msg[1].flags = 0;
+ msg[1].flags |= (I2C_M_RD);
+ msg[1].len = 1;
+ msg[1].buf = buf;
+
+ ret = wmt_vid_i2c_xfer(msg,2,1);
+
+ val=buf[0];
+ return val;
+}
+
+int wmt_vid_i2c_read16data(int chipId ,unsigned int index)
+{
+ int ret=0;
+ struct i2c_msg msg[2];
+ unsigned char buf[2];
+ unsigned int val;
+
+ if (vid_i2c_gpio_en) {
+ DBG_ERR("wmt_vid_i2c_read16data() Not support GPIO mode now");
+ return -1;
+ }
+
+ buf[0]=((index>>8) & 0xff);
+ buf[1]=(index & 0xff);
+
+ msg[0].addr = chipId;
+ msg[0].flags = 0;
+ msg[0].flags &= ~(I2C_M_RD);
+ msg[0].len = 2;
+ msg[0].buf = buf;
+
+ msg[1].addr = chipId;
+ msg[1].flags = 0;
+ msg[1].flags |= (I2C_M_RD);
+ msg[1].len = 2;
+ msg[1].buf = buf;
+
+ ret = wmt_vid_i2c_xfer(msg,2,1);
+
+ //printk("wmt_vid_i2c_read16data(%x,%x)\n",buf[0],buf[1]);
+
+ val = ((buf[0]&0xff)<<8) | (buf[1]&0xff);
+
+ return val;
+}
+
+//---dev_0---------------------------------------------
+
+struct wmt_vid_i2c_priv_0 {
+ unsigned int var;
+};
+
+static int __devinit wmt_vid_i2c_probe_0(struct i2c_client *i2c,
+ const struct i2c_device_id *id)
+{
+ struct wmt_vid_i2c_priv *wmt_vid_i2c;
+ int ret=0;
+
+ printk("wmt_vid_i2c_probe_0() \n");
+ if (!i2c_check_functionality(vid_i2c_client[0]->adapter, I2C_FUNC_I2C)) {
+ printk(KERN_ERR "wmt_vid_i2c_probe: need I2C_FUNC_I2C\n");
+ return -ENODEV;
+ }
+
+ wmt_vid_i2c = kzalloc(sizeof(struct wmt_vid_i2c_priv_0), GFP_KERNEL);
+ if (wmt_vid_i2c == NULL) {
+ printk("wmt_vid_i2c_probe kzalloc fail");
+ return -ENOMEM;
+ }
+ i2c_set_clientdata(i2c, wmt_vid_i2c);
+
+ return ret;
+}
+
+static int wmt_vid_i2c_remove_0(struct i2c_client *client)
+{
+ kfree(i2c_get_clientdata(vid_i2c_client[0]));
+ return 0;
+}
+
+static const struct i2c_device_id wmt_vid_i2c_id_0[] = {
+ { "wmt_vid_i2c_0", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, wmt_vid_i2c_id_0);
+
+static struct i2c_driver wmt_vid_i2c_driver_0 = {
+ .probe = wmt_vid_i2c_probe_0,
+ .remove = wmt_vid_i2c_remove_0,
+ .id_table = wmt_vid_i2c_id_0,
+ .driver = {
+ .name = "wmt_vid_i2c_0",
+ },
+};
+
+static struct i2c_board_info wmt_vid_i2c_board_info_0 = {
+ .type = "wmt_vid_i2c_0",
+ .flags = 0x00,
+ .platform_data = NULL,
+ .archdata = NULL,
+ .irq = -1,
+};
+
+//---dev_1---------------------------------------------
+struct wmt_vid_i2c_priv_1 {
+ unsigned int var;
+};
+
+static int __devinit wmt_vid_i2c_probe_1(struct i2c_client *i2c,
+ const struct i2c_device_id *id)
+{
+ struct wmt_vid_i2c_priv *wmt_vid_i2c;
+ int ret=0;
+
+ printk("wmt_vid_i2c_probe_1() \n");
+
+ if (!i2c_check_functionality(vid_i2c_client[1]->adapter, I2C_FUNC_I2C)) {
+ printk(KERN_ERR "wmt_vid_i2c_probe: need I2C_FUNC_I2C\n");
+ return -ENODEV;
+ }
+
+ wmt_vid_i2c = kzalloc(sizeof(struct wmt_vid_i2c_priv_1), GFP_KERNEL);
+ if (wmt_vid_i2c == NULL) {
+ printk("wmt_vid_i2c_probe kzalloc fail");
+ return -ENOMEM;
+ }
+
+ i2c_set_clientdata(i2c, wmt_vid_i2c);
+
+ return ret;
+}
+
+static int wmt_vid_i2c_remove_1(struct i2c_client *client)
+{
+ kfree(i2c_get_clientdata(vid_i2c_client[1]));
+ return 0;
+}
+
+static const struct i2c_device_id wmt_vid_i2c_id_1[] = {
+ { "wmt_vid_i2c_1", 0},
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, wmt_vid_i2c_id_1);
+
+static struct i2c_driver wmt_vid_i2c_driver_1 = {
+ .probe = wmt_vid_i2c_probe_1,
+ .remove = wmt_vid_i2c_remove_1,
+ .id_table = wmt_vid_i2c_id_1,
+ .driver = { .name = "wmt_vid_i2c_1", },
+};
+
+static struct i2c_board_info wmt_vid_i2c_board_info_1 = {
+ .type = "wmt_vid_i2c_1",
+ .flags = 0x00,
+ .platform_data = NULL,
+ .archdata = NULL,
+ .irq = -1,
+};
+
+//---------------------------------------------------------
+int wmt_vid_i2c_set_same_dev(void)
+{
+ vid_dev_tot_num = 2;
+ vid_i2c_adapter[1] = vid_i2c_adapter[0];
+ vid_i2c_client[1] = vid_i2c_client[0];
+
+ return 0;
+}
+
+int wmt_vid_i2c_init(int dev_num, short dev_id)
+{
+ struct i2c_board_info *wmt_vid_i2c_bi ;
+ struct i2c_adapter *adapter;
+ struct i2c_client *client;
+
+ int ret =0;
+
+ printk("wmt_vid_i2c_init() dev_num %d dev_id 0x%02x \n",dev_num,dev_id);
+
+ if (dev_num == 0)
+ wmt_vid_i2c_bi = &wmt_vid_i2c_board_info_0;
+ else
+ wmt_vid_i2c_bi = &wmt_vid_i2c_board_info_1;
+
+ adapter = i2c_get_adapter(WMT_VID_I2C_CHANNEL);
+ if (adapter == NULL) {
+ printk("can not get i2c adapter, client address error");
+ return -ENODEV;
+ }
+
+ wmt_vid_i2c_bi->addr = dev_id;
+
+ client = i2c_new_device(adapter, wmt_vid_i2c_bi);
+ if ( client == NULL) {
+ printk("allocate i2c client failed");
+ return -ENOMEM;
+ }
+
+ vid_dev_tot_num = dev_num+1;
+ vid_i2c_client[dev_num] = client;
+ vid_i2c_adapter[dev_num] = adapter;
+
+ i2c_put_adapter(adapter);
+ if (dev_num == 0)
+ ret = i2c_add_driver(&wmt_vid_i2c_driver_0);
+ else
+ ret = i2c_add_driver(&wmt_vid_i2c_driver_1);
+
+ if (ret) {
+ printk("i2c_add_driver fail");
+ }
+
+ return ret;
+}
+
+int wmt_vid_i2c_release(void)
+{
+ int i;
+
+ for (i = 0; i < vid_dev_tot_num; i++) {
+ i2c_unregister_device(vid_i2c_client[i]);
+ if (i == 0) {
+ wmt_vid_i2c_remove_0(vid_i2c_client[i]);
+ i2c_del_driver(&wmt_vid_i2c_driver_0);
+ } else {
+ wmt_vid_i2c_remove_1(vid_i2c_client[i]);
+ i2c_del_driver(&wmt_vid_i2c_driver_1);
+ }
+ }
+
+ return 0;
+}
+
+int wmt_vid_set_mode(int width, int height, unsigned int pix_format)
+{
+ TRACE("Enter\n");
+
+ VID_REG_SET32(REG_VID_WIDTH, width); /* VID output width */
+ VID_REG_SET32(REG_VID_LINE_WIDTH, width);
+ VID_REG_SET32(REG_VID_HEIGHT, height); /* VID output height */
+
+ if (pix_format == V4L2_PIX_FMT_YUYV) // YUV422
+ {
+ DBG_INFO("V4L2_PIX_FMT_YUYV \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x0); //CMOS Sensor Input mode, set to YUV
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x0); //CMOS RGB Output Mode, only RGB565 need set to '1'
+ VID_REG_SET32( REG_BASE_VID+0x78, 0x0); //REG_OUTPUT444_EN, set to YUV 422
+ }
+ else if (pix_format == V4L2_PIX_FMT_YUV444) {
+ DBG_INFO("V4L2_PIX_FMT_YUYV \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x0); //CMOS Sensor Input mode, set to YUV
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x0); //CMOS RGB Output Mode, only RGB565 need set to '1'
+ VID_REG_SET32( REG_BASE_VID+0x78, 0x1); //REG_OUTPUT444_EN, set to YUV 444
+ }
+ else if (pix_format == V4L2_PIX_FMT_RGB565) {
+ DBG_INFO("V4L2_PIX_FMT_RGB565 \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x1); //CMOS Sensor Input mode, Set to RGB
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x1); //CMOS RGB Output Mode, only RGB565 need set to '1'
+ }
+ else if (pix_format == V4L2_PIX_FMT_RGB32) {
+ DBG_INFO("V4L2_PIX_FMT_RGB888 \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x1); //CMOS Sensor Input mode, Set to RGB
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x0); //CMOS RGB Output Mode , only RGB565 need set to '1'
+ }
+ else if (pix_format == V4L2_PIX_FMT_NV12) {
+ DBG_INFO("V4L2_PIX_FMT_NV12 \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x0); //CMOS Sensor Input mode, set to YUV
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x0); //CMOS RGB Output Mode, only RGB565 need set to '1'
+ VID_REG_SET32( REG_BASE_VID+0x78, 0x10);
+ VID_REG_SET32( REG_BASE_VID+0x74, 0x01);
+ }
+ else if (pix_format == V4L2_PIX_FMT_NV21) {
+ DBG_INFO("V4L2_PIX_FMT_NV21 \n");
+ VID_REG_SET32( REG_BASE_VID+0x90, 0x0); //CMOS Sensor Input mode, set to YUV
+ VID_REG_SET32( REG_BASE_VID+0x98, 0x0); //CMOS RGB Output Mode, only RGB565 need set to '1'
+ VID_REG_SET32( REG_BASE_VID+0x78, 0x10);
+ VID_REG_SET32( REG_BASE_VID+0x74, 0x11);
+ }
+ else {
+ pix_format = V4L2_PIX_FMT_YUYV;
+ DBG_INFO("V4L2_PIX_unknow , set to V4L2_PIX_FMT_YUYV \n");
+ }
+
+ TRACE("Leave\n");
+
+ return 0;
+}
+
+int wmt_vid_set_cur_fb(vid_fb_t *fb)
+{
+ unsigned long flags =0;
+
+ spin_lock_irqsave(&vid_lock, flags);
+
+ _prev_fb = _cur_fb;
+ _cur_fb = fb;
+
+ fb->is_busy = 1;
+ fb->done = 0;
+ wmt_vid_set_addr(fb->y_addr, fb->c_addr);
+
+ spin_unlock_irqrestore(&vid_lock, flags);
+
+ return 0;
+}
+
+vid_fb_t *wmt_vid_get_cur_fb(void)
+{
+ unsigned long flags =0;
+ vid_fb_t *fb;
+
+ spin_lock_irqsave(&vid_lock, flags);
+ fb = _cur_fb;
+ spin_unlock_irqrestore(&vid_lock, flags);
+
+ return fb;
+}
+
+int wmt_vid_set_addr(unsigned int y_addr, unsigned int c_addr)
+{
+ unsigned int cur_y_addr; // temp
+ unsigned int cur_c_addr; // temp
+
+ TRACE("Enter\n");
+
+ cur_y_addr = REG32_VAL(REG_VID_Y0_SA);
+ cur_c_addr = REG32_VAL(REG_VID_C0_SA);
+
+ if ((y_addr != cur_y_addr) || (c_addr != cur_c_addr)) {
+ VID_REG_SET32( REG_VID_Y0_SA, y_addr); /* VID Y FB address */
+ VID_REG_SET32( REG_VID_C0_SA, c_addr); /* VID C FB address */
+ }
+
+ TRACE("Leave\n");
+ return 0;
+}
+
+int wmt_vid_open(vid_mode mode, cmos_uboot_env_t *uboot_env)
+{
+ int value, int_ctrl;
+ TRACE("Enter\n");
+
+ //vid_i2c_gpio_en = uboot_env->i2c_gpio_en;
+ DBG_INFO(" vid_i2c_gpio_en 0x%08x \n",vid_i2c_gpio_en);
+ if ((vid_i2c_gpio_en) && (uboot_env != NULL))
+ {
+ memset(&vid_i2c0_scl, 0, sizeof(vid_i2c0_scl));
+ memset(&vid_i2c0_sda, 0, sizeof(vid_i2c0_sda));
+
+ vid_i2c0_scl.bit_mask = 1 << uboot_env->i2c_gpio_scl_binum;
+ vid_i2c0_scl.pull_en_bit_mask = 1 << uboot_env->reg_i2c_gpio_scl_gpio_pe_bitnum;
+
+ vid_i2c0_scl.data_in = uboot_env->reg_i2c_gpio_scl_gpio_in ;
+ vid_i2c0_scl.gpio_en = uboot_env->reg_i2c_gpio_scl_gpio_en ;
+ vid_i2c0_scl.out_en = uboot_env->reg_i2c_gpio_scl_gpio_od ;
+ vid_i2c0_scl.data_out = uboot_env->reg_i2c_gpio_scl_gpio_oc ;
+ vid_i2c0_scl.pull_en = uboot_env->reg_i2c_gpio_scl_gpio_pe ;
+
+
+ vid_i2c0_sda.bit_mask = 1 << uboot_env->i2c_gpio_sda_binum;
+ vid_i2c0_sda.pull_en_bit_mask = 1 << uboot_env->reg_i2c_gpio_sda_gpio_pe_bitnum;
+
+ vid_i2c0_sda.data_in = uboot_env->reg_i2c_gpio_sda_gpio_in ;
+ vid_i2c0_sda.gpio_en = uboot_env->reg_i2c_gpio_sda_gpio_en ;
+ vid_i2c0_sda.out_en = uboot_env->reg_i2c_gpio_sda_gpio_od ;
+ vid_i2c0_sda.data_out = uboot_env->reg_i2c_gpio_sda_gpio_oc ;
+ vid_i2c0_sda.pull_en = uboot_env->reg_i2c_gpio_sda_gpio_pe ;
+
+ if (vid_i2c0_scl.data_in & 0x1) {
+ vid_i2c0_scl.bit_mask <<= 8;
+ vid_i2c0_scl.pull_en_bit_mask <<= 8;
+ vid_i2c0_scl.data_in -= 1;
+ vid_i2c0_scl.gpio_en -= 1;
+ vid_i2c0_scl.out_en -= 1;
+ vid_i2c0_scl.data_out -= 1;
+ vid_i2c0_scl.pull_en -= 1;
+
+ }
+ if (vid_i2c0_sda.data_in & 0x1) {
+ vid_i2c0_sda.bit_mask <<= 8;
+ vid_i2c0_sda.pull_en_bit_mask <<= 8;
+ vid_i2c0_sda.data_in -= 1;
+ vid_i2c0_sda.gpio_en -= 1;
+ vid_i2c0_sda.out_en -= 1;
+ vid_i2c0_sda.data_out -= 1;
+ vid_i2c0_sda.pull_en -= 1;
+ }
+
+ vid_swi2c.scl_reg = &vid_i2c0_scl;
+ vid_swi2c.sda_reg = &vid_i2c0_sda;
+
+ DBG_INFO("SCL 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ vid_i2c0_scl.bit_mask, vid_i2c0_scl.pull_en_bit_mask,
+ vid_i2c0_scl.data_in, vid_i2c0_scl.gpio_en,
+ vid_i2c0_scl.out_en, vid_i2c0_scl.data_out,
+ vid_i2c0_scl.pull_en);
+ DBG_INFO("SDA 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ vid_i2c0_sda.bit_mask, vid_i2c0_sda.pull_en_bit_mask,
+ vid_i2c0_sda.data_in, vid_i2c0_sda.gpio_en,
+ vid_i2c0_sda.out_en, vid_i2c0_sda.data_out,
+ vid_i2c0_sda.pull_en);
+ }
+
+ /*--------------------------------------------------------------------------
+ Step 1: Init GPIO for CMOS or TVDEC mode
+ --------------------------------------------------------------------------*/
+ vid_gpio_init(mode);
+
+ /*--------------------------------------------------------------------------
+ Step 2: Init CMOS or TVDEC module
+ --------------------------------------------------------------------------*/
+ value = REG32_VAL(REG_VID_TVDEC_CTRL);
+ VID_REG_SET32( REG_VID_MEMIF_EN, 0x1 );
+ VID_REG_SET32( REG_VID_OUTPUT_FORMAT, 0x0 ); // 0: 422 1: 444
+
+ int_ctrl = 0x00;
+ if (mode == VID_MODE_CMOS) {
+ VID_REG_SET32( REG_VID_TVDEC_CTRL, (value & 0xFFFFFFE)); /* disable TV decoder */
+ VID_REG_SET32( REG_VID_CMOS_PIXEL_SWAP, 0x2); /* 0x2 for YUYV */
+#ifdef VID_INT_MODE
+ int_ctrl = 0x0808;
+#endif
+ VID_REG_SET32( REG_VID_INT_CTRL, int_ctrl );
+
+ }
+ else {
+ VID_REG_SET32( REG_VID_TVDEC_CTRL, (value | 0x1) ); /* enable TV decoder */
+#ifdef VID_INT_MODE
+ int_ctrl = 0x0404;
+#endif
+ VID_REG_SET32( REG_VID_INT_CTRL, int_ctrl );
+ VID_REG_SET32( REG_VID_CMOS_EN, 0x0); /* disable CMOS */
+ wmt_vid_set_common_mode(VID_NTSC);
+
+ }
+
+ _cur_fb = 0;
+ _prev_fb = 0;
+
+ spin_lock_init(&vid_lock);
+
+ TRACE("Leave\n");
+
+ return 0;
+}
+
+int wmt_vid_close(vid_mode mode)
+{
+ TRACE("Enter\n");
+
+ auto_pll_divisor(DEV_VID, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_C24MOUT, CLK_DISABLE, 0, 0);
+
+ GPIO_CTRL_GP17_I2C_BYTE_VAL |= BIT6;//24Mhz off , set to GPIO
+
+ if(mode == VID_MODE_CMOS) {
+ VID_REG_SET32( REG_VID_CMOS_EN, 0x0); /* disable CMOS */
+ }
+ else {
+ int value = REG32_VAL(REG_VID_TVDEC_CTRL);
+ VID_REG_SET32( REG_VID_TVDEC_CTRL, (value & 0xFFFFFFE)); /* disable TV decoder */
+ }
+ TRACE("Leave\n");
+
+ return 0;
+}
+
+EXPORT_SYMBOL(wmt_vid_set_mode);
+EXPORT_SYMBOL(wmt_vid_i2c_write);
+EXPORT_SYMBOL(wmt_vid_i2c_read);
+EXPORT_SYMBOL(wmt_vid_i2c_write16addr);
+EXPORT_SYMBOL(wmt_vid_i2c_read16addr);
+EXPORT_SYMBOL(wmt_vid_i2c_write16data);
+EXPORT_SYMBOL(wmt_vid_i2c_read16data);
+EXPORT_SYMBOL(wmt_vid_set_cur_fb);
+EXPORT_SYMBOL(wmt_vid_get_cur_fb);
+EXPORT_SYMBOL(wmt_vid_set_addr);
+EXPORT_SYMBOL(wmt_vid_close);
+EXPORT_SYMBOL(wmt_vid_open);
+EXPORT_SYMBOL(wmt_vid_set_common_mode);
+EXPORT_SYMBOL(wmt_vid_i2c_init);
+EXPORT_SYMBOL(wmt_vid_i2c_release);
+
+MODULE_AUTHOR("WonderMedia SW Team Max Chen");
+MODULE_DESCRIPTION("wmt-vid driver");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/media/video/wmt_v4l2/wmt-vid.h b/drivers/media/video/wmt_v4l2/wmt-vid.h
new file mode 100755
index 00000000..98918cdd
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/wmt-vid.h
@@ -0,0 +1,168 @@
+/*++
+ * linux/drivers/media/video/wmt_v4l2/wmt-vid.h
+ * WonderMedia v4l video input device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#ifndef WMT_VID_H
+#define WMT_VID_H
+
+#include
+#include "wmt-vidreg.h"
+#include "../../../video/wmt/sw_i2c.h"
+
+#ifdef __KERNEL__
+ #define PRINT printk
+#else
+ #define PRINT printf
+ #define KERN_ERR
+ #define KERN_WARNING
+ #define KERN_INFO
+ #define KERN_DEBUG
+#endif
+
+#define BIT0 0x00000001
+#define BIT1 0x00000002
+#define BIT2 0x00000004
+#define BIT3 0x00000008
+#define BIT4 0x00000010
+#define BIT5 0x00000020
+#define BIT6 0x00000040
+#define BIT7 0x00000080
+#define BIT8 0x00000100
+#define BIT9 0x00000200
+#define BIT10 0x00000400
+#define BIT11 0x00000800
+#define BIT12 0x00001000
+#define BIT13 0x00002000
+#define BIT14 0x00004000
+#define BIT15 0x00008000
+#define BIT16 0x00010000
+#define BIT17 0x00020000
+#define BIT18 0x00040000
+#define BIT19 0x00080000
+#define BIT20 0x00100000
+#define BIT21 0x00200000
+#define BIT22 0x00400000
+#define BIT23 0x00800000
+#define BIT24 0x01000000
+#define BIT25 0x02000000
+#define BIT26 0x04000000
+#define BIT27 0x08000000
+#define BIT28 0x10000000
+#define BIT29 0x20000000
+#define BIT30 0x40000000
+#define BIT31 0x80000000
+
+typedef enum{
+ VID_MODE_CMOS, /* CMOS sensor mode */
+ VID_MODE_TVDEC /* TV Decoder mode */
+} vid_mode;
+
+/*------------------------------------------------------------------------------
+ Definitions of structures
+------------------------------------------------------------------------------*/
+#define VID_FB_M \
+ unsigned int y_addr; \
+ unsigned int c_addr; \
+ unsigned int id; \
+ unsigned int done; \
+ unsigned int is_busy
+/* End of VD_IOCTL_CMD_M */
+
+/* Following structure is used for all HW decoder as input arguments */
+typedef struct {
+ VID_FB_M;
+} vid_fb_t;
+
+typedef struct {
+ struct i2c_adapter *adapter;
+ struct i2c_client *client;
+ char name[12];
+ unsigned int gpio_pwr_active_level;
+ unsigned int gpio_pwr_bitnum;
+ unsigned int gpio_pwr_reg_gpio_en;
+ unsigned int gpio_pwr_reg_gpio_od;
+ unsigned int gpio_pwr_reg_gpio_oc;
+ short i2c_addr;
+} cmos_dev_t;
+
+typedef struct {
+ unsigned int en;
+ unsigned int dummy;
+
+ unsigned int dev_tot_num;
+ unsigned int dev_id;
+ unsigned int is_two_same_dev;
+ cmos_dev_t dev[2];
+
+ unsigned int v_flip;//v_mirror
+ unsigned int h_flip;//h_mirror
+ unsigned int i2c_gpio_en;
+
+ unsigned int i2c_gpio_scl_binum;
+ unsigned int i2c_gpio_sda_binum;
+
+ unsigned int reg_i2c_gpio_scl_gpio_in;
+ unsigned int reg_i2c_gpio_scl_gpio_en;
+ unsigned int reg_i2c_gpio_scl_gpio_od;
+ unsigned int reg_i2c_gpio_scl_gpio_oc;
+ unsigned int reg_i2c_gpio_scl_gpio_pe;
+ unsigned int reg_i2c_gpio_scl_gpio_pe_bitnum;
+
+ unsigned int reg_i2c_gpio_sda_gpio_in;
+ unsigned int reg_i2c_gpio_sda_gpio_en;
+ unsigned int reg_i2c_gpio_sda_gpio_od;
+ unsigned int reg_i2c_gpio_sda_gpio_oc;
+ unsigned int reg_i2c_gpio_sda_gpio_pe;
+ unsigned int reg_i2c_gpio_sda_gpio_pe_bitnum;
+
+ char isMIPI;
+} cmos_uboot_env_t;
+
+typedef enum {
+ VID_NTSC,
+ VID_PAL
+} vid_tvsys_e;
+
+
+int wmt_vid_open(vid_mode mode,cmos_uboot_env_t *cmos_uboot_env);
+int wmt_vid_close(vid_mode mode);
+int wmt_vid_set_mode(int width, int height, unsigned int pix_format);
+int wmt_vid_set_addr(unsigned int y_addr, unsigned int c_addr);
+
+int wmt_vid_set_cur_fb(vid_fb_t *fb);
+vid_fb_t * wmt_vid_get_cur_fb(void);
+int write_array_2_i2c(int slave_addr, char *array_addr, int array_size);
+
+int wmt_vid_i2c_write(int chipId ,unsigned int index,char data);
+int wmt_vid_i2c_read(int chipId ,unsigned int index) ;
+int wmt_vid_i2c_read_page(int chipId ,unsigned int index,char *pdata,int len);
+int wmt_vid_i2c_write_page(int chipId ,unsigned int index,char *pdata,int len);
+int wmt_vid_i2c_write16addr(int chipId ,unsigned int index,unsigned int data);
+int wmt_vid_i2c_read16addr(int chipId ,unsigned int index);
+int wmt_vid_i2c_write16data(int chipId ,unsigned int index,unsigned int data);
+int wmt_vid_i2c_read16data(int chipId ,unsigned int index);
+int wmt_vid_i2c_init( int dev_num, short dev_id);
+int wmt_vid_i2c_release(void);
+int wmt_vid_i2c_set_same_dev(void);
+
+#endif
+
diff --git a/drivers/media/video/wmt_v4l2/wmt-vidreg.h b/drivers/media/video/wmt_v4l2/wmt-vidreg.h
new file mode 100755
index 00000000..c7abddc8
--- /dev/null
+++ b/drivers/media/video/wmt_v4l2/wmt-vidreg.h
@@ -0,0 +1,87 @@
+/*++
+ * linux/drivers/media/video/wmt_v4l2/wmt-vidreg.h
+ * WonderMedia v4l video input device driver
+ *
+ * Copyright c 2010 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef WMT_VIDREG_H
+/* To assert that only one occurrence is included */
+#define WMT_VIDREG_H
+
+/*-------------------- MODULE DEPENDENCY -------------------------------------*/
+
+/*-------------------- EXPORTED PRIVATE CONSTANTS ----------------------------*/
+
+#define WMT_VID_IRQ IRQ_VPP_IRQ10 // this may be changed by chip
+
+#define REG_BASE_VID VID_BASE_ADDR
+
+/*------------------------------------------------------------------------------
+ Definitions of VID Registers
+ About following definitions, please refer "WM3437 VID/CMOS Register List"
+
+ Prefix meanings:
+ REG_VID_xxx: used for both TV deccoder and CMOS
+ REG_VID_TVDEC_xxx: used for TV encoder only
+ REG_VID_CMOS_XXX: used for CMOS only
+------------------------------------------------------------------------------*/
+#define REG_VID_TVDEC_EN (REG_BASE_VID + 0x00)
+#define REG_VID_TVDEC_CTRL (REG_BASE_VID + 0x04)
+#define REG_VID_Y0_SA (REG_BASE_VID + 0x60)
+#define REG_VID_C0_SA (REG_BASE_VID + 0x64)
+#define REG_VID_WIDTH (REG_BASE_VID + 0x68)
+#define REG_VID_LINE_WIDTH (REG_BASE_VID + 0x6C)
+#define REG_VID_HEIGHT (REG_BASE_VID + 0x70)
+#define REG_VID_MEMIF_EN (REG_BASE_VID + 0x74)
+#define REG_VID_OUTPUT_FORMAT (REG_BASE_VID + 0x78)
+#define REG_VID_H_SCALE (REG_BASE_VID + 0x7C)
+#define REG_VID_CMOS_EN (REG_BASE_VID + 0x80)
+#define REG_VID_CMOS_PIXEL_SWAP (REG_BASE_VID + 0x84)
+
+#define REG_VID_INT_CTRL (REG_BASE_VID + 0xF0)
+#define REG_VID_STS (REG_BASE_VID + 0xF4)
+#define REG_VIDCLK_INV (REG_BASE_VID + 0xFc)
+
+
+/*-------------------- EXPORTED PRIVATE TYPES---------------------------------*/
+/* typedef void viaapi_xxx_t; *//*Example*/
+
+/*------------------------------------------------------------------------------
+ Definitions of structures
+------------------------------------------------------------------------------*/
+
+
+/*-------------------- EXPORTED PRIVATE VARIABLES -----------------------------*/
+#ifdef WMT_VID_C
+ #define EXTERN
+#else
+ #define EXTERN extern
+#endif
+
+#undef EXTERN
+
+/*--------------------- EXPORTED PRIVATE MACROS -------------------------------*/
+
+/*--------------------- EXPORTED PRIVATE FUNCTIONS ---------------------------*/
+/* extern void viaapi_xxxx(vdp_Void); *//*Example*/
+
+
+#endif /* ifndef WMT_VIDREG_H */
+
+/*=== END wmt-vidreg.h ==========================================================*/
--
cgit
| |